hp2FEM
0.1
|
Calculates the shape functions and their derivatives for triangle element. More...
#include <TriangleShapeFunctions.h>
Public Member Functions | |
TriangleShapeFunctions () | |
Default constructor. | |
TriangleShapeFunctions (unsigned long MaxPolyOrder) | |
Constructor with parameter. | |
TriangleShapeFunctions (TriangleShapeFunctions &Instance) | |
Copy-initializer constructor. | |
~TriangleShapeFunctions () | |
Class destructor. | |
TriangleShapeFunctions & | operator= (TriangleShapeFunctions &Instance) |
Assigns one Instance to the current object. | |
void | SetMaxPolyOrder (unsigned long MaxPolyOrder) |
Sets the maximum polynomial order for the shape functions. | |
LineShapeFunctions & | GetLineShapeFunctions (unsigned long LiDirection=1) |
Returns the reference to LineShapeFunctions. According to LiDirection parameter returns one of the Line attributes of the class TriangleShapeFunctions. | |
unsigned long | GetMaxPolyOrder () |
Returns the maximum polynomial order for the shape functions. | |
long | GetShapeFunctionSetNumber (unsigned long PolyOrder) |
Returns the set number of the shape functions values for the given a polynomial order. | |
void | GetShapeFunctions (unsigned long PolyOrder, long SFSetNumber, long IPSetNumber, IPCP_E IPCPFlag, unsigned long NumberIndicesNI, double *ShapeFunctions) |
Returns the shape functions given the element shape, polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions has been already calculated by the method RunShapeFunctions. | |
double *const | GetShapeFunctions (ElementShape_E EntityShape, long SFSetNumber, long IPSetNumber, IPCP_E IPCPFlag, unsigned long &NumberSFValues, unsigned long LiDirection=1) |
Returns the shape functions given the element shape, polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions has been already calculated by the method RunShapeFunctions. | |
double *const | GetShapeFunctions (ElementShape_E EntityShape, long SFSetNumber, long IPSetNumber, IPCP_E IPCPFlag, unsigned long &TotalNumberSFValues, unsigned long &NumberSFValues, unsigned long &NumberPoints, unsigned long LiDirection=1) |
Returns the shape functions given the element shape, polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions has been already calculated by the method RunShapeFunctions. | |
double *const | GetdShapeFunctions (ElementShape_E EntityShape, long SFSetNumber, long IPSetNumber, IPCP_E IPCPFlag, unsigned long &NumberSFValues, unsigned long LiDirection=1) |
Returns the derivatives of the shape functions given the shape, the polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the derivatives of the shape functions have been already calculated by the method RunShapeFunctions. | |
unsigned long *const | GetIndices (unsigned long PolyOrder, unsigned long &NumberIndices) |
Returns the tensorization indices p, q and r for each node/mode. | |
OneIndexTable< unsigned long > & | GetIndices () |
Get Indices for tensorization of shape functions. | |
void | RunShapeFunctions (ElementShape_E EntityShape, ShapeFunctionsAttributes_S SFunctions, NumericalIntegration &NI, collocationPoints &CP, BuiltInArray< unsigned long > &PolyOrder) |
Calculates the shape functions values and their derivatives on the integration and collocation points also calculated for the input element orders given in the PolyOrder argument. | |
void | RunShapeFunctions (ElementShape_E EntityShape, ShapeFunctionsAttributes_S SFunctions, NumericalIntegration &NI, collocationPoints &CP, TriangleNumericalIntegration &TetraTriNI, TriangleCollocationPoints &TetraTriCP, BuiltInArray< unsigned long > &PolyOrder) |
Calculates the shape functions values and their derivatives on the integration and collocation points also calculated for the input element orders given in the PolyOrder argument, this function is called when running the tetrahedra class when we want to calculate face loads. | |
void | Print (FILE *File, ElementShape_E ElementShape, BuiltInArray< unsigned long > &PolyOrder) |
: Prints the shape functions attributes and values to the given ascii file. | |
void | BuildIndices (BuiltInArray< unsigned long > &PolyOrder, ShapeFunctionsAttributes_S SFAttributes) |
Protected function for the calculation of the tensorization indices p, q and r for each polynomial order given in the input argument PolyOrder. The indices are stored in the table Indices. This methods is executed in the RunShapeFunctions method. | |
Protected Attributes | |
OneIndexTable< unsigned long > | TensorIndices |
Stores the tensorization indices p, q and r for each node/mode. | |
LineShapeFunctions | LineSF |
Instance of the line shape functions fot direction L1. | |
LineShapeFunctions | LineSF1 |
Instance of the line shape functions fot direction L1. | |
LineShapeFunctions | LineSF2 |
Instance of the line shape functions fot direction L2. | |
LineShapeFunctions | LineSF3 |
Instance of the line shape functions fot direction L3. | |
TwoIndexTable< double > | SFIP |
Table that stores the shape functions values for each polynomial order and sets of integration points. | |
TwoIndexTable< double > | dSFIP |
Table that stores the derivatives of the shape functions for each polynomial order and sets of integration points. The partial derivatives of each function Ni are stored as Ni,L1, Ni,L2 and Ni,L3. | |
TwoIndexTable< double > | SFCP |
Table that stores the shape functions values for each polynomial order and sets of collocatiion points. | |
TwoIndexTable< double > | dSFCP |
Table that stores the derivatives of the shape functions for each polynomial order and sets of collocation points. The partial derivatives of each function Ni are stored as Ni,L1, Ni,L2 and Ni,L3. | |
BuiltInArray< unsigned long > | NumbIntegPoints |
the Number of integration points applied on each shape functions for each polynomial order. | |
BuiltInArray< unsigned long > | NumbCollocPoints |
the Number of collocation points applied on each shape functions for each polynomial order. | |
unsigned long | Pmax |
Maximum polynomial order. |
Calculates the shape functions and their derivatives for triangle element.
TriangleShapeFunctions::TriangleShapeFunctions | ( | unsigned long | MaxPolyOrder | ) |
Constructor with parameter.
[in] | MaxPolyOrder | - maximum polynomial order for the triangle shape functions |
Copy-initializer constructor.
void TriangleShapeFunctions::BuildIndices | ( | BuiltInArray< unsigned long > & | PolyOrder, |
ShapeFunctionsAttributes_S | SFAttributes | ||
) |
Protected function for the calculation of the tensorization indices p, q and r for each polynomial order given in the input argument PolyOrder. The indices are stored in the table Indices. This methods is executed in the RunShapeFunctions method.
[in] | PolyOrder | - element orders for a p-nonuniform mesh in a increasing sequence. For a p-uniform, thsi array stores only one value. |
[in] | SFAttributes,: | attributes for the shape functions using the ShapeFunctionsAttributes_S struct. |
Auxiliary variable used in for-loops and also for indexing the pointer pIndTI.
double *const TriangleShapeFunctions::GetdShapeFunctions | ( | ElementShape_E | EntityShape, |
long | SFSetNumber, | ||
long | IPSetNumber, | ||
IPCP_E | IPCPFlag, | ||
unsigned long & | NumberSFValues, | ||
unsigned long | LiDirection = 1 |
||
) |
Returns the derivatives of the shape functions given the shape, the polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the derivatives of the shape functions have been already calculated by the method RunShapeFunctions.
[in] | EntityShape | - if LINE, the edge shape functions are returned; if TRIANGLE, the values of the element shape functions are returned in the vertex, edge and face sequence. |
[in] | SFSetNumber | - Set number of the shape functions. |
[in] | IPSetNumber | - Set number of the integration points. |
[in] | IPCPFlag | - specifies if the shape functions are to be returned on the integration (IP) or collocation (CP) points |
[out] | NumberSFValues | - Number of shape functions values. |
[in] | LiDirection | - Baricentric direction number. |
unsigned long *const TriangleShapeFunctions::GetIndices | ( | unsigned long | PolyOrder, |
unsigned long & | NumberIndices | ||
) |
Returns the tensorization indices p, q and r for each node/mode.
[in] | PolyOrder | - Polynomial order. |
[out] | NumberIndices | - number of tensorization indices. |
OneIndexTable< unsigned long > & TriangleShapeFunctions::GetIndices | ( | ) |
Get Indices for tensorization of shape functions.
LineShapeFunctions & TriangleShapeFunctions::GetLineShapeFunctions | ( | unsigned long | LiDirection = 1 | ) |
Returns the reference to LineShapeFunctions. According to LiDirection parameter returns one of the Line attributes of the class TriangleShapeFunctions.
[in] | LiDirection | - Baricentric direction number. |
unsigned long TriangleShapeFunctions::GetMaxPolyOrder | ( | ) |
Returns the maximum polynomial order for the shape functions.
void TriangleShapeFunctions::GetShapeFunctions | ( | unsigned long | PolyOrder, |
long | SFSetNumber, | ||
long | IPSetNumber, | ||
IPCP_E | IPCPFlag, | ||
unsigned long | NumberIndicesNI, | ||
double * | ShapeFunctions | ||
) |
Returns the shape functions given the element shape, polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions has been already calculated by the method RunShapeFunctions.
[in] | Polyorder | - the polynomial order. |
[in] | SFSetNumber | - Set number of the shape functions. |
[in] | IPSetNumber | - Set number of the integration points. |
[in] | IPCPFlag | - specifies if the shape functions are to be returned on the integration (IP) or collocation (CP) points |
[in] | NumberIndicesNI | - Number of tensor indices from the integration points. |
[out] | ShapeFunctions | - the triangle shape functions |
double *const TriangleShapeFunctions::GetShapeFunctions | ( | ElementShape_E | EntityShape, |
long | SFSetNumber, | ||
long | IPSetNumber, | ||
IPCP_E | IPCPFlag, | ||
unsigned long & | NumberSFValues, | ||
unsigned long | LiDirection = 1 |
||
) |
Returns the shape functions given the element shape, polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions has been already calculated by the method RunShapeFunctions.
[in] | EntityShape | - if LINE, the edge shape functions are returned; if TRIANGLE, the values of the element shape functions are returned in the vertex, edge and face sequence. |
[in] | SFSetNumber | - Set number of the shape functions. |
[in] | IPSetNumber | - Set number of the integration points. |
[in] | IPCPFlag | - specifies if the shape functions are to be returned on the integration (IP) or collocation (CP) points |
[out] | NumberSFValues | - Number of shape functions values. |
[in] | LiDirection | - Baricentric direction number. |
double *const TriangleShapeFunctions::GetShapeFunctions | ( | ElementShape_E | EntityShape, |
long | SFSetNumber, | ||
long | IPSetNumber, | ||
IPCP_E | IPCPFlag, | ||
unsigned long & | TotalNumberSFValues, | ||
unsigned long & | NumberSFValues, | ||
unsigned long & | NumberPoints, | ||
unsigned long | LiDirection = 1 |
||
) |
Returns the shape functions given the element shape, polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions has been already calculated by the method RunShapeFunctions.
[in] | EntityShape | - if LINE, the edge shape functions are returned; if TRIANGLE, the values of the element shape functions are returned in the vertex, edge and face sequence. |
[in] | SFSetNumber | - Set number of the shape functions. |
[in] | IPSetNumber | - Set number of the integration points. |
[in] | IPCPFlag | - specifies if the shape functions are to be returned on the integration (IP) or collocation (CP) points |
[out] | TotalNumberSFValues | - Total number of elements of the shape functions matrix. |
[out] | NumberSFValues | - Number of shape functions values. |
[out] | NumberPoints | - Number of points of the integration or collocation depending of the IPCPFlag. |
[in] | LiDirection | - Baricentric direction number. |
long TriangleShapeFunctions::GetShapeFunctionSetNumber | ( | unsigned long | PolyOrder | ) |
Returns the set number of the shape functions values for the given a polynomial order.
[in] | PolyOrder | - Polynomial order. |
TriangleShapeFunctions & TriangleShapeFunctions::operator= | ( | TriangleShapeFunctions & | Instance | ) |
Assigns one Instance to the current object.
void TriangleShapeFunctions::Print | ( | FILE * | File, |
ElementShape_E | ElementShape, | ||
BuiltInArray< unsigned long > & | PolyOrder | ||
) |
: Prints the shape functions attributes and values to the given ascii file.
[in] | File | - pointer to the ascii file |
[in] | ElementShape | - element shape |
[in] | PolyOrder | - element orders for a p-nonuniform mesh in a increasing sequence. For a p-uniform, this array stores only one value |
void TriangleShapeFunctions::RunShapeFunctions | ( | ElementShape_E | EntityShape, |
ShapeFunctionsAttributes_S | SFunctions, | ||
NumericalIntegration & | NI, | ||
collocationPoints & | CP, | ||
BuiltInArray< unsigned long > & | PolyOrder | ||
) |
Calculates the shape functions values and their derivatives on the integration and collocation points also calculated for the input element orders given in the PolyOrder argument.
[in] | EntityShape | - entity shape for which the interpolation functions and derivatives must be calculated. If it is TRIANGLE, the edge and element shape functions and derivatives are calculated; if it is LINE, only the line shape functions and their derivatives are calculated. |
[in] | SFunctions | - attributes of the shape functions |
[in] | NI | - instance of the NumericalIntegration class |
[in] | CP | - instance of the CollocationPoints class |
[in] | PolyOrder | - element orders for a p-nonuniform mesh in a increasing sequence. For a p-uniform, thsi array stores only one value |
Total number of shape functions (P1+1)(P1+2)/2 + (P2+1)(P2+2)/2 + ... + (Pn+1)(Pn+2)/2.
Number of shape functions on collocation points: (P1+1)(P1+2)/2)*(P1+1)(P1+2)/2) + (P1+1)(P1+2)/2)*((P2+1)(P2+2)/2) + ... + (Pn+1)(Pn+2)/2)*((Pn+1)(Pn+2)/2)^2.
Calculates the total number of integration points. Which is equal to the sum of the squares of the line integrations points: LineIntgPoint_1^2 + LineIntgPoint_2^2 + ... + LineIntgPoint_n^2
Allocates the tables of shape functions values and their derivatives on the integration and collocation points.
Auxiliary pointers for the indices and data of the tables for shape functions values and their derivatives on the integration points.
Auxiliary pointers for the indices and data of the tables for shape functions values and their derivatives. on the collocation points.
For collocation points.
void TriangleShapeFunctions::RunShapeFunctions | ( | ElementShape_E | EntityShape, |
ShapeFunctionsAttributes_S | SFunctions, | ||
NumericalIntegration & | NI, | ||
collocationPoints & | CP, | ||
TriangleNumericalIntegration & | TetraTriNI, | ||
TriangleCollocationPoints & | TetraTriCP, | ||
BuiltInArray< unsigned long > & | PolyOrder | ||
) |
Calculates the shape functions values and their derivatives on the integration and collocation points also calculated for the input element orders given in the PolyOrder argument, this function is called when running the tetrahedra class when we want to calculate face loads.
[in] | EntityShape | - entity shape for which the interpolation functions and derivatives must be calculated. If it is TRIANGLE, the edge and element shape functions and derivatives are calculated; if it is LINE, only the line shape functions and their derivatives are calculated. |
[in] | SFunctions | - attributes of the shape functions |
[in] | NI | - instance of the NumericalIntegration class |
[in] | CP | - instance of the CollocationPoints class |
[in] | TetraTriNI | - instance to the TriangleNumericalIntegration class, inside TetraNI |
[in] | TetraTriCP | - instance to the TriangleCollocationPoints class, inside TetraCP |
[in] | PolyOrder | - element orders for a p-nonuniform mesh in a increasing sequence. For a p-uniform, thsi array stores only one value |
Total number of shape functions (P1+1)(P1+2)/2 + (P2+1)(P2+2)/2 + ... + (Pn+1)(Pn+2)/2.
Number of shape functions on collocation points: (P1+1)(P1+2)/2)*(P1+1)(P1+2)/2) + (P1+1)(P1+2)/2)*((P2+1)(P2+2)/2) + ... + (Pn+1)(Pn+2)/2)*((Pn+1)(Pn+2)/2)^2.
Calculates the total number of integration points. Which is equal to the sum of the squares of the line integrations points: LineIntgPoint_1^2 + LineIntgPoint_2^2 + ... + LineIntgPoint_n^2
Allocates the tables of shape functions values and their derivatives on the integration and collocation points.
Auxiliary pointers for the indices and data of the tables for shape functions values and their derivatives on the integration points.
Auxiliary pointers for the indices and data of the tables for shape functions values and their derivatives. on the collocation points.
For collocation points.
void TriangleShapeFunctions::SetMaxPolyOrder | ( | unsigned long | MaxPolyOrder | ) |
Sets the maximum polynomial order for the shape functions.
[in] | MaxOrder | - maximum polynomial order. |