escript
Revision_
|
Stores and manipulates finley mesh nodes. More...
#include <FinleyNodes.h>
Public Member Functions | |
FinleyNodes (const std::string &meshName) | |
Constructor with mesh name. | |
FinleyNodes (FinleyNodes_ptr fullNodes, IntVec &requiredNodes, const std::string &meshName) | |
FinleyNodes (const FinleyNodes &m) | |
Copy constructor. | |
virtual | ~FinleyNodes () |
Virtual destructor. | |
bool | initFromDudley (const Dudley_NodeFile *dudleyFile) |
Initialises with dudley node file. | |
bool | initFromFinley (const finley::NodeFile *finleyFile) |
Initialises with finley node file. | |
bool | readFromNc (NcFile *ncFile) |
Reads node data from a NetCDF file. | |
bool | writeToSilo (DBfile *dbfile) |
Writes node data to a Silo file. | |
virtual void | writeCoordinatesVTK (std::ostream &os, int ownIndex) |
Writes coordinates to a stream in VTK text format. | |
void | setSiloPath (const std::string &path) |
Sets the silo path to be used when saving. | |
const IntVec & | getVarDataByName (const std::string &name) const |
Returns an array of nodal data by the given name. | |
virtual StringVec | getVarNames () const |
Returns a vector with the mesh variable names. | |
virtual std::string | getName () const |
Returns the name of this node mesh. | |
std::string | getFullSiloName () const |
Returns full Silo mesh name, e.g. "/block0000/Nodes". | |
virtual const IntVec & | getNodeIDs () const |
Returns the node ID array. | |
virtual const IntVec & | getNodeDistribution () const |
Returns the node distribution array. | |
virtual const IntVec & | getGlobalNodeIndices () const |
Returns the global node index array. | |
virtual const CoordArray & | getCoords () const |
Returns the coordinates of the mesh nodes. | |
virtual int | getNumDims () const |
Returns the dimensionality of this mesh (2 or 3). | |
virtual int | getNumNodes () const |
Returns the number of mesh nodes. | |
virtual int | getGlobalNumNodes () const |
Returns the total number of mesh nodes for a distributed mesh. | |
Protected Attributes | |
CoordArray | coords |
int | numDims |
x, y[, z] coordinates of nodes | |
int | numNodes |
dimensionality (2 or 3) | |
IntVec | nodeID |
number of nodes | |
IntVec | nodeTag |
node IDs | |
IntVec | nodeGDOF |
IntVec | nodeGNI |
IntVec | nodeGRDFI |
IntVec | nodeGRNI |
IntVec | nodeDist |
std::string | name |
node distribution | |
std::string | siloPath |
the name of this node mesh |
Stores and manipulates finley mesh nodes.
This class provides functionality to manipulate a finley node file. It is able to load node data from dump files or retrieve it from a finley::NodeFile instance.
weipa::FinleyNodes::FinleyNodes | ( | const std::string & | meshName | ) |
Constructor with mesh name.
weipa::FinleyNodes::FinleyNodes | ( | FinleyNodes_ptr | fullNodes, |
IntVec & | requiredNodes, | ||
const std::string & | meshName | ||
) |
weipa::FinleyNodes::FinleyNodes | ( | const FinleyNodes & | m | ) |
weipa::FinleyNodes::~FinleyNodes | ( | ) | [virtual] |
Virtual destructor.
References coords.
virtual const CoordArray& weipa::FinleyNodes::getCoords | ( | ) | const [inline, virtual] |
std::string weipa::FinleyNodes::getFullSiloName | ( | ) | const [inline, virtual] |
Returns full Silo mesh name, e.g. "/block0000/Nodes".
Implements weipa::NodeData.
References name, and siloPath.
Referenced by writeToSilo().
virtual const IntVec& weipa::FinleyNodes::getGlobalNodeIndices | ( | ) | const [inline, virtual] |
int weipa::FinleyNodes::getGlobalNumNodes | ( | ) | const [virtual] |
Returns the total number of mesh nodes for a distributed mesh.
Implements weipa::NodeData.
References nodeDist.
virtual std::string weipa::FinleyNodes::getName | ( | ) | const [inline, virtual] |
virtual const IntVec& weipa::FinleyNodes::getNodeDistribution | ( | ) | const [inline, virtual] |
virtual const IntVec& weipa::FinleyNodes::getNodeIDs | ( | ) | const [inline, virtual] |
virtual int weipa::FinleyNodes::getNumDims | ( | ) | const [inline, virtual] |
virtual int weipa::FinleyNodes::getNumNodes | ( | ) | const [inline, virtual] |
const IntVec & weipa::FinleyNodes::getVarDataByName | ( | const std::string & | name | ) | const |
StringVec weipa::FinleyNodes::getVarNames | ( | ) | const [virtual] |
Returns a vector with the mesh variable names.
Implements weipa::NodeData.
bool weipa::FinleyNodes::initFromDudley | ( | const Dudley_NodeFile * | dudleyFile | ) |
Initialises with dudley node file.
References Dudley_NodeFile::Coordinates, coords, paso::util::copy(), Dudley_NodeFile::globalDegreesOfFreedom, Dudley_NodeFile::globalNodesIndex, Dudley_NodeFile::globalReducedDOFIndex, Dudley_NodeFile::globalReducedNodesIndex, Dudley_NodeFile::Id, Dudley_NodeFile::MPIInfo, nodeDist, nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, Dudley_NodeFile::nodesDistribution, nodeTag, Dudley_NodeFile::numDim, numDims, Dudley_NodeFile::numNodes, numNodes, Esys_MPIInfo::size, and Dudley_NodeFile::Tag.
bool weipa::FinleyNodes::initFromFinley | ( | const finley::NodeFile * | finleyFile | ) |
Initialises with finley node file.
References finley::NodeFile::Coordinates, coords, paso::util::copy(), finley::NodeFile::globalDegreesOfFreedom, finley::NodeFile::globalNodesIndex, finley::NodeFile::globalReducedDOFIndex, finley::NodeFile::globalReducedNodesIndex, finley::NodeFile::Id, finley::NodeFile::MPIInfo, nodeDist, nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, finley::NodeFile::nodesDistribution, nodeTag, finley::NodeFile::numDim, numDims, finley::NodeFile::numNodes, numNodes, Esys_MPIInfo::size, and finley::NodeFile::Tag.
bool weipa::FinleyNodes::readFromNc | ( | NcFile * | ncFile | ) |
void weipa::FinleyNodes::setSiloPath | ( | const std::string & | path | ) | [inline] |
Sets the silo path to be used when saving.
References siloPath.
void weipa::FinleyNodes::writeCoordinatesVTK | ( | std::ostream & | os, |
int | ownIndex | ||
) | [virtual] |
bool weipa::FinleyNodes::writeToSilo | ( | DBfile * | dbfile | ) |
CoordArray weipa::FinleyNodes::coords [protected] |
Referenced by FinleyNodes(), getCoords(), initFromDudley(), initFromFinley(), readFromNc(), writeCoordinatesVTK(), and ~FinleyNodes().
std::string weipa::FinleyNodes::name [protected] |
node distribution
Referenced by FinleyNodes(), getFullSiloName(), and getName().
IntVec weipa::FinleyNodes::nodeDist [protected] |
Referenced by FinleyNodes(), getGlobalNumNodes(), getNodeDistribution(), initFromDudley(), initFromFinley(), readFromNc(), and writeCoordinatesVTK().
IntVec weipa::FinleyNodes::nodeGDOF [protected] |
Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().
IntVec weipa::FinleyNodes::nodeGNI [protected] |
Referenced by FinleyNodes(), getGlobalNodeIndices(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), writeCoordinatesVTK(), and writeToSilo().
IntVec weipa::FinleyNodes::nodeGRDFI [protected] |
Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().
IntVec weipa::FinleyNodes::nodeGRNI [protected] |
Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().
IntVec weipa::FinleyNodes::nodeID [protected] |
number of nodes
Referenced by FinleyNodes(), getNodeIDs(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().
IntVec weipa::FinleyNodes::nodeTag [protected] |
node IDs
Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().
int weipa::FinleyNodes::numDims [protected] |
x, y[, z] coordinates of nodes
Referenced by FinleyNodes(), getNumDims(), initFromDudley(), initFromFinley(), readFromNc(), and writeCoordinatesVTK().
int weipa::FinleyNodes::numNodes [protected] |
dimensionality (2 or 3)
Referenced by FinleyNodes(), getNumNodes(), initFromDudley(), initFromFinley(), readFromNc(), writeCoordinatesVTK(), and writeToSilo().
std::string weipa::FinleyNodes::siloPath [protected] |
the name of this node mesh
Referenced by getFullSiloName(), setSiloPath(), and writeToSilo().