hp2FEM  0.1
Public Member Functions | Protected Attributes
SquareNumericalIntegration Class Reference

Calculates the coordinates and weights for numerical integration of the square element. More...

#include <SquareNumericalIntegration.h>

Collaboration diagram for SquareNumericalIntegration:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SquareNumericalIntegration ()
 Default constructor.
 SquareNumericalIntegration (SquareNumericalIntegration &Instance)
 Copy-initializer constructor.
 ~SquareNumericalIntegration ()
 Class destructor.
SquareNumericalIntegrationoperator= (SquareNumericalIntegration &Instance)
 Copies the contents of instance to the object.
 operator LineNumericalIntegration & ()
 Cast operator for the reference of the class attribute "LineNI".
void SetMaxPolyOrder (unsigned long MaxPolyOrder)
 Sets the maximum polynomial order.
void SetNumberCoordsWeights (unsigned long NumberRow, unsigned long NumberData)
 Sets the coordinates and weights table for the specific SquareNumericalIntegration allocated.
unsigned long GetMaxPolyOrder ()
 Returns the maximum polynomial order.
LineNumericalIntegrationGetLineNumericalIntegration ()
 Returns the LineNI attribute of the SquareNumericalIntegration class.
unsigned long GetNumberIntegrationPointsSets ()
 Returns the number of sets of integration points calculated using the polynomial and integration orders.
unsigned long GetMaxNumberIntegrationPointsSets ()
 Returns the maximum number of sets of integration points according to LineNI class attribute.
long GetIntegrationPointsSetNumber (NumericalIntegrationAttributes_S &NIAttributes, unsigned long IntegrandOrder)
 Returns the set number of the integration points for the given order of the integrand.
unsigned long GetNumberIntegrationPoints (NumericalIntegrationAttributes_S &NIAttributes, 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 EntityShape, long IntegrationPointsSetNumber)
 Returns the number of integration points for a given set number.
unsigned long GetTotalNumberIntegrationPoints ()
 Returns the total number of integration points.
double *const GetIntegrationPointsCoords (NumericalIntegrationAttributes_S &NIAttributes, ElementShape_E EntityShape, unsigned long IntegrandOrder, unsigned long &NumberIntegrationPoints)
 Returns the coordinates of the integration points. In the case of Shape=SQUARE, this method collects the coordinates for the square element from the coordinates of the line everytime the method is executed.
double *const GetIntegrationPointsWeights (NumericalIntegrationAttributes_S &NIAttributes, ElementShape_E EntityShape, unsigned long IntegrandOrder, unsigned long &NumberIntegrationPoints)
 Returns the weights of the integration points. This method assumes that the weights have been already calculated by the procedure RunNumericalIntegration.
