hp2FEM  0.1
Public Member Functions | Public Attributes | Protected Attributes
FEGroups Class Reference

Stores information for the finite element groups for the discrete model. A group collects a set of element with the same element shape, interpolation parameters and dofs. More...

#include <FEGroups.h>

Collaboration diagram for FEGroups:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FEGroups ()
 Default constructor.
 FEGroups (unsigned long TotalNumberElements, unsigned long NumberGroups, unsigned long MaxSolutionOrder, unsigned long MaxMappingOrder)
 Constructor that sets attributes of the finite element mesh.
 FEGroups (FEGroups &Instance)
 Copy-initializer constructor. Copies the contents of Instance for the object.
 ~FEGroups ()
 Destructor.
FEGroupsoperator= (FEGroups &Instance)
 Copies the contents of Instance for the object.
FiniteElementGroupoperator[] (unsigned long GroupNumber)
 Returns a reference to the finite element group given in GroupNumber,.
unsigned long GetNumberFEGroups ()
 Returns the number of finite element groups.
unsigned long GetTotalNumberElements ()
 Returns the total number of finite elements in the model.
unsigned long GetTotalNumberDOFs ()
 Returns the total number of DOFs.
void SetMaxSolutionOrder (unsigned long MaxPolyOrder)
 Sets the maximum solution order of the FE model.
unsigned long GetMaxSolutionOrder ()
 Returns the maximum solution element order of the FE model.
void SetMaxMappingOrder (unsigned long MaxPolyOrder)
 Sets the maximum mapping order of the FE model.
unsigned long GetMaxMappingOrder ()
 Returns the maximum mapping element order of the FE model.
unsigned long GetMaxNumberDOFsGroup (unsigned short &MaxNumPrimDOFs)
 Calculates the group with the maximum number of DOFs to allocate the element matrices.
unsigned long LocalToGlobalNumbering (unsigned long GroupNumber, unsigned long LocalNumber)
 Returns the global number of an element LocalNumber of the group GroupNumber.
unsigned long GlobalToLocalNumbering (unsigned long GlobalNumber, unsigned long &GroupNumber)
 Returns the local number and the group number of a givel global element number.
unsigned long GetGroupNumber (unsigned long Element)
 Returns the group number according to element parameter.
void Save (char *Tabname, int Version, char *Filename)
 Writes class data to a binary database.
void Save (FILE *File)
 Writes class information to a binary file.
void Restore (char *Tabname, int Version, char *Filename)
 Restores class data from a binary database written using the Save method.
void Restore (FILE *File)
 Restores class data (written using the Save method) from a binary file.
void Read (FILE *FEMFile, FILE *DEFFile, DOFs &DOFsNames, unsigned long Dimension, unsigned long TheoSolIntegOrder=0)
 Reads the ASCII files with the group parameters.
void Print (FILE *File, char *Message="")
 Prints the parameters of the FE groups to an ASCII file.
void Free ()
 Releases the physical memory allocate for the groups.

Public Attributes

FiniteElementGrouptheFiniteElementGroup

Protected Attributes

Array< FiniteElementGroupGroups
 Array of domain finite element groups.
unsigned long TotNumElem
 Total number of elements in the domain of the discrete model.
unsigned long NmbrGrps
 Stores the number of elements groups of the discrete model.
unsigned long MaxSolOrder
 Stores the maximmum element order for the solution mesh for the discrete model.
unsigned long MaxMapOrder
 Stores the maximmum element order for the mapping mesh for the discrete model.
PostProcessorProgram_E PostProcProgram
 the name of the program used to the post processing mesh.

Detailed Description

Stores information for the finite element groups for the discrete model. A group collects a set of element with the same element shape, interpolation parameters and dofs.

Note:
The majority of the operations of this class are simple calls FiniteElementGroup operations. The same operations could be done using the operator[], which returns a reference to the desired finite element group.
Author:
Marco Lucio Bittencourt/ Fabiano Fernandes Bargos Gilberto Luis Valente da Costa
Date:
March/28/2011

Constructor & Destructor Documentation

FEGroups::FEGroups ( unsigned long  TotalNumberElements,
unsigned long  NumberGroups,
unsigned long  MaxSolutionOrder,
unsigned long  MaxMappingOrder 
)

Constructor that sets attributes of the finite element mesh.

Parameters:
[in]TotalNumberElements- total number of elements of the finite element mesh.
[in]NumberGroups- number of foninite element groups.
[in]MaxSolutionOrder- maximum polynomial order for the solution.
[in]MaxMappingOrder- maximum polynomial order for the element mapping.
FEGroups::FEGroups ( FEGroups Instance)

Copy-initializer constructor. Copies the contents of Instance for the object.

Parameters:
[in]Instance- instance of Mesh.
Returns:
Reference of the current object.

Member Function Documentation

