weipa::DomainChunk Class Referenceabstract

Abstract base class for weipa's interface to an Escript domain or one chunk thereof if domain decomposition was used. More...

`#include <DomainChunk.h>`

Inheritance diagram for weipa::DomainChunk:

## Public Member Functions

virtual bool | initFromEscript (const escript::AbstractDomain *domain)=0
| Initialises the domain using an escript domain instance. More...
virtual bool | initFromFile (const std::string &filename)=0
| 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)=0
| Writes the domain to a Silo file. More...
virtual void | reorderGhostZones (int ownIndex)=0
| Reorders elements so that 'ghost' elements (i.e. those that do not belong to ownIndex) appear last. More...
virtual void | removeGhostZones (int ownIndex)=0
| Removes 'ghost' elements and nodes. More...
virtual StringVec | getMeshNames () const =0
| Returns the names of all meshes within this domain. More...
virtual StringVec | getVarNames () const =0
| Returns the names of all 'special' domain variables. More...
virtual ElementData_ptr | getElementsByName (const std::string &name) const =0
| Returns element data with given name. More...
virtual NodeData_ptr | getMeshByName (const std::string &name) const =0
| Returns the node mesh with given name. More...
virtual DataVar_ptr | getDataVarByName (const std::string &name) const =0
| Creates and returns a variable with domain data. More...
virtual Centering | getCenteringForFunctionSpace (int fsCode) const =0
| Returns whether data on given function space is node or cell centered. More...
virtual NodeData_ptr | getMeshForFunctionSpace (int fsCode) const =0
| Returns the node mesh for given function space code. More...
virtual ElementData_ptr | getElementsForFunctionSpace (int fsCode) const =0
| Returns the element data for given function space code. More...
virtual NodeData_ptr | getNodes () const =0
| Returns a pointer to the full nodes. More...
virtual std::string | getSiloPath () const =0
| 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)=0
| Sets the silo path to be used when saving to a Silo file. More...

## Protected Member Functions

virtual | ~DomainChunk ()
| Destructor. More...

## Detailed Description

Abstract base class for weipa's interface to an Escript domain or one chunk thereof if domain decomposition was used.

Implementations of this class load or convert data from an Escript domain with all meshes for weipa.

Note that this class is not MPI aware, that is if domain decomposition was used then one instance of this class will hold one 'chunk' of the full domain. See the EscriptDataset class for how to process full domains.

## Constructor & Destructor Documentation

## ~DomainChunk()

virtual weipa::DomainChunk::~DomainChunk | ( |  | ) |

inline protected virtual

Destructor.

## Member Function Documentation

## getCenteringForFunctionSpace()

virtual Centering weipa::DomainChunk::getCenteringForFunctionSpace | ( | int | fsCode | ) | const

pure virtual

Returns whether data on given function space is node or cell centered.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getDataVarByName()

virtual DataVar_ptr weipa::DomainChunk::getDataVarByName | ( | const std::string & | name | ) | const

pure virtual

Creates and returns a variable with domain data.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getElementsByName()

virtual ElementData_ptr weipa::DomainChunk::getElementsByName | ( | const std::string & | name | ) | const

pure virtual

Returns element data with given name.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getElementsForFunctionSpace()

virtual ElementData_ptr weipa::DomainChunk::getElementsForFunctionSpace | ( | int | fsCode | ) | const

pure virtual

Returns the element data for given function space code.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getMeshByName()

virtual NodeData_ptr weipa::DomainChunk::getMeshByName | ( | const std::string & | name | ) | const

pure virtual

Returns the node mesh with given name.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getMeshForFunctionSpace()

virtual NodeData_ptr weipa::DomainChunk::getMeshForFunctionSpace | ( | int | fsCode | ) | const

pure virtual

Returns the node mesh for given function space code.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getMeshNames()

virtual StringVec weipa::DomainChunk::getMeshNames | ( |  | ) | const

pure virtual

Returns the names of all meshes within this domain.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getNodes()

virtual NodeData_ptr weipa::DomainChunk::getNodes | ( |  | ) | const

pure virtual

Returns a pointer to the full nodes.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getSiloPath()

virtual std::string weipa::DomainChunk::getSiloPath | ( |  | ) | const

pure virtual

Returns the absolute path within Silo file if writeToSilo() or setSiloPath() was called before, the empty string otherwise.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## getVarNames()

virtual StringVec weipa::DomainChunk::getVarNames | ( |  | ) | const

pure virtual

Returns the names of all 'special' domain variables.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## initFromEscript()

virtual bool weipa::DomainChunk::initFromEscript | ( | const escript::AbstractDomain * | domain | ) |

pure virtual

Initialises the domain using an escript domain instance.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## initFromFile()

virtual bool weipa::DomainChunk::initFromFile | ( | const std::string & | filename | ) |

pure virtual

Reads the domain from a dump file.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## removeGhostZones()

virtual void weipa::DomainChunk::removeGhostZones | ( | int | ownIndex | ) |

pure virtual

Removes 'ghost' elements and nodes.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## reorderGhostZones()

virtual void weipa::DomainChunk::reorderGhostZones | ( | int | ownIndex | ) |

pure virtual

Reorders elements so that 'ghost' elements (i.e. those that do not belong to ownIndex) appear last.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## setSiloPath()

virtual void weipa::DomainChunk::setSiloPath | ( | const std::string & | path | ) |

pure virtual

Sets the silo path to be used when saving to a Silo file.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

## writeToSilo()

virtual bool weipa::DomainChunk::writeToSilo | ( | DBfile * | dbfile,
|  | const std::string & | pathInSilo,
|  | const StringVec & | labels,
|  | const StringVec & | units,
|  | bool | writeMeshData
| ) |  |

pure virtual

Writes the domain to a Silo file.

Implemented in weipa::FinleyDomain, weipa::RipleyDomain, and weipa::SpeckleyDomain.

The documentation for this class was generated from the following file:

- DomainChunk.h