hp2FEM  0.1
Public Member Functions | Protected Attributes
SquareShapeFunctions Class Reference

Calculates the shape functions and their derivatives for square element. The edge shape functions and their derivatives are also stored. More...

#include <SquareShapeFunctions.h>

Collaboration diagram for SquareShapeFunctions:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SquareShapeFunctions ()
 Default constructor.
 SquareShapeFunctions (unsigned long MaxPolyOrder)
 Constructor with parameter.
 SquareShapeFunctions (SquareShapeFunctions &Instance)
 Copy-initializer constructor.
 ~SquareShapeFunctions ()
 Class destructor.
SquareShapeFunctionsoperator= (SquareShapeFunctions &Instance)
 Assigns one Instance to the current object.
void SetMaxPolyOrder (unsigned long MaxPolyOrder)
 Sets the maximum polynomial order for the shape functions.
LineShapeFunctionsGetLineShapeFunctions ()
 Returns the LineSF attribute of the SquareShapefunctions class.
unsigned long GetMaxPolyOrder ()
 Returns the maximum polynomial order for the square 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 *TensorIndicesNI, 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)
 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)
 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)
 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.
unsigned long *const GetIndices (unsigned long PolyOrder, unsigned long &NumberIndices)
 Returns the tensorization indices p and q 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, SquareNumericalIntegration &HexaSquareNI, SquareCollocationPoints &HexaSquareCP, 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 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 and q 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 and q for each node/mode.
LineShapeFunctions LineSF
 Instance of the line shape functions.
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,csi and Ni,eta.
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,csi and Ni,eta.
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.

Detailed Description

Calculates the shape functions and their derivatives for square element. The edge shape functions and their derivatives are also stored.

Author:
Marco Lucio Bittencourt/ Fabiano Fernandes Bargos
Date:
March/14/2011

Constructor & Destructor Documentation

SquareShapeFunctions::SquareShapeFunctions ( unsigned long  MaxPolyOrder)

Constructor with parameter.

Parameters:
[in]MaxPolyOrder- maximum polynomial order for the square shape functions

Copy-initializer constructor.

Returns:
Reference for instance of the LineShapeFunctions class

Member Function Documentation

void SquareShapeFunctions::BuildIndices ( BuiltInArray< unsigned long > &  PolyOrder,
ShapeFunctionsAttributes_S SFAttributes 
)

Protected function for the calculation of the tensorization indices p and q 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.

Parameters:
[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 of the shape functions

Auxiliary variable used in for-loops and also for indexing the pointer pIndTI.

double *const SquareShapeFunctions::GetdShapeFunctions ( ElementShape_E  EntityShape,
long  SFSetNumber,
long  IPSetNumber,
IPCP_E  IPCPFlag,
unsigned long &  NumberSFValues 
)

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.

Parameters:
[in]EntityShape- entity shape for which the interpolation functions and derivatives must be calculated. If it is SQUARE, 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]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.
Returns:
pointer to the double array with the values of the square shape functions stored in the vertex, edge and face sequence
unsigned long *const SquareShapeFunctions::GetIndices ( unsigned long  PolyOrder,
unsigned long &  NumberIndices 
)

Returns the tensorization indices p and q for each node/mode.

Parameters:
[in]PolyOrder- Polynomial order.
[out]NumberIndices- number of tensorization indices.
Returns:
Pointer to the array with the tensorization indices

Get Indices for tensorization of shape functions.

Returns:
a OneIndexTable that store the tensor indices for each polynomial order.

Returns the LineSF attribute of the SquareShapefunctions class.

Returns:
LineShapeFunctions& - reference to the class LineShapeFunctions.

Returns the maximum polynomial order for the square shape functions.