void FEGroups::Free ( )

Releases the physical memory allocate for the groups.

Note:
Statically allocated variables are set to zero.
unsigned long FEGroups::GetGroupNumber ( unsigned long  Element)

Returns the group number according to element parameter.

Parameters:
[in]Element- The element number.
Returns:
an unsigned long type with the group where the element was found.
unsigned long FEGroups::GetMaxMappingOrder ( )

Returns the maximum mapping element order of the FE model.

Returns:
Maximum mapping order.
unsigned long FEGroups::GetMaxNumberDOFsGroup ( unsigned short &  MaxNumPrimDOFs)

Calculates the group with the maximum number of DOFs to allocate the element matrices.

Parameters:
[out]-MaxNumPrimDOFs - Maximum Number of Primary DOFs.
unsigned long FEGroups::GetMaxSolutionOrder ( )

Returns the maximum solution element order of the FE model.

Returns:
Maximum solution order.
unsigned long FEGroups::GetNumberFEGroups ( )

Returns the number of finite element groups.

Returns:
Number of groups.
unsigned long FEGroups::GetTotalNumberDOFs ( )

Returns the total number of DOFs.

Returns:
Total number of degrees of freedom.

Returns the total number of finite elements in the model.

Returns:
Total number of elements.
unsigned long FEGroups::GlobalToLocalNumbering ( unsigned long  GlobalNumber,
unsigned long &  GroupNumber 
)

Returns the local number and the group number of a givel global element number.

Parameters:
[in]GlobalNumber- global element number starting at zero.
[out]GroupNumber- group that the element belongs to.
Returns:
Local element number starting at zero.
unsigned long FEGroups::LocalToGlobalNumbering ( unsigned long  GroupNumber,
unsigned long  LocalNumber 
)

Returns the global number of an element LocalNumber of the group GroupNumber.

Parameters:
[in]GroupNumber- group that the element belongs to.
[in]LocalNumber- local element number starting at zero.
Returns:
Global element number starting at zero.
FEGroups & FEGroups::operator= ( FEGroups Instance)

Copies the contents of Instance for the object.

Parameters:
[in]Instance- instance of Mesh.
Returns:
Reference of the current object.
FiniteElementGroup & FEGroups::operator[] ( unsigned long  GroupNumber)

Returns a reference to the finite element group given in GroupNumber,.

Parameters:
[in]GroupNumber- number of the finite element group.
Returns:
Reference to the finite element group.
void FEGroups::Print ( FILE *  File,
char *  Message = "" 
)

Prints the parameters of the FE groups to an ASCII file.

Parameters:
[in]File- pointer to the ASCII file.
[in]Message- optional message to be written to the ASCII file.
void FEGroups::Read ( FILE *  FEMFile,
FILE *  DEFFile,
DOFs DOFsNames,
unsigned long  Dimension,
unsigned long  TheoSolIntegOrder = 0 
)

Reads the ASCII files with the group parameters.

Parameters:
[in]FEMFile- pointer to the .fem file with mesh data.
[in]DEFFile- pointer to the .def file with model attributes data.
[in]DOFsNames- Intsance of the DOFs class with the names oe the dofs used in the finite element model.
[in]Dimension- the dimension of element.
[in]TheoSolIntegOrder- integration order for the theoretical solution. The default value -1 means that the theoretical solution is not used fro the current analysis.
void FEGroups::Restore ( char *  Tabname,
int  Version,
char *  Filename 
)

Restores class data from a binary database written using the Save method.

Parameters:
[in]Tabname- name of the database table where the data will be stored.
[in]Version- data version number.
[in]Filename- database prefix filename. Two files will be used: filename.dir and filename.bdg. The first one stores keys to the data stored in the filename.bdg file.
void FEGroups::Restore ( FILE *  File)

Restores class data (written using the Save method) from a binary file.

Parameters:
[in]File- pointer to the binary file.
void FEGroups::Save ( char *  Tabname,
int  Version,
char *  Filename 
)

Writes class data to a binary database.

Parameters:
[in]Tabname- name of the database table where the data will be stored.
[in]Version- data version number.
[in]Filename- database prefix filename. Two files will be used: filename.dir and filename.bdg. The first one stores keys to the data stored in the filename.bdg file.
void FEGroups::Save ( FILE *  File)

Writes class information to a binary file.

Note:
The current object state can be completely recovered when applying the Restore() operation.
Parameters:
[in]File- pointer to the binary file.
void FEGroups::SetMaxMappingOrder ( unsigned long  MaxPolyOrder)

Sets the maximum mapping order of the FE model.

Parameters:
[in]Maximumpolynomial mapping order.
void FEGroups::SetMaxSolutionOrder ( unsigned long  MaxPolyOrder)

Sets the maximum solution order of the FE model.

Parameters:
[in]Maximumpolynomial order.

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