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

This is a class that reads, stores and manages information for the relation between geometric and mesh entities. More...

#include <GeometryMesh.h>

Collaboration diagram for GeometryMesh:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GeometryMesh ()
 Default constructor.
 GeometryMesh (GeometryMesh &Instance)
 Copy-initializer constructor. Copies the contents of Instance to the object.
 ~GeometryMesh ()
 Destructor.
GeometryMeshoperator= (GeometryMesh &Instance)
 Copies the contents of Instance to the object.
GMEntityGetGMEntity (Entity_E EntityType)
 Returns the geometry entity according to parameter passed.
unsigned long GetNumberKeypoints ()
 Gets the number of keypoints of the geometry.
unsigned long GetNumberLines ()
 Returns the number of lines in the geometry.
unsigned long GetNumberSurfaces ()
 Returns the number of surfaces of the geometry.
unsigned long GetNumberVolumes ()
 Returns the number of volumes in the geometry.
unsigned long GetNode (unsigned long KeypointNumber)
 Gets the node number related to a given keypoint.
unsigned long GetNumberElementEdges (unsigned long LineNumber)
 Returns the number of element wdgwa on a given line.
unsigned long GetNumberElementFaces (unsigned long SurfaceNumber)
 Returns the number of element faces on a given surface.
unsigned long *const GetElementEdges (unsigned long LineNumber, unsigned long &NumberEdges)
 Returns the local element edges numbers on the given Line .
unsigned long *const GetElementNumber (unsigned long LineNumber, GMEntity &GM, unsigned long &NumberElements)
 Returns the elements numbering associate with the edges numbers on the given Line .
unsigned long *const GetElementFaces (unsigned long SurfaceNumber, unsigned long &NumberFaces)
 Returns the local element face numbers on the given surface..
unsigned long *const GetElementsLines (unsigned long LineNumber, unsigned long &NumberElements)
 Returns the global element number that have edges on the given Line .
unsigned long *const GetElementsSurfaces (unsigned long SurfaceNumber, unsigned long &NumberElements)
 Returns the global element numbers that have faces on the given surface..
unsigned long *const GetElementsVolumes (unsigned long VolumeNumber, unsigned long &NumberElements)
 Returns the global element numbers associated to the given surface .
unsigned long GetNumberElementsVolumes (unsigned long VolumeNumber)
 Returns the number of elements associated to the given volume.
void SetNumberKeypoints (unsigned long NumberKeypoints)
 Sets the number of keypoints of the geometry.
void SetNumberLines (unsigned long NumberLines)
 Sets the number of lines for the geometry.
void SetNumberSurfaces (unsigned long NumberSurfaces)
 Sets the number of surfaces in the geometry.
void SetNumberVolumes (unsigned long NumberVolumes)
 Sets the number of volumes in the geometry.
void SetNodeNumber (unsigned long NodeNumber, unsigned long KeypointNumber)
 Sets the node related to a given keypoint.
void SetNumberElementEdges (unsigned long LineNumber, unsigned long NumberEdges, unsigned long *ElementEdges)
 Sets the number of element edges on a line.
void SetNumberElementFaces (unsigned long SurfaceNumber, unsigned long NumberFaces, unsigned long *ElementFaces)
 Sets the number of element faces on the surface.
void SetElementsLines (unsigned long LineNumber, unsigned long NumberElements, unsigned long *Elements, unsigned long *Edges)
 Sets the global element numbers and their edge local numbers for each element that has edges on the given Line.
void SetElementsSurfaces (unsigned long SurfaceNumber, unsigned long NumberElements, unsigned long *Elements, unsigned long *Faces)
 Sets the global element number and their face local number for each element that has faces on the given surface.
void SetElementsVolumes (unsigned long VolumeNumber, unsigned long NumberElements, unsigned long *Elements)
 Sets the global element number for each element in the volume.
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 Print (FILE *File, char *Message="")
 Prints the class parameters to an ASCII file.
void Read (FILE *FEMFile, unsigned long Dimension)
 Reads the .fem ASCII files with the geometry/mesh parameters.
void Free ()
 Releases the physical memory allocate for the geometry mesh.

Public Attributes

GMEntitytheGMEntity

Protected Attributes

GMEntity GMK
 Instance to store geometry mesh key points data.
GMEntity GML
 Instance to store geometry mesh lines data.
