weipa::FinleyNodes Class Reference

Stores and manipulates finley mesh nodes. More...

`#include <FinleyNodes.h>`

Inheritance diagram for weipa::FinleyNodes:

## Public Member Functions

| FinleyNodes (const std::string &meshName)
| Constructor with mesh name. More...
| FinleyNodes (FinleyNodes_ptr fullNodes, IntVec &requiredNodes, const std::string &meshName)
| FinleyNodes (const FinleyNodes &m)
| Copy constructor. More...
virtual | ~FinleyNodes ()
| Virtual destructor. More...
bool | initFromDudley (const dudley::NodeFile *dudleyFile)
| Initialises with dudley node file. More...
bool | initFromFinley (const finley::NodeFile *finleyFile)
| Initialises with finley node file. More...
bool | readFromNc (NcFile *ncFile)
| Reads node data from a NetCDF file. More...
bool | writeToSilo (DBfile *dbfile)
| Writes node data to a Silo file. More...
virtual void | writeCoordinatesVTK (std::ostream &os, int ownIndex)
| Writes coordinates to a stream in VTK text format. More...
void | setSiloPath (const std::string &path)
| Sets the silo path to be used when saving. More...
const IntVec & | getVarDataByName (const std::string &name) const
| Returns an array of nodal data by the given name. More...
virtual StringVec | getVarNames () const
| Returns a vector with the mesh variable names. More...
virtual std::string | getName () const
| Returns the name of this node mesh. More...
std::string | getFullSiloName () const
| Returns full Silo mesh name, e.g. "/block0000/Nodes". More...
virtual const IntVec & | getNodeIDs () const
| Returns the node ID array. More...
virtual const IntVec & | getNodeDistribution () const
| Returns the node distribution array. More...
virtual const IntVec & | getGlobalNodeIndices () const
| Returns the global node index array. More...
virtual const CoordArray & | getCoords () const
| Returns the coordinates of the mesh nodes. More...
virtual int | getNumDims () const
| Returns the dimensionality of this mesh (2 or 3). More...
virtual int | getNumNodes () const
| Returns the number of mesh nodes. More...
virtual int | getGlobalNumNodes () const
| Returns the total number of mesh nodes for a distributed mesh. More...

## Protected Attributes

CoordArray | coords
int | numDims
| x, y[, z] coordinates of nodes More...
int | numNodes
| dimensionality (2 or 3) More...
IntVec | nodeID
| number of nodes More...
IntVec | nodeTag
| node IDs More...
IntVec | nodeGDOF
IntVec | nodeGNI
IntVec | nodeGRDFI
IntVec | nodeGRNI
IntVec | nodeDist
std::string | name
| node distribution More...
std::string | siloPath
| the name of this node mesh More...

## Additional Inherited Members

Protected Member Functions inherited from weipa::NodeData
virtual | ~NodeData ()
| Virtual destructor. More...

## Detailed Description

Stores and manipulates finley mesh nodes.

This class provides functionality to manipulate a finley node file. It is able to load node data from dump files or retrieve it from a finley::NodeFile instance.

## Constructor & Destructor Documentation

## FinleyNodes() [1/3]

weipa::FinleyNodes::FinleyNodes | ( | const std::string & | meshName | ) |

Constructor with mesh name.

## FinleyNodes() [2/3]

weipa::FinleyNodes::FinleyNodes | ( | FinleyNodes_ptr | fullNodes,
|  | IntVec & | requiredNodes,
|  | const std::string & | meshName
| ) |  |

References coords, nodeDist, nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, nodeTag, numDims, and numNodes.

## FinleyNodes() [3/3]

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

Copy constructor.

References coords, paso::util::copy(), name, nodeDist, nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, nodeTag, numDims, and numNodes.

## ~FinleyNodes()

weipa::FinleyNodes::~FinleyNodes | ( |  | ) |

virtual

Virtual destructor.

References coords.

## Member Function Documentation

## getCoords()

virtual const CoordArray& weipa::FinleyNodes::getCoords | ( |  | ) | const

inline virtual

Returns the coordinates of the mesh nodes.

Implements weipa::NodeData.

## getFullSiloName()

std::string weipa::FinleyNodes::getFullSiloName | ( |  | ) | const

inline virtual

Returns full Silo mesh name, e.g. "/block0000/Nodes".

Implements weipa::NodeData.

Referenced by writeToSilo().

## getGlobalNodeIndices()

virtual const IntVec& weipa::FinleyNodes::getGlobalNodeIndices | ( |  | ) | const

inline virtual

Returns the global node index array.

Implements weipa::NodeData.

## getGlobalNumNodes()

int weipa::FinleyNodes::getGlobalNumNodes | ( |  | ) | const

virtual

Returns the total number of mesh nodes for a distributed mesh.

Implements weipa::NodeData.

References nodeDist.

## getName()

virtual std::string weipa::FinleyNodes::getName | ( |  | ) | const

inline virtual

Returns the name of this node mesh.

Implements weipa::NodeData.

## getNodeDistribution()

virtual const IntVec& weipa::FinleyNodes::getNodeDistribution | ( |  | ) | const

inline virtual

Returns the node distribution array.

Implements weipa::NodeData.

## getNodeIDs()

