hp2FEM  0.1
Public Member Functions | Protected Attributes
ElementElementTable Class Reference

Class thatbuild a table that store for each the element its neighbour elements. More...

#include <ElementElementTable.h>

Collaboration diagram for ElementElementTable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ElementElementTable ()
 Default constructor (without parameters).
 ElementElementTable (unsigned long TotalNumberElements, unsigned long Dimension)
 Specialized constructor: builds the element-elements topological table for the FE model.
 ElementElementTable (ElementElementTable &Instance)
 Copies the contents of instance to the object.
 ~ElementElementTable ()
 Destructor.
ElementElementTableoperator= (ElementElementTable &Instance)
 Copies the contents of Instance for the object.
void BuildElementElementTable (FEGroups &Groups, NodeElementTable &NoElemTable, unsigned long Dimension)
 Builds the element-element topological table for all finite element groups.
unsigned long GetNumberNeighbours (unsigned long ElementGlobalNumber)
 Returns the number of neighbours for a given element.
long *const GetNeighbourElements (unsigned long ElementGlobalNumber, unsigned long &NumberNeighbourElements)
 Returns a list of elements that are neighbours to a given element.
void Print (FILE *File, char *Message="")
 Prints the parameters of the FE groups to an ASCII file.
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 (written using the Save method) from a binary file.
void Restore (FILE *File)
 Restores class data (written using Save()) form a binary file.
void Free ()
 Releases the physical memory allocate for the groups.

Protected Attributes

OneIndexTable< long > ElemElemTable
 Stores the element neighbourhood for 1D models.

Detailed Description

Class thatbuild a table that store for each the element its neighbour elements.

Author:
Fabiano Fernandes Bargos
Date:
March/02/2011

Constructor & Destructor Documentation

ElementElementTable::ElementElementTable ( unsigned long  TotalNumberElements,
unsigned long  Dimension 
)

Specialized constructor: builds the element-elements topological table for the FE model.

Parameters:
[in]TotalNumberElements- total number of elements of the finite element mesh.
[in]Dimension- the dimension of the model.

Copies the contents of instance to the object.

Parameters:
[in]Instance- instance of the ElementElementTable class.

Member Function Documentation

void ElementElementTable::BuildElementElementTable ( FEGroups Groups,
NodeElementTable NoElemTable,
unsigned long  Dimension 
)

Builds the element-element topological table for all finite element groups.

Parameters:
[in]Groups- instance of the FEGroups class whichStores information for the finite element groups for the discrete model.
[in]NoElemTable- instance of the NodeElementTable.
[in]Dimension- the dimension of the model.

Releases the physical memory allocate for the groups.

Note:
Statically allocated variables are set to zero.
long *const ElementElementTable::GetNeighbourElements ( unsigned long  ElementGlobalNumber,
unsigned long &  NumberNeighbourElements 
)

Returns a list of elements that are neighbours to a given element.

Parameters:
[in]ElementGlobalNumber- the global number of the element for which the neighbour elements are returned.
[out]NumberNeighbourElements- number of neighbour elements for the given element number.
Returns:
Pointer to an array of elements.
unsigned long ElementElementTable::GetNumberNeighbours ( unsigned long  ElementGlobalNumber)

Returns the number of neighbours for a given element.

Parameters:
[in]ElementGlobalNumber- the global number of the element for which desires to know the number of neighbours.
ElementElementTable & ElementElementTable::operator= ( ElementElementTable Instance)

Copies the contents of Instance for the object.

Parameters:
[in]Instance- instance of ElementElementTable.
Returns:
Reference of the current object.
void ElementElementTable::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 ElementElementTable::Restore ( char *  Tabname,
int  Version,
char *  Filename 
)

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

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 ElementElementTable::Restore ( FILE *  File)

Restores class data (written using Save()) form a binary file.

Parameters:
[in]File- pointer to the binary file.
void ElementElementTable::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 ElementElementTable::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.

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