unsigned long *const GetIndices (NumericalIntegrationAttributes_S &NIAttributes, 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 ()
 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 (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.
void RunNumericalIntegration (NumericalIntegrationAttributes_S &NIAttributes, 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] * PolyOrder.
void Print (FILE *File, ElementShape_E EntityShape)
 : Prints the numerical integration attributes and values to the given ascii file.

Protected Attributes

LineNumericalIntegration LineNI
 Instance of the LineNumericalIntegration class used to store the line coordinates and weights.
OneIndexTable< double > Weights
 Table to store the weights for the square element for each integrand order calculated based on the polynomial orders of the mesh elements.
OneIndexTable< double > Coords
 Table that stores the integration points coordinates for squares.
OneIndexTable< unsigned long > TensorIndices
 Table to store the tensorization indices p and q for every integration point of the square element and polynomial order.
unsigned long Pmax
 Maximum polynomial order.

Detailed Description

Calculates the coordinates and weights for numerical integration of the square element.

Author:
Fabiano Fernandes Bargos/Marco Lcio Bittencourt
Date:
March/15/2011
Note:
Only the tensorization indices and weights are stored. The coordinates are calculated only if they are necessary. There is not variable to store the coordinates for squares, but only for lines.

Constructor & Destructor Documentation

Copy-initializer constructor.

Parameters:
[in]Instance- instance of the SquareNumericalIntegration class

Member Function Documentation

unsigned long *const SquareNumericalIntegration::GetIndices ( NumericalIntegrationAttributes_S NIAttributes,
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.

Parameters:
[in]NIAttributes- parameters of the quadrature rule.
[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.
Returns:
Pointer to the array of indices

Get Indices for tensorization of numerical integration coordinates and weights. This method assumes that the indices have been already calculated by the procedure RunNumericalIntegration.

Returns:
Pointer to the array of tensor indices.
unsigned long * SquareNumericalIntegration::GetIndicesBySet ( 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.

Parameters:
[in]SetNumber- the set number.
[out]NumberIndices- number of tensor indices
Returns:
Pointer to the array with the tensor indices.
double *const SquareNumericalIntegration::GetIntegrationPointsCoords ( NumericalIntegrationAttributes_S NIAttributes,
ElementShape_E  EntityShape,
unsigned long  IntegrandOrder,
unsigned long &  NumberIntegrationPoints 
)

Returns the coordinates of the integration points. In the case of Shape=SQUARE, this method collects the coordinates for the square element from the coordinates of the line everytime the method is executed.

Parameters:
[in]NIAttributes- parameters of the quadrature rule.
[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
Returns:
Pointer to the array with the coordinates.
long SquareNumericalIntegration::GetIntegrationPointsSetNumber ( NumericalIntegrationAttributes_S NIAttributes,
unsigned long  IntegrandOrder 
)

Returns the set number of the integration points for the given order of the integrand.

Parameters:
[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.
Returns:
a long type with the set number value.
double *const SquareNumericalIntegration::GetIntegrationPointsWeights ( NumericalIntegrationAttributes_S NIAttributes,
ElementShape_E  EntityShape,
unsigned long  IntegrandOrder,
unsigned long &  NumberIntegrationPoints 
)

Returns the weights of the integration points. This method assumes that the weights have been already calculated by the procedure RunNumericalIntegration.

Parameters:
[in]NIAttributes- parameters of the quadrature rule.
[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
Returns:
Pointer to the array with the weights

Returns the LineNI attribute of the SquareNumericalIntegration class.

Returns:
LineNumericalIntegration& - reference to the class LineNumericalIntegration.

Returns the maximum number of sets of integration points according to LineNI class attribute.

Returns:
the maximum number of sets as an unsigned long.

Returns the maximum polynomial order.

Returns:
Maximum polynomial order as an unsigned long.
unsigned long SquareNumericalIntegration::GetNumberIntegrationPoints ( NumericalIntegrationAttributes_S NIAttributes,
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.

Parameters:
[in]NIAttributes- parameters of the quadrature rule.
[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.
Returns:
Number of integration points as an unsigned long.
unsigned long SquareNumericalIntegration::GetNumberIntegrationPoints ( ElementShape_E  EntityShape,
long  IntegrationPointsSetNumber 
)

Returns the number of integration points for a given set number.

Parameters:
[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.
Returns:
the number of integration points for a given set number as an unsigned long. If the set number is not used, returns 0.

Returns the number of sets of integration points calculated using the polynomial and integration orders.

Returns:
Number of sets as an unsigend long.

Returns the total number of integration points.

Returns:
an unsigned long with the total number of integration points value.
SquareNumericalIntegration::operator LineNumericalIntegration & ( )

Cast operator for the reference of the class attribute "LineNI".

Returns:
reference to the class attribute "LineNI" of type LineNumericalIntegration
SquareNumericalIntegration & SquareNumericalIntegration::operator= ( SquareNumericalIntegration Instance)

Copies the contents of instance to the object.

Parameters:
[in]Instance- instance of the SquareNumericalIntegration class
Returns:
Instance of the SquareNumericalIntegration class
void SquareNumericalIntegration::Print ( FILE *  File,
ElementShape_E  EntityShape 
)

: Prints the numerical integration attributes and values to the given ascii file.

Parameters:
[in]File- pointer to the ascii file
[in]EntityShape- entity shape for which the attributes of the integration points must be printed.
void SquareNumericalIntegration::RunNumericalIntegration ( NumericalIntegrationAttributes_S NIAttributes,
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] * PolyOrder.

Parameters:
[in]NIAttributes- parameters of the quadrature rule.
[in]EntityShape- entity shape for which the weights and coordinates of the integration 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 SquareNumericalIntegration::SetMaxPolyOrder ( unsigned long  MaxPolyOrder)

Sets the maximum polynomial order.

Parameters:
[in]MaxPolyOrder- maximum polynomial order.
void SquareNumericalIntegration::SetNumberCoordsWeights ( unsigned long  NumberRow,
unsigned long  NumberData 
)

Sets the coordinates and weights table for the specific SquareNumericalIntegration allocated.

Parameters:
[in]NumberRow- Number of table row.
[in]NumberData- Number of table coefficients.

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Friends Defines