hp2FEM
0.1
|
This container class returns the weights and coordinates for numerical integration of line, square, hexahedron and tetrahedron finite elements. The maximum integrand order is calculated by the multiplication of the maximum polynomial order Pmax and the integrand order factor IOFactor. Integration points are calculated for integrand orders obtained by [1,IOFactor] * Pmax. More...
#include <NumericalIntegration.h>
Public Member Functions | |
unsigned long *const | GetIndices (ElementShape_E EntityShape, unsigned long IntegrandOrder, unsigned long &NumberIndices) |
Get Indices for tensorization of numerical integration coordinates and weights. This method assumes that the indices have been already calculated by the procedure RunNumericalIntegration. | |
OneIndexTable< unsigned long > & | GetIndices (ElementShape_E ElementShape) |
Get Indices for tensorization of numerical integration coordinates and weights. This method assumes that the indices have been already calculated by the procedure RunNumericalIntegration. | |
unsigned long * | GetIndicesBySet (ElementShape_E ElemShape, unsigned long SetNumber, unsigned long &NumberIndices) |
Returns the tensor indices. This method assumes that the tensor indices have been already calculated by the procedure RunNumericalIntegration. | |
double *const | GetIntegrationPointsCoords (ElementShape_E ElementShape, ElementShape_E EntityShape, unsigned long IntegrandOrder, unsigned long &NumberIntegrationPoints, unsigned long LiDirection=1) |
Returns the coordinates of the integration points. The coordinates are stored only for the line elements. For the other shapes, the coordinates are collected from the line coordinates everytime the methods is executed. | |
double * | GetIntegrationPointsCoords (ElementShape_E ElemShape, unsigned long &NumberCoords, unsigned long &NumberIndices, unsigned long **Indices) |
Returns the coordinates of all integration points. This method assumes that the coordinates have been already calculated by the procedure RunNumericalIntegration. | |
double * | GetIntegrationPointsCoordsBySets (ElementShape_E ElemShape, unsigned long SetNumber, unsigned long &NumberIntegrationPoints) |
Returns the coordinates of the integration points. This method assumes that the coordinates have been already calculated by the procedure RunNumericalIntegration. | |
long | GetIntegrationPointsSetNumber (ElementShape_E ElemShape, NumericalIntegrationAttributes_S &NIAttributes, unsigned long IntegrandOrder) |
Returns the set number of the integration points for the given order of the integrand according to element shape informed. | |
double *const | GetIntegrationPointsWeights (ElementShape_E ElementShape, ElementShape_E EntityShape, unsigned long IntegrandOrder, unsigned long &NumberIntegrationPoints, unsigned long LiDirection=1) |
Returns the weights of the integration points. This method assumes that the weights have been already calculated by the procedure RunNumericalIntegration. | |
double * | GetIntegrationPointsWeights (ElementShape_E ElemShape, unsigned long &NumberWeights, unsigned long &NumberIndices, unsigned long **Indices) |
Returns the weights of all integration points. This method assumes that the weights have been already calculated by the procedure RunNumericalIntegration. | |
double * | GetIntegrationPointsWeightsBySets (ElementShape_E ElemShape, unsigned long SetNumber, unsigned long &NumberIntegrationPoints) |
Returns the weights of the integration points. This method assumes that the weights have been already calculated by the procedure RunNumericalIntegration. | |
LineNumericalIntegration & | GetLineNumericalIntegration (ElementShape_E ElemShape, unsigned long LiDirection=1) |
Returns the LineNumericalIntegration reference according to element shape and baricentric direction number to (triangle and tetrahedron). | |
unsigned long | GetMaxNumberIntegrationPoints (ElementShape_E ElemShape) |
Returns the maximum number of integration points. Using line numerical integration of each element. | |
unsigned long | GetMaxNumberIntegrationPointsSets (ElementShape_E ElemShape) |
Returns the maximum number of sets of integration points. | |
unsigned long | GetMaxPolyOrder (ElementShape_E ElemShape) |
Returns the maximum polynomial order according to element shape informed. | |
unsigned long | GetNumberIntegrationPoints (ElementShape_E ElementShape, ElementShape_E EntityShape, unsigned long IntegrandOrder, long &IntegrationPointsSetNumber) |
Returns the number of integration points given by integrand order for the quadrature rule stored in the class. Returns also the number of the set which stores the points. | |
unsigned long | GetNumberIntegrationPoints (ElementShape_E ElemShape, ElementShape_E EntityShape, long IntegrationPointsSetNumber, unsigned long LiDirection=1) |
Returns the number of integration points for a given set number according to element shape informed. | |
unsigned long | GetNumberIntegrationPointsSets (ElementShape_E EntityShape) |
Returns the number of sets of integration points calculated using the polynomial and integration orders. | |
NumericalIntegrationAttributes_S & | GetNumericalIntegrationAttributes () |
returns the numerical integration attributes. | |
unsigned long | GetTotalNumberIntegrationPoints (ElementShape_E ElemShape) |
Returns the total number of integration points according to element shape informed. | |
NumericalIntegration () | |
Default constructor. | |
NumericalIntegration (NumericalIntegrationAttributes_S &NumericalIntegrationAttributes) | |
Constructor with all class attributes input in an instance of the NumericalIntegrationAttributes_S instance. | |
NumericalIntegration (ElementShape_E ElementShape, QuadCollocType_E QuadratureType, unsigned long Alpha, unsigned long Beta, unsigned long MaxPolyOrder, unsigned long IntegrandOrderFactor=2) | |
Constructor with all class attributes as input parameters to be stored in the NumericalIntegrationAttributes_S instance. | |
NumericalIntegration (NumericalIntegration &Instance) | |
Copy-initializer constructor. | |
operator NumericalIntegrationAttributes_S & () | |
Cast operator for the reference of the class attribute "NIAttributes". | |
operator HexaNumericalIntegration & () | |
Cast operator for the reference of the class attribute "HexaNI". | |
operator LineNumericalIntegration & () | |
Cast operator for the reference of the class attribute "LineNI". | |
operator SquareNumericalIntegration & () | |
Cast operator for the reference of the class attribute "SquareNI". | |
operator TetraNumericalIntegration & () | |
Cast operator for the reference of the class attribute "TetraNI". | |
operator TriangleNumericalIntegration & () | |
Cast operator for the reference of the class attribute "TriangleNI". | |
NumericalIntegration & | operator= (NumericalIntegration &Instance) |
Copies the contents of instance to the object. | |
void | Print (FILE *File, ElementShape_E ElementShape, ElementShape_E EntityShape) |
: Prints the numerical integration attributes and values to the given ascii file. | |
void | Read (FILE *DefFile, unsigned long GroupNumber, ElementShape_E ElementShape, unsigned long MaxOrder) |
Reads the numerical integration attributes from the .def ascii file. | |
void | RunNumericalIntegration (ElementShape_E ElementShape, ElementShape_E EntityShape, BuiltInArray< unsigned long > &PolyOrder) |
Calculates the tensorization indices and the weigths for numerical integration of the polynomial orders given in the input parameter PolyOrder and integrand orders calculated by [1,IOFactor] * P.. | |
void | SetMaxPolyOrder (ElementShape_E ElemShape, unsigned long MaxOrder) |
Sets the maximum polynomial according to element shape. | |
void | SetNumberCoordsWeights (ElementShape_E ElemShape, unsigned long NumberRow, unsigned long NumberData) |
Sets the coordinates and weights table according to element shape informed. | |
void | SetNumberIntegrationPointsSets (ElementShape_E ElemShape, NumericalIntegrationAttributes_S &NIAttributes, BuiltInArray< unsigned long > &PolyOrder) |
Sets the maximum number of sets of integration points. | |
void | SetNumericalIntegrationAttributes (NumericalIntegrationAttributes_S &NumericalIntegrationAttributes) |
Setsl class attributes input in an instance of the NumericalIntegrationAttributes_S instance. | |
void | SetNumericalIntegrationAttributes (ElementShape_E ElementShape, QuadCollocType_E QuadratureType, unsigned long Alpha, unsigned long Beta, unsigned long MaxPolyOrder, unsigned long IntegrandOrderFactor=2) |
Sets the class attributes as input parameters to be stored in the NumericalIntegrationAttributes_S instance. | |
~NumericalIntegration () | |
Class destructor. | |
Protected Attributes | |
HexaNumericalIntegration * | HexaNI |
Numerical integration variable for hexahedron element. | |
LineNumericalIntegration * | LineNI |
Numerical integration variable for line element. | |
NumericalIntegrationAttributes_S | NIAttributes |
This variable stores a struct with all the atributtes of the NumericalIntegration class (quadrature type and its weights Alpha and Beta, the element shape and the maximum polynomial order) | |
SquareNumericalIntegration * | SquareNI |
Numerical integration variable for square element. | |
TetraNumericalIntegration * | TetraNI |
Numerical integration variable for tetrahedron element. | |
TriangleNumericalIntegration * | TriangleNI |
Numerical integration variable for triangle element. |
This container class returns the weights and coordinates for numerical integration of line, square, hexahedron and tetrahedron finite elements. The maximum integrand order is calculated by the multiplication of the maximum polynomial order Pmax and the integrand order factor IOFactor. Integration points are calculated for integrand orders obtained by [1,IOFactor] * Pmax.
NumericalIntegration::NumericalIntegration | ( | NumericalIntegrationAttributes_S & | NumericalIntegrationAttributes | ) |
Constructor with all class attributes input in an instance of the NumericalIntegrationAttributes_S instance.
[in] | NumericalIntegrationAttributes | - parameters of numerical integration. |
NumericalIntegration::NumericalIntegration | ( | ElementShape_E | ElementShape, |
QuadCollocType_E | QuadratureType, | ||
unsigned long | Alpha, | ||
unsigned long | Beta, | ||
unsigned long | MaxPolyOrder, | ||
unsigned long | IntegrandOrderFactor = 2 |
||
) |
Constructor with all class attributes as input parameters to be stored in the NumericalIntegrationAttributes_S instance.
[in] | ElementShape,: | element shape |
[in] | QuadratureType,: | specifies the quadrature type for numerical integration |
[in] | Alpha,Beta,: | specifies the weights for the calculation of the weights and integration points |
[in] | MaxPolyOrder,: | maximum polynomial order |
[in] | IntegrandOrderFactor,: | integrand order factor that it is multiplied by the the polynomial order P to obtain the integrand order. The default value is 2 which means that the integration points will be calculated for orders P and 2P. |
Copy-initializer constructor.
[in] | Instance | - instance of the NumericalIntegration class. |
unsigned long *const NumericalIntegration::GetIndices | ( | ElementShape_E | EntityShape, |
unsigned long | IntegrandOrder, | ||
unsigned long & | NumberIndices | ||
) |
Get Indices for tensorization of numerical integration coordinates and weights. This method assumes that the indices have been already calculated by the procedure RunNumericalIntegration.
[in] | EntityShape | - entity shape for which the integration points must be returned. For example, the element shape is SQUARE, but only the edge points are required. In this case, EntityShape must be LINE. |
[in] | IntegrandOrder | - order of the integrand. Based on this value, the number of integration points is calculated for the quadrature rule stored in the class data |
[out] | NumberIndices | - number of tensorization indices. |
OneIndexTable< unsigned long > & NumericalIntegration::GetIndices | ( | ElementShape_E | ElementShape | ) |
Get Indices for tensorization of numerical integration coordinates and weights. This method assumes that the indices have been already calculated by the procedure RunNumericalIntegration.
[in] | ElementShape | - element shape |
unsigned long * NumericalIntegration::GetIndicesBySet | ( | ElementShape_E | ElemShape, |
unsigned long | SetNumber, | ||
unsigned long & | NumberIndices | ||
) |
Returns the tensor indices. This method assumes that the tensor indices have been already calculated by the procedure RunNumericalIntegration.
[in] | ElemShape | - Element Shape. |
[in] | SetNumber | - the set number. |
[out] | NumberIndices | - number of tensor indices |
double *const NumericalIntegration::GetIntegrationPointsCoords | ( | ElementShape_E | ElementShape, |
ElementShape_E | EntityShape, | ||
unsigned long | IntegrandOrder, | ||
unsigned long & | NumberIntegrationPoints, | ||
unsigned long | LiDirection = 1 |
||
) |
Returns the coordinates of the integration points. The coordinates are stored only for the line elements. For the other shapes, the coordinates are collected from the line coordinates everytime the methods is executed.
[in] | ElementShape | - element shape |
[in] | EntityShape | - entity shape for which the integration points must be returned. For example, the element shape is SQUARE, but only the edge points are required. In this case, EntityShape must be LINE. |
[in] | IntegrandOrder | - order of the integrand. Based on this value, the number of integration points are calculated for the quadrature rule stored in the class data. |
[in] | Coords | - Table that stores the integration points coordinates. |
[out] | NumberIntegrationPoints | - number of integration points |
[in] | LiDirection | - Baricentric direction number. |
double * NumericalIntegration::GetIntegrationPointsCoords | ( | ElementShape_E | ElemShape, |
unsigned long & | NumberCoords, | ||
unsigned long & | NumberIndices, | ||
unsigned long ** | Indices | ||
) |
Returns the coordinates of all integration points. This method assumes that the coordinates have been already calculated by the procedure RunNumericalIntegration.
[in] | ElemShape | - Element Shape. |
[out] | NumberCoords | - number of integration points. |
[out] | NumberIndices | - number of indices of the table. |
[out] | Indices | - indices of table. |
double * NumericalIntegration::GetIntegrationPointsCoordsBySets | ( | ElementShape_E | ElemShape, |
unsigned long | SetNumber, | ||
unsigned long & | NumberIntegrationPoints | ||
) |
Returns the coordinates of the integration points. This method assumes that the coordinates have been already calculated by the procedure RunNumericalIntegration.
[in] | ElemShape | - Element Shape. |
[in] | SetNumber | - the set number. |
[out] | NumberIntegrationPoints | - number of integration points |
long NumericalIntegration::GetIntegrationPointsSetNumber | ( | ElementShape_E | ElemShape, |
NumericalIntegrationAttributes_S & | NIAttributes, | ||
unsigned long | IntegrandOrder | ||
) |
Returns the set number of the integration points for the given order of the integrand according to element shape informed.
[in] | ElemShape | - Element Shape. |
[in] | NIAttributes | - parameters of the quadrature rule. |
[in] | IntegrandOrder | - Order of the integrand. Based on this value, the number of integration points are calculated for the quadrature rule stored in the class data. |
double *const NumericalIntegration::GetIntegrationPointsWeights | ( | ElementShape_E | ElementShape, |
ElementShape_E | EntityShape, | ||
unsigned long | IntegrandOrder, | ||
unsigned long & | NumberIntegrationPoints, | ||
unsigned long | LiDirection = 1 |
||
) |
Returns the weights of the integration points. This method assumes that the weights have been already calculated by the procedure RunNumericalIntegration.
[in] | ElementShape | - element shape |
[in] | EntityShape | - entity shape for which the integration points must be returned. For example, the element shape is SQUARE, but only the edge points are required. In this case, EntityShape must be LINE. |
[in] | IntegrandOrder | - order of the integrand. Based on this value, the number of integration points are calculated for the quadrature rule stored in the class data. |
[out] | NumberIntegrationPoints | - number of integration points |
[in] | LiDirection | - Baricentric direction number. |
double * NumericalIntegration::GetIntegrationPointsWeights | ( | ElementShape_E | ElemShape, |
unsigned long & | NumberWeights, | ||
unsigned long & | NumberIndices, | ||
unsigned long ** | Indices | ||
) |
Returns the weights of all integration points. This method assumes that the weights have been already calculated by the procedure RunNumericalIntegration.
[in] | ElemShape | - Element Shape. |
[out] | NumberWeights | - number of integration points |
[out] | NumberIndices | - size of array indices of weights table. |
[out] | Indices | - indices of table. |
double * NumericalIntegration::GetIntegrationPointsWeightsBySets | ( | ElementShape_E | ElemShape, |
unsigned long | SetNumber, | ||
unsigned long & | NumberIntegrationPoints | ||
) |
Returns the weights of the integration points. This method assumes that the weights have been already calculated by the procedure RunNumericalIntegration.
[in] | ElemShape | - Element Shape. |
[in] | SetNumber | - the set number. |
[out] | NumberIntegrationPoints | - number of integration points |
LineNumericalIntegration & NumericalIntegration::GetLineNumericalIntegration | ( | ElementShape_E | ElemShape, |
unsigned long | LiDirection = 1 |
||
) |
Returns the LineNumericalIntegration reference according to element shape and baricentric direction number to (triangle and tetrahedron).
[in] | ElemShape | - Element Shape |
[in] | LiDirection | - Baricentric direction number. |
unsigned long NumericalIntegration::GetMaxNumberIntegrationPoints | ( | ElementShape_E | ElemShape | ) |
Returns the maximum number of integration points. Using line numerical integration of each element.
[in] | ElemShape | - element shape. |
unsigned long NumericalIntegration::GetMaxNumberIntegrationPointsSets | ( | ElementShape_E | ElemShape | ) |
Returns the maximum number of sets of integration points.
[in] | ElemShape | - element shape. |
unsigned long NumericalIntegration::GetMaxPolyOrder | ( | ElementShape_E | ElemShape | ) |
Returns the maximum polynomial order according to element shape informed.
[in] | ElemShape | - Element Shape. |
unsigned long NumericalIntegration::GetNumberIntegrationPoints | ( | ElementShape_E | ElementShape, |
ElementShape_E | EntityShape, | ||
unsigned long | IntegrandOrder, | ||
long & | IntegrationPointsSetNumber | ||
) |
Returns the number of integration points given by integrand order for the quadrature rule stored in the class. Returns also the number of the set which stores the points.
[in] | ElementShape | - element shape |
[in] | EntityShape | - entity shape for which the integration points must be returned. For example, the element shape is SQUARE, but only the edge points are required. In this case, EntityShape must be LINE. |
[in] | IntegrandOrder | - order of the integrand. Based on this value, the number of integration points is calculated for the quadrature rule stored in the class data. |
[out] | IntegrationPointsSetNumber | - number of the integration point set which stores the coordinates. |
unsigned long NumericalIntegration::GetNumberIntegrationPoints | ( | ElementShape_E | ElemShape, |
ElementShape_E | EntityShape, | ||
long | IntegrationPointsSetNumber, | ||
unsigned long | LiDirection = 1 |
||
) |
Returns the number of integration points for a given set number according to element shape informed.
[in] | ElemShape | - Element Shape. |
[in] | EntityShape | - entity shape for which the integration points must be returned. For example, the element shape is SQUARE, but only the edge points are required. In this case, EntityShape must be LINE. |
[in] | IntegrationPointsSetNumber | - number of the integration point set which stores the coordinates. |
[in] | LiDirection | - Baricentric direction number used to triangle and tetrahedron |
unsigned long NumericalIntegration::GetNumberIntegrationPointsSets | ( | ElementShape_E | EntityShape | ) |
Returns the number of sets of integration points calculated using the polynomial and integration orders.
[in] | EntityShape | - element shape |
returns the numerical integration attributes.
unsigned long NumericalIntegration::GetTotalNumberIntegrationPoints | ( | ElementShape_E | ElemShape | ) |
Returns the total number of integration points according to element shape informed.
[in] | ElemShape | - Element Shape. |
NumericalIntegration::operator HexaNumericalIntegration & | ( | ) |
Cast operator for the reference of the class attribute "HexaNI".
NumericalIntegration::operator LineNumericalIntegration & | ( | ) |
Cast operator for the reference of the class attribute "LineNI".
NumericalIntegration::operator NumericalIntegrationAttributes_S & | ( | ) |
Cast operator for the reference of the class attribute "NIAttributes".
NumericalIntegration::operator SquareNumericalIntegration & | ( | ) |
Cast operator for the reference of the class attribute "SquareNI".
NumericalIntegration::operator TetraNumericalIntegration & | ( | ) |
Cast operator for the reference of the class attribute "TetraNI".
NumericalIntegration::operator TriangleNumericalIntegration & | ( | ) |
Cast operator for the reference of the class attribute "TriangleNI".
NumericalIntegration & NumericalIntegration::operator= | ( | NumericalIntegration & | Instance | ) |
Copies the contents of instance to the object.
[in] | Instance | - instance of the NumericalIntegration class |
void NumericalIntegration::Print | ( | FILE * | File, |
ElementShape_E | ElementShape, | ||
ElementShape_E | EntityShape | ||
) |
: Prints the numerical integration attributes and values to the given ascii file.
[in] | File | - pointer to the ascii file |
[in] | ElementShape | - Element shape. |
[in] | EntityShape | - entity shape for which the integration points must be returned. For example, the element shape is SQUARE, but only the edge points are required. In this case, EntityShape must be LINE. |
void NumericalIntegration::Read | ( | FILE * | DefFile, |
unsigned long | GroupNumber, | ||
ElementShape_E | ElementShape, | ||
unsigned long | MaxOrder | ||
) |
Reads the numerical integration attributes from the .def ascii file.
[in] | DEFFile | - pointer to the .def ascii file. |
[in] | GroupNumber | - group number. |
[in] | ElementShape | - element shape. |
[in] | MaxOrder | - maximum polynomial order. |
void NumericalIntegration::RunNumericalIntegration | ( | ElementShape_E | ElementShape, |
ElementShape_E | EntityShape, | ||
BuiltInArray< unsigned long > & | PolyOrder | ||
) |
Calculates the tensorization indices and the weigths for numerical integration of the polynomial orders given in the input parameter PolyOrder and integrand orders calculated by [1,IOFactor] * P..
[in] | ElementShape | - element shape |
[in] | EntityShape | - entity shape for which the integration weights and points must be calculated. For example, the element shape is SQUARE, but only the edge points are required. In this case, EntityShape must be LINE. |
[in] | PolyOrder | - element orders for a p-nonuniform mesh in an increasing sequence. For a p-uniform, this array stores only one value. |
void NumericalIntegration::SetMaxPolyOrder | ( | ElementShape_E | ElemShape, |
unsigned long | MaxOrder | ||
) |
Sets the maximum polynomial according to element shape.
[in] | ElemShape | - ElementShape_E. |
[in] | MaxOrder | - maximum polynomial order. |
void NumericalIntegration::SetNumberCoordsWeights | ( | ElementShape_E | ElemShape, |
unsigned long | NumberRow, | ||
unsigned long | NumberData | ||
) |
Sets the coordinates and weights table according to element shape informed.
[in] | ElemShape | - Element Shape. |
[in] | NumberRow | - Number of table row. |
[in] | NumberData | - Number of table coefficients. |
void NumericalIntegration::SetNumberIntegrationPointsSets | ( | ElementShape_E | ElemShape, |
NumericalIntegrationAttributes_S & | NIAttributes, | ||
BuiltInArray< unsigned long > & | PolyOrder | ||
) |
Sets the maximum number of sets of integration points.
[in] | ElemShape | - Element Shape. |
[in] | NIAttributes | - parameters of the quadrature rule. |
[in] | PolyOrder | - element orders for a p-nonuniform mesh in an increasing sequence. For a p-uniform, this array stores only one value. |
void NumericalIntegration::SetNumericalIntegrationAttributes | ( | NumericalIntegrationAttributes_S & | NumericalIntegrationAttributes | ) |
Setsl class attributes input in an instance of the NumericalIntegrationAttributes_S instance.
[in] | NumericalIntegrationAttributes | - parameters of numerical integration |
void NumericalIntegration::SetNumericalIntegrationAttributes | ( | ElementShape_E | ElementShape, |
QuadCollocType_E | QuadratureType, | ||
unsigned long | Alpha, | ||
unsigned long | Beta, | ||
unsigned long | MaxPolyOrder, | ||
unsigned long | IntegrandOrderFactor = 2 |
||
) |
Sets the class attributes as input parameters to be stored in the NumericalIntegrationAttributes_S instance.
[in] | ElementShaper,: | element shape |
[in] | QuadratureType,: | specifies the quadrature type for numerical integration |
[in] | Alpha,Beta,: | specifies the weights for the calculation of the weights and integration points |
[in] | MaxPolyOrder,: | maximum polynomial order |
[in] | IntegrandOrderFactor,: | integrand order factor that it is multiplied by the the polynomial order P to obtain the integrand order. The default value is 2 which means that the integration points will be calculated for orders P and 2P. |