weipa::RipleyDomain Class Reference

Represents a full Ripley domain including nodes and elements. More...

`#include <RipleyDomain.h>`

Inheritance diagram for weipa::RipleyDomain:

## Public Member Functions

| RipleyDomain ()
| RipleyDomain (const RipleyDomain &m)
virtual | ~RipleyDomain ()
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 Attributes

bool | initialized
RipleyNodes_ptr | nodes
RipleyElements_ptr | cells
RipleyElements_ptr | faces
std::string | siloPath

## Additional Inherited Members

Protected Member Functions inherited from weipa::DomainChunk
virtual | ~DomainChunk ()
| Destructor. More...

## Detailed Description

Represents a full Ripley domain including nodes and elements.

This class represents a Ripley domain including nodes, cells, and face elements. It provides functionality to read a domain from a file (generated by the domain's dump() method) or directly through an instance of RipleyDomain.

Once initialised, the domain can be saved to a Silo file or its nodes and elements accessed through the respective methods.

## Constructor & Destructor Documentation

## RipleyDomain() [1/2]

weipa::RipleyDomain::RipleyDomain | ( |  | ) |

## RipleyDomain() [2/2]

weipa::RipleyDomain::RipleyDomain | ( | const RipleyDomain & | m | ) |

References cells, faces, initialized, and nodes.

## ~RipleyDomain()

virtual weipa::RipleyDomain::~RipleyDomain | ( |  | ) |

inline virtual

References getCenteringForFunctionSpace(), getDataVarByName(), getElementsByName(), getElementsForFunctionSpace(), getMeshByName(), getMeshForFunctionSpace(), getMeshNames(), getVarNames(), initFromEscript(), initFromFile(), removeGhostZones(), reorderGhostZones(), and writeToSilo().

## Member Function Documentation

## getCenteringForFunctionSpace()

Centering weipa::RipleyDomain::getCenteringForFunctionSpace | ( | int | fsCode | ) | const

virtual

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

Implements weipa::DomainChunk.

References weipa::NODE_CENTERED, ripley::Nodes, ripley::ReducedNodes, and weipa::ZONE_CENTERED.

Referenced by ~RipleyDomain().

## getDataVarByName()

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

virtual

Creates and returns a variable with domain data.

Implements weipa::DomainChunk.

References cells, ripley::Elements, ripley::FaceElements, faces, getElementsByName(), getNodes(), initialized, weipa::NODE_CENTERED, ripley::Nodes, nodes, and weipa::ZONE_CENTERED.

Referenced by ~RipleyDomain().

## getElementsByName()

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

virtual

Returns element data with given name.

Implements weipa::DomainChunk.

References cells, and faces.

Referenced by getDataVarByName(), getMeshByName(), and ~RipleyDomain().

## getElementsForFunctionSpace()

ElementData_ptr weipa::RipleyDomain::getElementsForFunctionSpace | ( | int | fsCode | ) | const

virtual

Returns the element data for given function space code.

Implements weipa::DomainChunk.

References cells, ripley::Elements, ripley::FaceElements, faces, initialized, ripley::Nodes, ripley::ReducedElements, ripley::ReducedFaceElements, and ripley::ReducedNodes.

Referenced by getMeshForFunctionSpace(), and ~RipleyDomain().

## getMeshByName()

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

virtual

Returns the node mesh with given name.

Implements weipa::DomainChunk.

References getElementsByName(), and initialized.

Referenced by ~RipleyDomain().

## getMeshForFunctionSpace()

NodeData_ptr weipa::RipleyDomain::getMeshForFunctionSpace | ( | int | fsCode | ) | const

virtual

Returns the node mesh for given function space code.

Implements weipa::DomainChunk.

References getElementsForFunctionSpace(), and initialized.

Referenced by ~RipleyDomain().

## getMeshNames()

StringVec weipa::RipleyDomain::getMeshNames | ( |  | ) | const

virtual

Returns the names of all meshes within this domain.

Implements weipa::DomainChunk.

References cells, faces, and initialized.

Referenced by ~RipleyDomain().

## getNodes()

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

inline virtual

Returns a pointer to the full nodes.

Implements weipa::DomainChunk.

References nodes.

Referenced by getDataVarByName().

## getSiloPath()

virtual std::string weipa::RipleyDomain::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.

## getVarNames()

StringVec weipa::RipleyDomain::getVarNames | ( |  | ) | const

virtual

Returns the names of all 'special' domain variables.

Implements weipa::DomainChunk.

References cells, faces, initialized, and nodes.

Referenced by ~RipleyDomain().

## initFromEscript()

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

virtual

Initialises the domain using an escript domain instance.

Implements weipa::DomainChunk.

References cells, ripley::Elements, ripley::FaceElements, faces, initialized, and nodes.

Referenced by ~RipleyDomain().

## initFromFile()

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

virtual

Reads the domain from a dump file.

Implements weipa::DomainChunk.

Referenced by ~RipleyDomain().

## removeGhostZones()

void weipa::RipleyDomain::removeGhostZones | ( | int | ownIndex | ) |

virtual

Removes 'ghost' elements and nodes.

Implements weipa::DomainChunk.

References cells, faces, initialized, and nodes.

Referenced by ~RipleyDomain().

## reorderGhostZones()

void weipa::RipleyDomain::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, faces, and initialized.

Referenced by ~RipleyDomain().

## setSiloPath()

virtual void weipa::RipleyDomain::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.

## writeToSilo()

bool weipa::RipleyDomain::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, faces, initialized, and siloPath.

Referenced by ~RipleyDomain().

## Member Data Documentation

## cells

RipleyElements_ptr weipa::RipleyDomain::cells

private

Referenced by getDataVarByName(), getElementsByName(), getElementsForFunctionSpace(), getMeshNames(), getVarNames(), initFromEscript(), removeGhostZones(), reorderGhostZones(), RipleyDomain(), and writeToSilo().

## faces

RipleyElements_ptr weipa::RipleyDomain::faces

private

Referenced by getDataVarByName(), getElementsByName(), getElementsForFunctionSpace(), getMeshNames(), getVarNames(), initFromEscript(), removeGhostZones(), reorderGhostZones(), RipleyDomain(), and writeToSilo().

## initialized

bool weipa::RipleyDomain::initialized

private

Referenced by getDataVarByName(), getElementsForFunctionSpace(), getMeshByName(), getMeshForFunctionSpace(), getMeshNames(), getVarNames(), initFromEscript(), removeGhostZones(), reorderGhostZones(), RipleyDomain(), and writeToSilo().

## nodes

RipleyNodes_ptr weipa::RipleyDomain::nodes

private

Referenced by getDataVarByName(), getNodes(), getVarNames(), initFromEscript(), removeGhostZones(), and RipleyDomain().

## siloPath

std::string weipa::RipleyDomain::siloPath

private

Referenced by getSiloPath(), setSiloPath(), and writeToSilo().

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

- weipa/src/RipleyDomain.h
- weipa/src/RipleyDomain.cpp