virtual const IntVec& weipa::FinleyNodes::getNodeIDs | ( |  | ) | const

inline virtual

Returns the node ID array.

Implements weipa::NodeData.

## getNumDims()

virtual int weipa::FinleyNodes::getNumDims | ( |  | ) | const

inline virtual

Returns the dimensionality of this mesh (2 or 3).

Implements weipa::NodeData.

## getNumNodes()

virtual int weipa::FinleyNodes::getNumNodes | ( |  | ) | const

inline virtual

Returns the number of mesh nodes.

Implements weipa::NodeData.

## getVarDataByName()

const IntVec & weipa::FinleyNodes::getVarDataByName | ( | const std::string & | name | ) | const

Returns an array of nodal data by the given name.

The name must be one of the names returned by getVarNames().

References nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, and nodeTag.

## getVarNames()

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

virtual

Returns a vector with the mesh variable names.

Implements weipa::NodeData.

## initFromDudley()

bool weipa::FinleyNodes::initFromDudley | ( | const dudley::NodeFile * | dudleyFile | ) |

Initialises with dudley node file.

References dudley::NodeFile::Coordinates, coords, dudley::NodeFile::getNumNodes(), dudley::NodeFile::globalDegreesOfFreedom, dudley::NodeFile::globalNodesIndex, dudley::NodeFile::Id, nodeDist, nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, dudley::NodeFile::nodesDistribution, nodeTag, dudley::NodeFile::numDim, numDims, numNodes, and dudley::NodeFile::Tag.

## initFromFinley()

bool weipa::FinleyNodes::initFromFinley | ( | const finley::NodeFile * | finleyFile | ) |

Initialises with finley node file.

References finley::NodeFile::Coordinates, coords, finley::NodeFile::getNumNodes(), finley::NodeFile::globalDegreesOfFreedom, finley::NodeFile::globalNodesIndex, finley::NodeFile::globalReducedDOFIndex, finley::NodeFile::globalReducedNodesIndex, finley::NodeFile::Id, nodeDist, nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, finley::NodeFile::nodesDistribution, nodeTag, finley::NodeFile::numDim, numDims, numNodes, readFromNc(), and finley::NodeFile::Tag.

## readFromNc()

bool weipa::FinleyNodes::readFromNc | ( | NcFile * | ncFile | ) |

Reads node data from a NetCDF file.

References coords, nodeDist, nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, nodeTag, numDims, and numNodes.

Referenced by initFromFinley().

## setSiloPath()

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

inline

Sets the silo path to be used when saving.

## writeCoordinatesVTK()

void weipa::FinleyNodes::writeCoordinatesVTK | ( | std::ostream & | os,
|  | int | ownIndex
| ) |  |

virtual

Writes coordinates to a stream in VTK text format.

Implements weipa::NodeData.

References coords, nodeDist, nodeGNI, numDims, and numNodes.

## writeToSilo()

bool weipa::FinleyNodes::writeToSilo | ( | DBfile * | dbfile | ) |

Writes node data to a Silo file.

References getFullSiloName(), nodeGDOF, nodeGNI, nodeGRDFI, nodeGRNI, nodeID, nodeTag, numNodes, and siloPath.

## Member Data Documentation

## coords

CoordArray weipa::FinleyNodes::coords

protected

Referenced by FinleyNodes(), initFromDudley(), initFromFinley(), readFromNc(), writeCoordinatesVTK(), and ~FinleyNodes().

## name

std::string weipa::FinleyNodes::name

protected

node distribution

Referenced by FinleyNodes().

## nodeDist

IntVec weipa::FinleyNodes::nodeDist

protected

Referenced by FinleyNodes(), getGlobalNumNodes(), initFromDudley(), initFromFinley(), readFromNc(), and writeCoordinatesVTK().

## nodeGDOF

IntVec weipa::FinleyNodes::nodeGDOF

protected

Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().

## nodeGNI

IntVec weipa::FinleyNodes::nodeGNI

protected

Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), writeCoordinatesVTK(), and writeToSilo().

## nodeGRDFI

IntVec weipa::FinleyNodes::nodeGRDFI

protected

Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().

## nodeGRNI

IntVec weipa::FinleyNodes::nodeGRNI

protected

Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().

## nodeID

IntVec weipa::FinleyNodes::nodeID

protected

number of nodes

Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().

## nodeTag

IntVec weipa::FinleyNodes::nodeTag

protected

node IDs

Referenced by FinleyNodes(), getVarDataByName(), initFromDudley(), initFromFinley(), readFromNc(), and writeToSilo().

## numDims

int weipa::FinleyNodes::numDims

protected

x, y[, z] coordinates of nodes

Referenced by FinleyNodes(), initFromDudley(), initFromFinley(), readFromNc(), and writeCoordinatesVTK().

## numNodes

int weipa::FinleyNodes::numNodes

protected

dimensionality (2 or 3)

Referenced by FinleyNodes(), initFromDudley(), initFromFinley(), readFromNc(), writeCoordinatesVTK(), and writeToSilo().

## siloPath

std::string weipa::FinleyNodes::siloPath

protected

the name of this node mesh

Referenced by writeToSilo().

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

- FinleyNodes.h
- FinleyNodes.cpp