escript
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. More... | |
virtual bool | initFromFile (const std::string &filename) |
Reads the domain from a dump file. More... | |
virtual bool | writeToSilo (DBfile *dbfile, const std::string &pathInSilo, const StringVec &labels, const StringVec &units, bool writeMeshData) |
Writes the domain to a Silo file. More... | |
virtual void | reorderGhostZones (int ownIndex) |
Reorders elements so that 'ghost' elements (i.e. those that do not belong to ownIndex) appear last. More... | |
virtual void | removeGhostZones (int ownIndex) |
Removes 'ghost' elements and nodes. More... | |
virtual StringVec | getMeshNames () const |
Returns the names of all meshes within this domain. More... | |
virtual StringVec | getVarNames () const |
Returns the names of all 'special' domain variables. More... | |
virtual ElementData_ptr | getElementsByName (const std::string &name) const |
Returns element data with given name. More... | |
virtual NodeData_ptr | getMeshByName (const std::string &name) const |
Returns the node mesh with given name. More... | |
virtual DataVar_ptr | getDataVarByName (const std::string &name) const |
Creates and returns a variable with domain data. More... | |
virtual Centering | getCenteringForFunctionSpace (int fsCode) const |
Returns whether data on given function space is node or cell centered. More... | |
virtual NodeData_ptr | getMeshForFunctionSpace (int fsCode) const |
Returns the node mesh for given function space code. More... | |
virtual ElementData_ptr | getElementsForFunctionSpace (int fsCode) const |
Returns the element data for given function space code. More... | |
virtual NodeData_ptr | getNodes () const |
Returns a pointer to the full nodes. More... | |
virtual std::string | getSiloPath () const |
Returns the absolute path within Silo file if writeToSilo() or setSiloPath() was called before, the empty string otherwise. More... | |
virtual void | setSiloPath (const std::string &path) |
Sets the silo path to be used when saving to a Silo file. More... | |
Private Member Functions | |
void | cleanup () |
Private Attributes | |
bool | initialized |
FinleyNodes_ptr | nodes |
FinleyElements_ptr | cells |
FinleyElements_ptr | faces |
FinleyElements_ptr | contacts |
std::string | siloPath |
Additional Inherited Members | |
![]() | |
virtual | ~DomainChunk () |
Destructor. More... | |
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 | ( | ) |
weipa::FinleyDomain::FinleyDomain | ( | const FinleyDomain & | m | ) |
References cells, contacts, faces, initialized, and nodes.
|
virtual |
References cleanup().
|
private |
References cells, contacts, faces, initialized, and nodes.
Referenced by initFromEscript(), initFromFile(), and ~FinleyDomain().
|
virtual |
Returns whether data on given function space is node or cell centered.
Implements weipa::DomainChunk.
References DUDLEY_NODES, FINLEY_NODES, FINLEY_REDUCED_NODES, weipa::NODE_CENTERED, and weipa::ZONE_CENTERED.
|
virtual |
Creates and returns a variable with domain data.
Implements weipa::DomainChunk.
References cells, contacts, DUDLEY_ELEMENTS, DUDLEY_FACE_ELEMENTS, DUDLEY_NODES, faces, FINLEY_CONTACT_ELEMENTS_1, FINLEY_ELEMENTS, FINLEY_FACE_ELEMENTS, FINLEY_NODES, getElementsByName(), getNodes(), initialized, weipa::NODE_CENTERED, nodes, and weipa::ZONE_CENTERED.
|
virtual |
Returns element data with given name.
Implements weipa::DomainChunk.
References cells, contacts, and faces.
Referenced by getDataVarByName(), and getMeshByName().
|
virtual |
Returns the element data for given function space code.
Implements weipa::DomainChunk.
References cells, contacts, DUDLEY_ELEMENTS, DUDLEY_FACE_ELEMENTS, DUDLEY_NODES, DUDLEY_REDUCED_ELEMENTS, DUDLEY_REDUCED_FACE_ELEMENTS, faces, FINLEY_CONTACT_ELEMENTS_1, FINLEY_CONTACT_ELEMENTS_2, FINLEY_ELEMENTS, FINLEY_FACE_ELEMENTS, FINLEY_NODES, FINLEY_REDUCED_CONTACT_ELEMENTS_1, FINLEY_REDUCED_CONTACT_ELEMENTS_2, FINLEY_REDUCED_ELEMENTS, FINLEY_REDUCED_FACE_ELEMENTS, FINLEY_REDUCED_NODES, weipa::FinleyElements::getReducedElements(), finley::Hex27, finley::Hex27Macro, initialized, finley::Line3Macro, finley::Rec9, finley::Rec9Macro, finley::Tet10, finley::Tet10Macro, finley::Tri6, and finley::Tri6Macro.
Referenced by getMeshForFunctionSpace().
|
virtual |
Returns the node mesh with given name.
Implements weipa::DomainChunk.
References getElementsByName(), and initialized.
|
virtual |
Returns the node mesh for given function space code.
Implements weipa::DomainChunk.
References getElementsForFunctionSpace(), and initialized.
|
virtual |
Returns the names of all meshes within this domain.
Implements weipa::DomainChunk.
References cells, contacts, faces, and initialized.
|
inlinevirtual |
Returns a pointer to the full nodes.
Implements weipa::DomainChunk.
Referenced by getDataVarByName().
|
inlinevirtual |
Returns the absolute path within Silo file if writeToSilo() or setSiloPath() was called before, the empty string otherwise.
Implements weipa::DomainChunk.
|
virtual |
Returns the names of all 'special' domain variables.
Implements weipa::DomainChunk.
References cells, contacts, faces, initialized, and nodes.
|
virtual |
Initialises the domain using an escript domain instance.
Implements weipa::DomainChunk.
References cells, cleanup(), contacts, faces, finley::FinleyDomain::getContactElements(), dudley::DudleyDomain::getElements(), finley::FinleyDomain::getElements(), dudley::DudleyDomain::getFaceElements(), finley::FinleyDomain::getFaceElements(), dudley::DudleyDomain::getNodes(), finley::FinleyDomain::getNodes(), initialized, and nodes.
|
virtual |
Reads the domain from a dump file.
Implements weipa::DomainChunk.
References cells, cleanup(), contacts, faces, initialized, and nodes.
|
virtual |
Removes 'ghost' elements and nodes.
Implements weipa::DomainChunk.
References cells, contacts, faces, initialized, and nodes.
|
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.
|
inlinevirtual |
Sets the silo path to be used when saving to a Silo file.
Implements weipa::DomainChunk.
|
virtual |
Writes the domain to a Silo file.
Implements weipa::DomainChunk.
References cells, contacts, faces, initialized, and siloPath.
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by cleanup(), FinleyDomain(), getDataVarByName(), getVarNames(), initFromEscript(), initFromFile(), and removeGhostZones().
|
private |
Referenced by writeToSilo().