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

Nodal coordinates of the discrete model. More...

#include <Nodes.h>

Collaboration diagram for Nodes:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Nodes ()
 Default constructor.
 Nodes (unsigned int Dimension, unsigned long NumberNodes, BuiltInArray< double > &NodalCoordinates)
 Constructor with parameters.
 Nodes (Nodes &Instance)
 Copy-constructor. Copies the data in Instance to the current object.
 ~Nodes ()
 Destructor.
Nodesoperator= (Nodes &Instance)
 Copies the data in Instance to the current object.
unsigned long GetDimension ()
 Returns the dimension of the domain.
unsigned long GetNumberNodes ()
 Returns the number of nodes.
double * GetNodeCoordinates (unsigned long NodesNumber)
 Returns a pointer to the coordinates of a given node.
double * GetAllCoordinates (unsigned long &TotalNumberNodes)
 Returns the number of nodes and their coordinates.
void SetNodeCoordinates (unsigned long NodeNumber, double *Coordinates)
 Sets the coordinates of a node.
void SetCoordinates (BuiltInArray< double > &NodeCoordinates)
 Sets the coordinates of all nodes.
void SetElementCoords (OneIndexTable< unsigned long > &ElementIncidence, OneIndexTable< double > &ElementCoords)
 set the element coordinates.
void SetAllAttributes (unsigned long Dimension, unsigned long NumberNodes, double *Coordinates=0)
 Sets the all attributes of the Nodes Class.
void SetZero ()
 Sets all coordinates (attribute Coords) to zero.
void Read (FILE *FEMFile)
 Reads class data from the .fem 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 from a binary database written using the Save method.
void Restore (FILE *File)
 Restores class data (written using Save()) from a binary file.
void Print (FILE *File, char *Message="")
 Prints class information to an ASCII file.
void Free ()
 Releases the physical memory allocated for the class.

Protected Member Functions

void ReadNodes (FILE *File)
 Reads node from an ASCII file. See Read operation for details .

Protected Attributes

unsigned long Dim
 Dimension of the domain.
unsigned long NumNodes
 Number of nodes in the FE model.
BuiltInArray< double > Coords
 Array of nodal coordinates.

Detailed Description

Nodal coordinates of the discrete model.

Note:
Marco Lcio Bittencourt/Fabiano Fernandes Bargos
Date:
April/29/2011

Constructor & Destructor Documentation

Nodes::Nodes ( unsigned int  Dimension,
unsigned long  NumberNodes,
BuiltInArray< double > &  NodalCoordinates 
)

Constructor with parameters.

Parameters:
[in]Dimension- problem dimension
[in]NumberNodes- total number of nodes.
[in]NodalCoordinates- reference to the array with the nodal coordinates.
Nodes::Nodes ( Nodes Instance)

Copy-constructor. Copies the data in Instance to the current object.

Parameters:
[in]Instance- instance of Nodes class

Member Function Documentation

double * Nodes::GetAllCoordinates ( unsigned long &  TotalNumberNodes)

Returns the number of nodes and their coordinates.

Parameters:
[out]returnsthe total number of nodes in the FE model.
Returns:
Pointer to the nodal coordinates.
unsigned long Nodes::GetDimension ( )

Returns the dimension of the domain.

Returns:
Problem dimension.
double * Nodes::GetNodeCoordinates ( unsigned long  NodesNumber)

Returns a pointer to the coordinates of a given node.

Returns:
pointer to the nodal coordinates..
unsigned long Nodes::GetNumberNodes ( )

Returns the number of nodes.

Returns:
Number of nodes in the mesh.
Nodes & Nodes::operator= ( Nodes Instance)

Copies the data in Instance to the current object.

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

Prints class information to an ASCII file.

Parameters:
[in]File,:pointer to the ASCII file.
[in]Message,:optional message
void Nodes::Read ( FILE *  FEMFile)

Reads class data from the .fem ASCII file,.

Parameters:
[in]FEMFile- pointer to the .fem file with mesh data.
void Nodes::ReadNodes ( FILE *  File) [protected]

Reads node from an ASCII file. See Read operation for details .

Parameters:
[in]File- pointer to an ASCII file.
void Nodes::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 Nodes::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 Nodes::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 Nodes::SetAllAttributes ( unsigned long  Dimension,
unsigned long  NumberNodes,
double *  Coordinates = 0 
)

Sets the all attributes of the Nodes Class.

Parameters:
[in]Dimension- The dimension of the domain.
[in]NumberNodes- The number of nodes in the model.
[in]Coordinates- The array of nodal coordinates.
void Nodes::SetCoordinates ( BuiltInArray< double > &  NodeCoordinates)

Sets the coordinates of all nodes.

Parameters:
[in]NodeCoordinates- array with the coordinates of all nodes.
void Nodes::SetElementCoords ( OneIndexTable< unsigned long > &  ElementIncidence,
OneIndexTable< double > &  ElementCoords 
)

set the element coordinates.

Parameters:
[in]ElementIncidence- Instance of OneIndexTable to store incidence for each element.
[out]ElementCoords- Instance of OneIndexTable to store coordinates for each element.
void Nodes::SetNodeCoordinates ( unsigned long  NodeNumber,
double *  Coordinates 
)

Sets the coordinates of a node.

Note:
Checks if the number NodeNumber is valid.
Parameters:
[in]NodeNumber- number of the node to be set.
[in]Coordinates- coordinates of the node to be set.

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