ESYS13
Revision_
|
Represents a full Finley or Dudley domain including nodes and elements. More...
#include <FinleyDomain.h>
Public Member Functions | |
FinleyDomain () | |
FinleyDomain (const FinleyDomain &m) | |
virtual | ~FinleyDomain () |
virtual bool | initFromEscript (const escript::AbstractDomain *domain) |
Initialises the domain using an escript domain instance. | |
virtual bool | initFromFile (const std::string &filename) |
Reads the domain from a dump file. | |
virtual bool | writeToSilo (DBfile *dbfile, const std::string &pathInSilo, const StringVec &labels, const StringVec &units, bool writeMeshData) |
Writes the domain to a Silo file. | |
virtual void | reorderGhostZones (int ownIndex) |
Reorders elements so that 'ghost' elements (i.e. those that do not belong to ownIndex) appear last. | |
virtual void | removeGhostZones (int ownIndex) |
Removes 'ghost' elements and nodes. | |
virtual StringVec | getMeshNames () const |
Returns the names of all meshes within this domain. | |
virtual StringVec | getVarNames () const |
Returns the names of all 'special' domain variables. | |
virtual ElementData_ptr | getElementsByName (const std::string &name) const |
Returns element data with given name. | |
virtual NodeData_ptr | getMeshByName (const std::string &name) const |
Returns the node mesh with given name. | |
virtual DataVar_ptr | getDataVarByName (const std::string &name) const |
Creates and returns a variable with domain data. | |
virtual Centering | getCenteringForFunctionSpace (int fsCode) const |
Returns whether data on given function space is node or cell centered. | |
virtual NodeData_ptr | getMeshForFunctionSpace (int fsCode) const |
Returns the node mesh for given function space code. | |
virtual ElementData_ptr | getElementsForFunctionSpace (int fsCode) const |
Returns the element data for given function space code. | |
virtual NodeData_ptr | getNodes () const |
Returns a pointer to the full nodes. | |
virtual std::string | getSiloPath () const |
Returns the absolute path within Silo file if writeToSilo() or setSiloPath() was called before, the empty string otherwise. | |
virtual void | setSiloPath (const std::string &path) |
Sets the silo path to be used when saving to a Silo file. | |
Private Member Functions | |
void | cleanup () |
Private Attributes | |
bool | initialized |
FinleyNodes_ptr | nodes |
FinleyElements_ptr | cells |
FinleyElements_ptr | faces |
FinleyElements_ptr | contacts |
std::string | siloPath |
Represents a full Finley or Dudley domain including nodes and elements.
This class represents a Finley or Dudley domain including nodes, cells, and face elements (plus contact elements for Finley). It provides functionality to read a domain from a netCDF file (generated by the domain's dump() method) or directly through an instance of Finley_Mesh or Dudley_Mesh.
Once initialised, the domain can be saved to a Silo file or its nodes and elements accessed through the respective methods.
weipa::FinleyDomain::FinleyDomain | ( | const FinleyDomain & | m | ) |
References cells, contacts, faces, initialized, and nodes.
weipa::FinleyDomain::~FinleyDomain | ( | ) | [virtual] |
References cleanup().
void weipa::FinleyDomain::cleanup | ( | ) | [private] |
References cells, contacts, faces, initialized, and nodes.
Referenced by initFromEscript(), initFromFile(), and ~FinleyDomain().
Centering weipa::FinleyDomain::getCenteringForFunctionSpace | ( | int | fsCode | ) | const [virtual] |
Returns whether data on given function space is node or cell centered.
Implements weipa::DomainChunk.
References FINLEY_NODES, FINLEY_REDUCED_NODES, weipa::NODE_CENTERED, and weipa::ZONE_CENTERED.
DataVar_ptr weipa::FinleyDomain::getDataVarByName | ( | const std::string & | name | ) | const [virtual] |
Creates and returns a variable with domain data.
Implements weipa::DomainChunk.
References cells, contacts, faces, FINLEY_CONTACT_ELEMENTS_1, FINLEY_ELEMENTS, FINLEY_FACE_ELEMENTS, FINLEY_NODES, getElementsByName(), getNodes(), initialized, weipa::NODE_CENTERED, nodes, and weipa::ZONE_CENTERED.
ElementData_ptr weipa::FinleyDomain::getElementsByName | ( | const std::string & | name | ) | const [virtual] |
Returns element data with given name.
Implements weipa::DomainChunk.
References cells, contacts, and faces.
Referenced by getDataVarByName(), and getMeshByName().
ElementData_ptr weipa::FinleyDomain::getElementsForFunctionSpace | ( | int | fsCode | ) | const [virtual] |
Returns the element data for given function space code.
Implements weipa::DomainChunk.
References cells, contacts, faces, FINLEY_CONTACT_ELEMENTS_1, FINLEY_CONTACT_ELEMENTS_2, FINLEY_ELEMENTS, FINLEY_FACE_ELEMENTS, Finley_Hex27, Finley_Hex27Macro, Finley_Line3Macro, FINLEY_NODES, Finley_Rec9, Finley_Rec9Macro, FINLEY_REDUCED_CONTACT_ELEMENTS_1, FINLEY_REDUCED_CONTACT_ELEMENTS_2, FINLEY_REDUCED_ELEMENTS, FINLEY_REDUCED_FACE_ELEMENTS, FINLEY_REDUCED_NODES, Finley_Tet10, Finley_Tet10Macro, Finley_Tri6, Finley_Tri6Macro, weipa::FinleyElements::getReducedElements(), and initialized.
Referenced by getMeshForFunctionSpace().
NodeData_ptr weipa::FinleyDomain::getMeshByName | ( | const std::string & | name | ) | const [virtual] |
Returns the node mesh with given name.
Implements weipa::DomainChunk.
References getElementsByName(), and initialized.
NodeData_ptr weipa::FinleyDomain::getMeshForFunctionSpace | ( | int | fsCode | ) | const [virtual] |
Returns the node mesh for given function space code.
Implements weipa::DomainChunk.
References getElementsForFunctionSpace(), and initialized.
StringVec weipa::FinleyDomain::getMeshNames | ( | ) | const [virtual] |
Returns the names of all meshes within this domain.
Implements weipa::DomainChunk.
References cells, contacts, faces, and initialized.
virtual NodeData_ptr weipa::FinleyDomain::getNodes | ( | ) | const [inline, virtual] |
Returns a pointer to the full nodes.
Implements weipa::DomainChunk.
References nodes.
Referenced by getDataVarByName().
virtual std::string weipa::FinleyDomain::getSiloPath | ( | ) | const [inline, virtual] |
Returns the absolute path within Silo file if writeToSilo() or setSiloPath() was called before, the empty string otherwise.
Implements weipa::DomainChunk.
References siloPath.
StringVec weipa::FinleyDomain::getVarNames | ( | ) | const [virtual] |
Returns the names of all 'special' domain variables.
Implements weipa::DomainChunk.
References cells, contacts, faces, initialized, and nodes.
bool weipa::FinleyDomain::initFromEscript | ( | const escript::AbstractDomain * | domain | ) | [virtual] |
Initialises the domain using an escript domain instance.
Implements weipa::DomainChunk.
References cells, cleanup(), Finley_Mesh::ContactElements, contacts, Dudley_Mesh::Elements, Finley_Mesh::Elements, Dudley_Mesh::FaceElements, Finley_Mesh::FaceElements, faces, initialized, nodes, Dudley_Mesh::Nodes, and Finley_Mesh::Nodes.
bool weipa::FinleyDomain::initFromFile | ( | const std::string & | filename | ) | [virtual] |
Reads the domain from a dump file.
Implements weipa::DomainChunk.
References cells, cleanup(), contacts, faces, initialized, and nodes.
void weipa::FinleyDomain::removeGhostZones | ( | int | ownIndex | ) | [virtual] |
Removes 'ghost' elements and nodes.
Implements weipa::DomainChunk.
References cells, contacts, faces, initialized, and nodes.
void weipa::FinleyDomain::reorderGhostZones | ( | int | ownIndex | ) | [virtual] |
Reorders elements so that 'ghost' elements (i.e. those that do not belong to ownIndex) appear last.
Implements weipa::DomainChunk.
References cells, contacts, faces, and initialized.
virtual void weipa::FinleyDomain::setSiloPath | ( | const std::string & | path | ) | [inline, virtual] |
Sets the silo path to be used when saving to a Silo file.
Implements weipa::DomainChunk.
References siloPath.
bool weipa::FinleyDomain::writeToSilo | ( | DBfile * | dbfile, |
const std::string & | pathInSilo, | ||
const StringVec & | labels, | ||
const StringVec & | units, | ||
bool | writeMeshData | ||
) | [virtual] |
Writes the domain to a Silo file.
Implements weipa::DomainChunk.
References cells, contacts, faces, initialized, and siloPath.
FinleyElements_ptr weipa::FinleyDomain::cells [private] |
FinleyElements_ptr weipa::FinleyDomain::faces [private] |
bool weipa::FinleyDomain::initialized [private] |
FinleyNodes_ptr weipa::FinleyDomain::nodes [private] |
Referenced by cleanup(), FinleyDomain(), getDataVarByName(), getNodes(), getVarNames(), initFromEscript(), initFromFile(), and removeGhostZones().
std::string weipa::FinleyDomain::siloPath [private] |
Referenced by getSiloPath(), setSiloPath(), and writeToSilo().