hp2FEM
0.1
|
Nodal coordinates of the discrete model. More...
#include <Nodes.h>
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. | |
Nodes & | operator= (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. |
Nodal coordinates of the discrete model.
Nodes::Nodes | ( | unsigned int | Dimension, |
unsigned long | NumberNodes, | ||
BuiltInArray< double > & | NodalCoordinates | ||
) |
Constructor with 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.
[in] | Instance | - instance of Nodes class |
double * Nodes::GetAllCoordinates | ( | unsigned long & | TotalNumberNodes | ) |
Returns the number of nodes and their coordinates.
[out] | returns | the total number of nodes in the FE model. |
unsigned long Nodes::GetDimension | ( | ) |
Returns the dimension of the domain.
double * Nodes::GetNodeCoordinates | ( | unsigned long | NodesNumber | ) |
Returns a pointer to the coordinates of a given node.
unsigned long Nodes::GetNumberNodes | ( | ) |
Returns the number of nodes.
Copies the data in Instance to the current object.
[in] | Instance | - instance of Nodes class |
void Nodes::Print | ( | FILE * | File, |
char * | Message = "" |
||
) |
Prints class information to an ASCII file.
[in] | File,: | pointer to the ASCII file. |
[in] | Message,: | optional message |
void Nodes::Read | ( | FILE * | FEMFile | ) |
Reads class data from the .fem ASCII file,.
[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 .
[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.
[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.
[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.
[in] | File | - pointer to the binary file. |
void Nodes::SetAllAttributes | ( | unsigned long | Dimension, |
unsigned long | NumberNodes, | ||
double * | Coordinates = 0 |
||
) |
void Nodes::SetCoordinates | ( | BuiltInArray< double > & | NodeCoordinates | ) |
Sets the coordinates of all nodes.
[in] | NodeCoordinates | - array with the coordinates of all nodes. |
void Nodes::SetElementCoords | ( | OneIndexTable< unsigned long > & | ElementIncidence, |
OneIndexTable< double > & | ElementCoords | ||
) |
set the element coordinates.
[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.
[in] | NodeNumber | - number of the node to be set. |
[in] | Coordinates | - coordinates of the node to be set. |