escript
Revision_
|
Stores and manipulates speckley mesh nodes. More...
#include <SpeckleyNodes.h>
Public Member Functions | |
SpeckleyNodes (const std::string &meshName) | |
Constructor with mesh name. More... | |
SpeckleyNodes (SpeckleyNodes_ptr fullNodes, IntVec &requiredNodes, const std::string &meshName) | |
SpeckleyNodes (const SpeckleyNodes &m) | |
Copy constructor. More... | |
virtual | ~SpeckleyNodes () |
Virtual destructor. More... | |
bool | initFromSpeckley (const speckley::SpeckleyDomain *speckleyDomain) |
Initialises with speckley domain. More... | |
bool | writeToSilo (DBfile *dbfile) |
Writes node data to a Silo file. More... | |
virtual void | writeCoordinatesVTK (std::ostream &os, int ownIndex) |
Writes coordinates to a stream in VTK text format. More... | |
void | setSiloPath (const std::string &path) |
Sets the silo path to be used when saving. More... | |
const IntVec & | getVarDataByName (const std::string &name) const |
Returns an array of nodal data by the given name. More... | |
virtual StringVec | getVarNames () const |
Returns a vector with the mesh variable names. More... | |
virtual std::string | getName () const |
Returns the name of this node mesh. More... | |
std::string | getFullSiloName () const |
Returns full Silo mesh name, e.g. "/block0000/Nodes". More... | |
virtual const IntVec & | getNodeIDs () const |
Returns the node ID array. More... | |
virtual const IntVec & | getNodeDistribution () const |
Returns the node distribution array. More... | |
virtual const IntVec & | getGlobalNodeIndices () const |
Returns the global node index array. More... | |
virtual const CoordArray & | getCoords () const |
Returns the coordinates of the mesh nodes. More... | |
virtual int | getNumDims () const |
Returns the dimensionality of this mesh (2 or 3). More... | |
virtual int | getNumNodes () const |
Returns the number of mesh nodes. More... | |
virtual int | getGlobalNumNodes () const |
Returns the total number of mesh nodes for a distributed mesh. More... | |
Protected Attributes | |
CoordArray | coords |
int | numDims |
x, y[, z] coordinates of nodes More... | |
int | numNodes |
dimensionality (2 or 3) More... | |
int | globalNumNodes |
number of nodes More... | |
IntVec | nodeID |
global number of nodes More... | |
IntVec | nodeTag |
node IDs More... | |
IntVec | nodeDist |
node tags More... | |
std::string | name |
node distribution More... | |
std::string | siloPath |
the name of this node mesh More... | |
Additional Inherited Members | |
![]() | |
virtual | ~NodeData () |
Virtual destructor. More... | |
Stores and manipulates speckley mesh nodes.
This class provides functionality to manipulate the nodes of a speckley domain. It is able to load node data from dump files or retrieve it from a SpeckleyDomain instance.
weipa::SpeckleyNodes::SpeckleyNodes | ( | const std::string & | meshName | ) |
Constructor with mesh name.
weipa::SpeckleyNodes::SpeckleyNodes | ( | SpeckleyNodes_ptr | fullNodes, |
IntVec & | requiredNodes, | ||
const std::string & | meshName | ||
) |
weipa::SpeckleyNodes::SpeckleyNodes | ( | const SpeckleyNodes & | m | ) |
Copy constructor.
References coords, paso::util::copy(), globalNumNodes, name, nodeDist, nodeID, nodeTag, numDims, and numNodes.
|
virtual |
Virtual destructor.
References coords.
|
inlinevirtual |
Returns the coordinates of the mesh nodes.
Implements weipa::NodeData.
|
inlinevirtual |
Returns full Silo mesh name, e.g. "/block0000/Nodes".
Implements weipa::NodeData.
Referenced by writeToSilo().
|
inlinevirtual |
Returns the global node index array.
Implements weipa::NodeData.
|
inlinevirtual |
Returns the total number of mesh nodes for a distributed mesh.
Implements weipa::NodeData.
|
inlinevirtual |
Returns the name of this node mesh.
Implements weipa::NodeData.
|
inlinevirtual |
Returns the node distribution array.
Implements weipa::NodeData.
|
inlinevirtual |
Returns the node ID array.
Implements weipa::NodeData.
|
inlinevirtual |
Returns the dimensionality of this mesh (2 or 3).
Implements weipa::NodeData.
|
inlinevirtual |
Returns the number of mesh nodes.
Implements weipa::NodeData.
const IntVec & weipa::SpeckleyNodes::getVarDataByName | ( | const std::string & | name | ) | const |
Returns an array of nodal data by the given name.
The name must be one of the names returned by getVarNames().
|
virtual |
Returns a vector with the mesh variable names.
Implements weipa::NodeData.
bool weipa::SpeckleyNodes::initFromSpeckley | ( | const speckley::SpeckleyDomain * | speckleyDomain | ) |
Initialises with speckley domain.
References speckley::SpeckleyDomain::borrowSampleReferenceIDs(), coords, speckley::SpeckleyDomain::getDataShape(), speckley::SpeckleyDomain::getDim(), speckley::SpeckleyDomain::getLocalCoordinate(), speckley::SpeckleyDomain::getNodeDistribution(), speckley::SpeckleyDomain::getNumDataPointsGlobal(), speckley::SpeckleyDomain::getNumNodesPerDim(), globalNumNodes, nodeDist, nodeID, speckley::Nodes, nodeTag, numDims, and numNodes.
|
inline |
Sets the silo path to be used when saving.
|
virtual |
bool weipa::SpeckleyNodes::writeToSilo | ( | DBfile * | dbfile | ) |
Writes node data to a Silo file.
References getFullSiloName(), nodeID, nodeTag, numNodes, and siloPath.
|
protected |
Referenced by initFromSpeckley(), SpeckleyNodes(), writeCoordinatesVTK(), and ~SpeckleyNodes().
|
protected |
number of nodes
Referenced by initFromSpeckley(), and SpeckleyNodes().
|
protected |
node distribution
Referenced by SpeckleyNodes().
|
protected |
node tags
Referenced by initFromSpeckley(), SpeckleyNodes(), and writeCoordinatesVTK().
|
protected |
global number of nodes
Referenced by getVarDataByName(), initFromSpeckley(), SpeckleyNodes(), writeCoordinatesVTK(), and writeToSilo().
|
protected |
node IDs
Referenced by getVarDataByName(), initFromSpeckley(), SpeckleyNodes(), and writeToSilo().
|
protected |
x, y[, z] coordinates of nodes
Referenced by initFromSpeckley(), SpeckleyNodes(), and writeCoordinatesVTK().
|
protected |
dimensionality (2 or 3)
Referenced by initFromSpeckley(), SpeckleyNodes(), writeCoordinatesVTK(), and writeToSilo().
|
protected |
the name of this node mesh
Referenced by writeToSilo().