GMEntity GMS
 Instance to store geometry mesh surfaces data.
GMEntity GMV
 Instance to store geometry mesh volumes data.

Detailed Description

This is a class that reads, stores and manages information for the relation between geometric and mesh entities.

Note:
For example, for a given surface (geometric entity) is possible to know evey element (mesh) that has faces on the surface. With this information, it is possible to transfer boundary conditions from the surface to nodes.
Author:
Marco Lcio Bittencourt / Fabiano Fernandes Bargos Gilberto Luis Valente da Costa
Date:
April/14/2011

Constructor & Destructor Documentation

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

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

Member Function Documentation

Releases the physical memory allocate for the geometry mesh.

Note:
Statically allocated variables are set to zero.
unsigned long *const GeometryMesh::GetElementEdges ( unsigned long  LineNumber,
unsigned long &  NumberEdges 
)

Returns the local element edges numbers on the given Line .

Parameters:
[in]LineNumber- number of the desired Line.
[out]NumberEdges- number of the local edges
Returns:
Pointer to array with element edge local numbers.
unsigned long *const GeometryMesh::GetElementFaces ( unsigned long  SurfaceNumber,
unsigned long &  NumberFaces 
)

Returns the local element face numbers on the given surface..

Parameters:
[in]SurfaceNumber- number of the desired surface.
[out]NumberFaces- Number of local faces.
Returns:
Pointer to the array with element face numbers.
unsigned long *const GeometryMesh::GetElementNumber ( unsigned long  LineNumber,
GMEntity GM,
unsigned long &  NumberElements 
)

Returns the elements numbering associate with the edges numbers on the given Line .

Parameters:
[in]LineNumber- number of the desired Line.
[out]NumberElements- number of the elements associate with each local edge.
Returns:
Pointer to array with numbering of the element associate with each local edge.
unsigned long *const GeometryMesh::GetElementsLines ( unsigned long  LineNumber,
unsigned long &  NumberElements 
)

Returns the global element number that have edges on the given Line .

Parameters:
[in]LineNumber- number of the desired Line.
[out]NumberElements- The number of global elements.
Returns:
Pointer to array with element numbers.
unsigned long *const GeometryMesh::GetElementsSurfaces ( unsigned long  SurfaceNumber,
unsigned long &  NumberElements 
)

Returns the global element numbers that have faces on the given surface..

Parameters:
[in]SurfaceNumber- number of the desired surface.
[out]NumberElements- The number of global elements.
Returns:
Pointer to the array with element numbers.
unsigned long *const GeometryMesh::GetElementsVolumes ( unsigned long  VolumeNumber,
unsigned long &  NumberElements 
)

Returns the global element numbers associated to the given surface .

Parameters:
[in]VolumeNumber- number of the desired volume.
[out]NumberElements- The number of global elements.
Returns:
Pointer to the array with the element numbers.
GMEntity & GeometryMesh::GetGMEntity ( Entity_E  EntityType)

Returns the geometry entity according to parameter passed.

Parameters:
[in]EntityType- Type of geometry entity, for example: LINES.
Returns:
a GMEntity type with the values the a certain geometry entity.
unsigned long GeometryMesh::GetNode ( unsigned long  KeypointNumber)

Gets the node number related to a given keypoint.

Parameters:
[in]KeypointNumber- Key point number is index to access the node number.
Returns:
Returns the node number attached to the keypoint
unsigned long GeometryMesh::GetNumberElementEdges ( unsigned long  LineNumber)

Returns the number of element wdgwa on a given line.

Parameters:
[in]LineNumber- number of the desired Line.
Returns:
Number of edges on a line.
unsigned long GeometryMesh::GetNumberElementFaces ( unsigned long  SurfaceNumber)

Returns the number of element faces on a given surface.

Parameters:
[in]Surface- number of the desired surface.
Returns:
Number of element faces.
unsigned long GeometryMesh::GetNumberElementsVolumes ( unsigned long  VolumeNumber)

Returns the number of elements associated to the given volume.

Parameters:
[in]VolumeNumber- number of the volume.
Returns:
Number of elements,

Gets the number of keypoints of the geometry.

Returns:
an unsigned long with the number of keypoints.
unsigned long GeometryMesh::GetNumberLines ( )

Returns the number of lines in the geometry.

