hp2FEM  0.1
Public Member Functions | Protected Attributes
LineShapeFunctions Class Reference

Calculates the shape functions and their derivatives for line elements. More...

#include <LineShapeFunctions.h>

Collaboration diagram for LineShapeFunctions:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LineShapeFunctions ()
 Default constructor.
 LineShapeFunctions (unsigned long MaxPolyOrder)
 Constructor with parameter.
 LineShapeFunctions (LineShapeFunctions &Instance)
 Copy-initializer constructor.
 ~LineShapeFunctions ()
 Class destructor.
LineShapeFunctionsoperator= (LineShapeFunctions &Instance)
 Assigns one Instance to the current bject.
 operator BuiltInArray< unsigned long > & ()
 Cast operator for the reference of the class attribute "ElemsOrder".
 operator Polynomials1D & ()
 Cast operator for the reference of the class attribute "Poly1D".
void SetMaxPolyOrder (unsigned long MaxPolyOrder)
 Sets the maximum polynomial order for the shape functions.
unsigned long GetMaxPolyOrder ()
 Returns the maximum polynomial order for the line shape functions.
long GetShapeFunctionSetNumber (unsigned long PolyOrder)
 Returns the set number of the shape functions values for the given a polynomial order.
unsigned long GetNumberSFPointsSets ()
 Returns the number of shape functions points sets stored in the class.
BuiltInArray< unsigned long > & GetNumberIntegrationPoints ()
 Returns the Number of integration points applied on each shape functions for each polynomial order.
BuiltInArray< unsigned long > & GetNumberCollocationPoints ()
 Returns the Number of collocation points applied on each shape functions for each polynomial order.
double *const GetShapeFunctions (long SFSetNumber, long IPSetNumber, IPCP_E IPCPFlag, unsigned long &NumberSFValues)
 Returns the shape functions for the line element given the polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions have been already calculated by the method RunShapeFunctions.
double *const GetShapeFunctions (long SFSetNumber, long IPSetNumber, IPCP_E IPCPFlag, unsigned long &TotalNumberSFValues, unsigned long &NumberSFValues, unsigned long &NumberPoints)
 Returns the shape functions for the line element given the polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions have been already calculated by the method RunShapeFunctions.
double *const GetdShapeFunctions (long SFSetNumber, long IPSetNumber, IPCP_E IPCPFlag, unsigned long &NumberSFValues)
 Returns the shape functions for the line element given the polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions have been already calculated by the method RunShapeFunctions.
unsigned long GetTotalNumberShapeFunctionsValues (IPCP_E IPCPFlags)
 Returns the total number of shape functions values.
void RunShapeFunctions (ShapeFunctionsAttributes_S SFunctions, QuadCollocType_E QuadType, QuadCollocType_E CollocType, LineNumericalIntegration &LineNI, LineCollocationPoints &LineCP, BuiltInArray< unsigned long > &PolyOrder, char CoordType= 'x')
 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)
 : Prints the lines shape functions attributes and values to the given ascii file.

Protected Attributes

Polynomials1D Poly1D
 Poly1D - instance of the Polynomials1D class for the polynomials basis.
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 shape functions derivative values for each polynomial order and sets of integration points.
TwoIndexTable< double > SFCP
 Table that stores the shape functions values for each polynomial order and sets of collocation points.
TwoIndexTable< double > dSFCP
 Table that stores the shape functions deriavtive values for each polynomial order and sets of collocation points.
unsigned long Pmax
 Maximum polynomial order.
unsigned long NumbSFSets
 Number of sets of collocation points for the shape functions values.
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.
BuiltInArray< long > SFSets
 This array has size for the maximum number of collocatiotion points for shape functions values, which it is calculated as Pmax + 1. The array stores for each number of points, the row number of the tables of coords storing the points. As the array is allocated for the maximum number of points, some positions may not be used. In this case, this array will store -1.
BuiltInArray< unsigned long > ElemsOrder
 Elements order.

Detailed Description

Calculates the shape functions and their derivatives for line elements.

Note:
The class attributes is able to store the local shape functions and their derivatives on integration and collocation points avoiding unnecessary calculation
Author:
Marco Lucio Bittencourt/ Fabiano Fernandes Bargos
Date:
March/14/2011

