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 () |
MeshSource is the user-level interface for objects such as mesh generators and mesh file readers. A MeshSource can create a mesh object with the 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 68 of file SundanceMeshSource.hpp.
Construct an empty mesh source object
Definition at line 64 of file SundanceMeshSource.cpp.
| MeshSource::MeshSource | ( | Playa::Handleable< MeshSourceBase > * | rawPtr | ) |
Construct from a raw pointer to a mesh source subtype
Definition at line 68 of file SundanceMeshSource.cpp.
| MeshSource::MeshSource | ( | const RCP< MeshSourceBase > & | smartPtr | ) |
Construct from a smart pointer to a mesh source subtype
Definition at line 73 of file SundanceMeshSource.cpp.
| const MPIComm & MeshSource::comm | ( | ) | const |
access to the MPI communicator
Definition at line 130 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 124 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 116 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 77 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::LineDomain::init(), Sundance::RectangleDomain::init(), main(), Sundance::readbackTester(), Sundance::readSerialGridField(), Sundance::serialPartition(), and Sundance::unfoldPeriodicMesh().
| static bool& Sundance::MeshSource::staggerOutput | ( | ) | [inline, static] |
Definition at line 102 of file SundanceMeshSource.hpp.
Referenced by getMesh().