Go to the documentation of this file.
18 #ifndef __WEIPA_SPECKLEYNODES_H__
19 #define __WEIPA_SPECKLEYNODES_H__
21 #include <weipa/NodeData.h>
46 const std::string& meshName);
75 virtual std::string
getName()
const {
return name; }
117 if (result.length() == 0 || *result.rbegin() !=
'/')
125 #endif // __WEIPA_SPECKLEYNODES_H__
IntVec nodeTag
node IDs
Definition: SpeckleyNodes.h:106
int numDims
x, y[, z] coordinates of nodes
Definition: SpeckleyNodes.h:102
virtual double getLocalCoordinate(dim_t index, int dim) const =0
returns the index'th coordinate value in given dimension for this rank
CoordArray coords
Definition: SpeckleyNodes.h:101
std::string siloPath
the name of this node mesh
Definition: SpeckleyNodes.h:109
IntVec nodeID
global number of nodes
Definition: SpeckleyNodes.h:105
boost::shared_ptr< SpeckleyNodes > SpeckleyNodes_ptr
Definition: SpeckleyNodes.h:30
virtual StringVec getVarNames() const
Returns a vector with the mesh variable names.
Definition: SpeckleyNodes.cpp:194
Definition: DataVar.cpp:50
const IntVec & getVarDataByName(const std::string &name) const
Returns an array of nodal data by the given name.
Definition: SpeckleyNodes.cpp:181
bool writeToSilo(DBfile *dbfile)
Writes node data to a Silo file.
Definition: SpeckleyNodes.cpp:226
Definition: AbstractAssembler.cpp:18
void copy(dim_t N, double *out, const double *in)
out = in
Definition: PasoUtil.h:113
Definition: NodeData.h:39
IntVec nodeDist
node tags
Definition: SpeckleyNodes.h:107
void setSiloPath(const std::string &path)
Sets the silo path to be used when saving.
Definition: SpeckleyNodes.h:63
index_t dim_t
Definition: DataTypes.h:90
const index_t * borrowSampleReferenceIDs(int fsType) const =0
returns the array of reference numbers for a function space type
std::map< int, size_t > IndexMap
Definition: weipa.h:62
std::vector< float * > CoordArray
Definition: weipa.h:61
virtual int getGlobalNumNodes() const
Returns the total number of mesh nodes for a distributed mesh.
Definition: SpeckleyNodes.h:98
int globalNumNodes
number of nodes
Definition: SpeckleyNodes.h:104
virtual const IntVec & getGlobalNodeIndices() const
Returns the global node index array.
Definition: SpeckleyNodes.h:86
virtual ~SpeckleyNodes()
Virtual destructor.
Definition: SpeckleyNodes.cpp:110
bool initFromSpeckley(const speckley::SpeckleyDomain *speckleyDomain)
Initialises with speckley domain.
Definition: SpeckleyNodes.cpp:120
virtual const IntVec & getNodeIDs() const
Returns the node ID array.
Definition: SpeckleyNodes.h:80
SpeckleyDomain extends the AbstractContinuousDomain interface for the Speckley library and is the bas...
Definition: speckley/src/SpeckleyDomain.h:97
int numNodes
dimensionality (2 or 3)
Definition: SpeckleyNodes.h:103
virtual const CoordArray & getCoords() const
Returns the coordinates of the mesh nodes.
Definition: SpeckleyNodes.h:89
virtual IndexVector getNodeDistribution() const =0
returns the node distribution vector
virtual const dim_t * getNumNodesPerDim() const =0
returns the number of nodes per MPI rank in each dimension
virtual std::string getName() const
Returns the name of this node mesh.
Definition: SpeckleyNodes.h:74
virtual std::pair< int, dim_t > getDataShape(int fsType) const
returns the number of data points per sample, and the number of samples as a pair.
Definition: speckley/src/SpeckleyDomain.cpp:124
virtual void writeCoordinatesVTK(std::ostream &os, int ownIndex)
Writes coordinates to a stream in VTK text format.
Definition: SpeckleyNodes.cpp:205
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:85
std::string getFullSiloName() const
Returns full Silo mesh name, e.g. "/block0000/Nodes".
Definition: SpeckleyNodes.h:113
std::vector< std::string > StringVec
Definition: weipa.h:60
virtual int getNumDims() const
Returns the dimensionality of this mesh (2 or 3).
Definition: SpeckleyNodes.h:92
virtual int getDim() const
returns the number of spatial dimensions of the domain
Definition: speckley/src/SpeckleyDomain.h:169
virtual int getNumNodes() const
Returns the number of mesh nodes.
Definition: SpeckleyNodes.h:95
std::vector< index_t > IndexVector
Definition: Speckley.h:57
SpeckleyNodes(const std::string &meshName)
Constructor with mesh name.
Definition: SpeckleyNodes.cpp:39
virtual dim_t getNumDataPointsGlobal() const =0
returns the number of data points summed across all MPI processes
std::vector< int > IntVec
Definition: weipa.h:59
std::string name
node distribution
Definition: SpeckleyNodes.h:108
virtual const IntVec & getNodeDistribution() const
Returns the node distribution array.
Definition: SpeckleyNodes.h:83
Stores and manipulates speckley mesh nodes.
Definition: SpeckleyNodes.h:38
Definition: Speckley.h:74