Public Member Functions | |
MeshSource () | |
MeshSource (Playa::Handleable< MeshSourceBase > *rawPtr) | |
MeshSource (const RCP< MeshSourceBase > &smartPtr) | |
Mesh | getMesh () const |
void | getAttributes (RCP< Array< Array< double > > > &nodeAttributes, RCP< Array< Array< double > > > &elemAttributes) const |
const MPIComm & | comm () const |
Static Public Member Functions | |
static MeshType & | defaultMeshType () |
static bool & | staggerOutput () |
getMesh()
method, and if node and element attributes are available, it can access them with the getAttributes() method.Example: read input from a file celled "meshFile" in Shewchuk's Triangle format, and create a mesh of type BasicSimplicialMesh distributed over the MPI communicator MPI_COMM_WORLD.
MeshType meshType = new BasicSimplicialMeshType(); MeshSource meshSrc = new TriangleMeshReader("meshFile", meshType, MPIComm::world());
Definition at line 57 of file SundanceMeshSource.hpp.
MeshSource::MeshSource | ( | ) |
Construct an empty mesh source object
Definition at line 22 of file SundanceMeshSource.cpp.
MeshSource::MeshSource | ( | Playa::Handleable< MeshSourceBase > * | rawPtr | ) |
Construct from a raw pointer to a mesh source subtype
Definition at line 26 of file SundanceMeshSource.cpp.
MeshSource::MeshSource | ( | const RCP< MeshSourceBase > & | smartPtr | ) |
Construct from a smart pointer to a mesh source subtype
Definition at line 31 of file SundanceMeshSource.cpp.
const MPIComm & MeshSource::comm | ( | ) | const |
access to the MPI communicator
Definition at line 88 of file SundanceMeshSource.cpp.
References Playa::Handle< MeshSourceBase >::ptr().
Referenced by Sundance::serialPartition().
MeshType & MeshSource::defaultMeshType | ( | ) | [static] |
Return the mesh type to be used by default if no MeshType is given in a MeshSource subtype ctor. The default mesh type can be set by including a specifer such as
<DefaultMesh type="BasicSimplicial">as a child in the XML configuration file.
Definition at line 82 of file SundanceMeshSource.cpp.
void MeshSource::getAttributes | ( | RCP< Array< Array< double > > > & | nodeAttributes, | |
RCP< Array< Array< double > > > & | elemAttributes | |||
) | const |
Get any attributes associated with the nodes and elements in the mesh. If no attributes exist, the arrays are empty. If the mesh does not exist, it will be created with a cell to getMesh().
Definition at line 74 of file SundanceMeshSource.cpp.
References getMesh(), and Playa::Handle< MeshSourceBase >::ptr().
Referenced by Sundance::readNodalFields(), and Sundance::serialPartition().
Mesh MeshSource::getMesh | ( | ) | const |
Create and return a mesh
Definition at line 35 of file SundanceMeshSource.cpp.
References Sundance::Mesh::assignIntermediateCellGIDs(), getMeshTimer(), Playa::Handle< MeshSourceBase >::ptr(), Sundance::Mesh::spatialDim(), staggerOutput(), SUNDANCE_OUT, SUNDANCE_TRACE, and Playa::Handle< MeshSourceBase >::verb().
Referenced by getAttributes(), Sundance::RectangleDomain::init(), Sundance::LineDomain::init(), main(), Sundance::readbackTester(), Sundance::readSerialGridField(), Sundance::serialPartition(), and Sundance::unfoldPeriodicMesh().
static bool& Sundance::MeshSource::staggerOutput | ( | ) | [inline, static] |