Returns:
Maximum polynomial order as an unsigned long.
void SquareShapeFunctions::GetShapeFunctions ( unsigned long  PolyOrder,
long  SFSetNumber,
long  IPSetNumber,
IPCP_E  IPCPFlag,
unsigned long *  TensorIndicesNI,
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.

Parameters:
[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]TensorIndicesNI- Tensor Indices on square from the integration points.
[in]NumberIndicesNI- Number of tensor indices from the integration points.
[out]ShapeFunctions- the square shape functions.
double *const SquareShapeFunctions::GetShapeFunctions ( ElementShape_E  EntityShape,
long  SFSetNumber,
long  IPSetNumber,
IPCP_E  IPCPFlag,
unsigned long &  NumberSFValues 
)

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.

Parameters:
[in]EntityShape- entity shape for which the interpolation functions and derivatives must be calculated. If it is SQUARE, 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]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.
Returns:
pointer to the double array with the values of the square shape functions stored in the vertex, edge and face sequence
double *const SquareShapeFunctions::GetShapeFunctions ( ElementShape_E  EntityShape,
long  SFSetNumber,
long  IPSetNumber,
IPCP_E  IPCPFlag,
unsigned long &  TotalNumberSFValues,
unsigned long &  NumberSFValues,
unsigned long &  NumberPoints 
)

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.

Parameters:
[in]EntityShape- entity shape for which the interpolation functions and derivatives must be calculated. If it is SQUARE, 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]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.
Returns:
pointer to the double array with the values of the square shape functions stored in the vertex, edge and face sequence
long SquareShapeFunctions::GetShapeFunctionSetNumber ( unsigned long  PolyOrder)

Returns the set number of the shape functions values for the given a polynomial order.

Parameters:
[in]PolyOrder- Polynomial order.
Returns:
a long with the set number value.
SquareShapeFunctions & SquareShapeFunctions::operator= ( SquareShapeFunctions Instance)

Assigns one Instance to the current object.

Returns:
Reference for instance of the LineShapeFunctions class
void SquareShapeFunctions::Print ( FILE *  File,
ElementShape_E  ElementShape,
BuiltInArray< unsigned long > &  PolyOrder 
)

: Prints the shape functions attributes and values to the given ascii file.

Parameters:
[in]File- pointer to the ascii file
[in]ElementShape- if LINE, prints the information for the edge shape functions; if SQUARE, prints the information for the element shape functions
[in]PolyOrder- element orders for a p-nonuniform mesh in a increasing sequence. For a p-uniform, this array stores only one value
void SquareShapeFunctions::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.

Parameters:
[in]EntityShape- entity shape for which the interpolation functions and derivatives must be calculated. If it is SQUARE, 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, this array stores only one value

Total number of shape functions (P1+1)^2 + (P2+1)^2 + ... + (Pn+1)^2.

Number of shape functions on collocation points: ((P1+1)^2)^2*((P1+1)^2)^2 + ((P1+1)^2)^2*((P2+1)^2)^2 + ... + ((Pn+1)^2)^2*((Pn+1)^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.

void SquareShapeFunctions::RunShapeFunctions ( ElementShape_E  EntityShape,
ShapeFunctionsAttributes_S  SFunctions,
NumericalIntegration NI,
collocationPoints CP,
SquareNumericalIntegration HexaSquareNI,
SquareCollocationPoints HexaSquareCP,
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.

Parameters:
[in]EntityShape- entity shape for which the interpolation functions and derivatives must be calculated. If it is SQUARE, 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 theCollocationPoints class
[in]LineNI- instance of the LineNumericalIntegration class. This line is a object internal from another element.
[in]LineCP- instance of the LineCollocationPoints class. This line is a object internal from another element.
[in]PolyOrder- element orders for a p-nonuniform mesh in a increasing sequence. For a p-uniform, this array stores only one value

Total number of shape functions (P1+1)^2 + (P2+1)^2 + ... + (Pn+1)^2.

Number of shape functions on collocation points: ((P1+1)^2)^2*((P1+1)^2)^2 + ((P1+1)^2)^2*((P2+1)^2)^2 + ... + ((Pn+1)^2)^2*((Pn+1)^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.

void SquareShapeFunctions::SetMaxPolyOrder ( unsigned long  MaxPolyOrder)

Sets the maximum polynomial order for the shape functions.

Parameters:
[in]MaxOrder- maximum polynomial order.

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