Returns:
an unsigned long with Number of lines.

Returns the number of surfaces of the geometry.

Returns:
an unsigned long with the number of surfaces.
unsigned long GeometryMesh::GetNumberVolumes ( )

Returns the number of volumes in the geometry.

Returns:
an unsigned long with Number of volumes.
GeometryMesh & GeometryMesh::operator= ( GeometryMesh Instance)

Copies the contents of Instance to the object.

Parameters:
[in]Instance- instance of GeometryMesh.
Returns:
Reference to the current object.
void GeometryMesh::Print ( FILE *  File,
char *  Message = "" 
)

Prints the class parameters to an ASCII file.

Parameters:
[in]File- pointer to the ASCII file.
[in]Message- optional message to be written to the ASCII file.
void GeometryMesh::Read ( FILE *  FEMFile,
unsigned long  Dimension 
)

Reads the .fem ASCII files with the geometry/mesh parameters.

Parameters:
[in]FEMFile- pointer to the .fem file with mesh data.
[in]Dimension- dimension of the problem.
void GeometryMesh::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:
void GeometryMesh::Restore ( FILE *  File)

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

Parameters:
[in]File- pointer to the binary file.
void GeometryMesh::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 GeometryMesh::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 GeometryMesh::SetElementsLines ( unsigned long  LineNumber,
unsigned long  NumberElements,
unsigned long *  Elements,
unsigned long *  Edges 
)

Sets the global element numbers and their edge local numbers for each element that has edges on the given Line.

Parameters:
[in]LineNumber- number of the desired Line.
[in]NumberElements- number ofl elements,
[in]Elements- array with element numbers.
[in]Edges- local edge numbers.
void GeometryMesh::SetElementsSurfaces ( unsigned long  SurfaceNumber,
unsigned long  NumberElements,
unsigned long *  Elements,
unsigned long *  Faces 
)

Sets the global element number and their face local number for each element that has faces on the given surface.

Parameters:
[in]SurfaceNumber- number of the desired surface..
[in]NumberElements- number ofl elements.
[in]Elements- global element numbers.
[in]FaceNumbers- local face numbers.
void GeometryMesh::SetElementsVolumes ( unsigned long  VolumeNumber,
unsigned long  NumberElements,
unsigned long *  Elements 
)

Sets the global element number for each element in the volume.

Parameters:
[in]VolumeNumber- number of the volume.
[in]NumberElements- number of elements.
[in]Elements- array with the global element numbers.
void GeometryMesh::SetNodeNumber ( unsigned long  NodeNumber,
unsigned long  KeypointNumber 
)

Sets the node related to a given keypoint.

Parameters:
[in]NodeNumber- Index to access array of number of the node coincident with the keypoint.
[in]KeypointNumber- Key point number.
void GeometryMesh::SetNumberElementEdges ( unsigned long  LineNumber,
unsigned long  NumberEdges,
unsigned long *  ElementEdges 
)

Sets the number of element edges on a line.

Parameters:
[in]LineNumber- number of the line.
[in]NumberEdges- number of edges on the line.
[in]ElementEdges- The local element edges to be attribuited.
void GeometryMesh::SetNumberElementFaces ( unsigned long  SurfaceNumber,
unsigned long  NumberFaces,
unsigned long *  ElementFaces 
)

Sets the number of element faces on the surface.

Parameters:
[in]SurfaceNumber- number of the surface.
[in]NumberFaces- number of element faces on the given surface.
[in]ElementFaces- The local element faces to be attribuited.
void GeometryMesh::SetNumberKeypoints ( unsigned long  NumberKeypoints)

Sets the number of keypoints of the geometry.

Parameters:
[in]NumberKeyPoints- Number of Key points
void GeometryMesh::SetNumberLines ( unsigned long  NumberLines)

Sets the number of lines for the geometry.

Parameters:
[in]NumberLines- number of lines of the geomtry.
void GeometryMesh::SetNumberSurfaces ( unsigned long  NumberSurfaces)

Sets the number of surfaces in the geometry.

Parameters:
[in]NumberSurfaces- number of surfaces of the geomtry.
void GeometryMesh::SetNumberVolumes ( unsigned long  NumberVolumes)

Sets the number of volumes in the geometry.

Parameters:
[in]NumberVolumes- number of volumes of the geomtry.

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