Constructor & Destructor Documentation

LineShapeFunctions::LineShapeFunctions ( unsigned long  MaxPolyOrder)

Constructor with parameter.

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

Copy-initializer constructor.

Returns:
Reference for instance of the LineShapeFunctions class

Member Function Documentation

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

Returns the shape functions for the line element given the polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions have been already calculated by the method RunShapeFunctions.

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

Returns the maximum polynomial order for the line shape functions.

Returns:
Maximum polynomial order as an unsigned long.

Returns the Number of collocation points applied on each shape functions for each polynomial order.

Returns:
an unsigned long type with the number of collocation points for each polynomial order.

Returns the Number of integration points applied on each shape functions for each polynomial order.

Returns:
an unsigned long type with the number of integration points for each polynomial order.

Returns the number of shape functions points sets stored in the class.

Returns:
an unsigned long type with the number of shape functions points sets.
double *const LineShapeFunctions::GetShapeFunctions ( long  SFSetNumber,
long  IPSetNumber,
IPCP_E  IPCPFlag,
unsigned long &  NumberSFValues 
)

Returns the shape functions for the line element given the polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions have been already calculated by the method RunShapeFunctions.

Parameters:
[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 line shape functions
double *const LineShapeFunctions::GetShapeFunctions ( long  SFSetNumber,
long  IPSetNumber,
IPCP_E  IPCPFlag,
unsigned long &  TotalNumberSFValues,
unsigned long &  NumberSFValues,
unsigned long &  NumberPoints 
)

Returns the shape functions for the line element given the polynomial order and integrand order calculated on the integration or collocation points. This method assumes that the values of the shape functions have been already calculated by the method RunShapeFunctions.

Parameters:
[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 line shape functions
long LineShapeFunctions::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.
unsigned long LineShapeFunctions::GetTotalNumberShapeFunctionsValues ( IPCP_E  IPCPFlags)

Returns the total number of shape functions values.

Parameters:
[in]IPCPFlag- specifies if the shape functions are to be returned on the integration (IP) or collocation (CP) points
Returns:
an unsigned long with value the total number of shape functions values.
LineShapeFunctions::operator BuiltInArray< unsigned long > & ( )

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

Returns:
BuiltInArray<unsigned long>& - reference to class attribute "ElemsOrder"
LineShapeFunctions::operator Polynomials1D & ( )

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

Returns:
Polynomials1D& - reference to class attribute "Poly1D"
LineShapeFunctions & LineShapeFunctions::operator= ( LineShapeFunctions Instance)

Assigns one Instance to the current bject.

Returns:
Reference for instance of the LineShapeFunctions class
void LineShapeFunctions::Print ( FILE *  File)

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

Parameters:
[in]File- pointer to the ascii file
[in]ElementShape- element shape
void LineShapeFunctions::RunShapeFunctions ( ShapeFunctionsAttributes_S  SFunctions,
QuadCollocType_E  QuadType,
QuadCollocType_E  CollocType,
LineNumericalIntegration LineNI,
LineCollocationPoints LineCP,
BuiltInArray< unsigned long > &  PolyOrder,
char  CoordType = 'x' 
)

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]SFunctions- attributes of the shape functions
[in]QuadType,:specifies the quadrature type for numerical integration
[in]CollocationType,:specifies the quadrature type for the collocation points
[in]LineNI- instance of the LineNumericalIntegration class
[in]LineCP- instance of the LineCollocationPoints class
[in]PolyOrder- element orders for a p-nonuniform mesh in a increasing sequence. For a p-uniform, thsi array stores only one value
[in]CoordType- 'L' for natural coordinates in [0,1]; 'x'' for local coordinates in [-1,1]

notes: When the for-loop index (i,j,k, ...) is used for indexing pointers it's is important to define those indexes as global in order to avoid to miss the index value when we have a "if" inside of the for-loop. It's important also the for-loop index type to be the same of the limit variable (for (i = 0; i < N; ++i) - i and N have to be of the same type). i = unsigned long and N long may cause trouble.

Fabiano F. Bargos. June/9/2011

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 LineShapeFunctions::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