weipa::FinleyDomain Class Reference

Represents a full Finley or Dudley domain including nodes and elements. More...

`#include <FinleyDomain.h>`

Inheritance diagram for weipa::FinleyDomain:

## 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

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

## Detailed Description

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.

## Constructor & Destructor Documentation

## FinleyDomain() [1/2]

weipa::FinleyDomain::FinleyDomain | ( |  | ) |

## FinleyDomain() [2/2]

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

References cells, contacts, faces, initialized, and nodes.

## ~FinleyDomain()

weipa::FinleyDomain::~FinleyDomain | ( |  | ) |

virtual

References cleanup().

## Member Function Documentation

## cleanup()

void weipa::FinleyDomain::cleanup | ( |  | ) |

private

References cells, contacts, faces, initialized, and nodes.

Referenced by initFromEscript(), initFromFile(), and ~FinleyDomain().

## getCenteringForFunctionSpace()

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

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.

## getDataVarByName()

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, 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.

## getElementsByName()

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().

## getElementsForFunctionSpace()

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

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().

## getMeshByName()

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.

## getMeshForFunctionSpace()

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.

## getMeshNames()

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

virtual

Returns the names of all meshes within this domain.

Implements weipa::DomainChunk.

References cells, contacts, faces, and initialized.

## getNodes()

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

inline virtual

Returns a pointer to the full nodes.

Implements weipa::DomainChunk.

References nodes.

Referenced by getDataVarByName().

## getSiloPath()

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.

## getVarNames()

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

virtual

Returns the names of all 'special' domain variables.

Implements weipa::DomainChunk.

References cells, contacts, faces, initialized, and nodes.

## initFromEscript()

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

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.

## initFromFile()

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.

## removeGhostZones()

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

virtual

Removes 'ghost' elements and nodes.

Implements weipa::DomainChunk.

References cells, contacts, faces, initialized, and nodes.

## reorderGhostZones()

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.

## setSiloPath()

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.

## writeToSilo()

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.

## Member Data Documentation

## cells

FinleyElements_ptr weipa::FinleyDomain::cells

private

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

## contacts

FinleyElements_ptr weipa::FinleyDomain::contacts

private

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

## faces

FinleyElements_ptr weipa::FinleyDomain::faces

private

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

## initialized

bool weipa::FinleyDomain::initialized

private

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

## nodes

FinleyNodes_ptr weipa::FinleyDomain::nodes

private

Referenced by cleanup(), FinleyDomain(), getDataVarByName(), getNodes(), getVarNames(), initFromEscript(), initFromFile(), and removeGhostZones().

## siloPath

std::string weipa::FinleyDomain::siloPath

private

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

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

- weipa/src/FinleyDomain.h
- weipa/src/FinleyDomain.cpp