NodeData.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2020 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
* Development from 2019 by School of Earth and Environmental Sciences
**
*****************************************************************************/
#ifndef __WEIPA_NODEDATA_H__
#define __WEIPA_NODEDATA_H__
#include <weipa/weipa.h>
#include <ostream>
namespace weipa {
class NodeData
{
public:
virtual void writeCoordinatesVTK(std::ostream& os, int ownIndex) = 0;
virtual StringVec getVarNames() const = 0;
virtual std::string getName() const = 0;
virtual std::string getFullSiloName() const = 0;
virtual const IntVec& getNodeIDs() const = 0;
virtual const IntVec& getNodeDistribution() const = 0;
virtual const IntVec& getGlobalNodeIndices() const = 0;
virtual const CoordArray& getCoords() const = 0;
virtual int getNumDims() const = 0;
virtual int getNumNodes() const = 0;
virtual int getGlobalNumNodes() const = 0;
protected:
virtual ~NodeData() {}
};
} // namespace weipa
#endif // __WEIPA_NODEDATA_H__
weipa::NodeData
Definition: NodeData.h:28
weipa::NodeData::getNodeIDs
virtual const IntVec & getNodeIDs() const =0
Returns the node ID array.
weipa::NodeData::~NodeData
virtual ~NodeData()
Virtual destructor.
Definition: NodeData.h:65
weipa::NodeData::getNumNodes
virtual int getNumNodes() const =0
Returns the number of mesh nodes.
weipa::NodeData::getGlobalNumNodes
virtual int getGlobalNumNodes() const =0
Returns the total number of mesh nodes for a distributed mesh.
weipa::NodeData::getNodeDistribution
virtual const IntVec & getNodeDistribution() const =0
Returns the node distribution array.
weipa::NodeData::writeCoordinatesVTK
virtual void writeCoordinatesVTK(std::ostream &os, int ownIndex)=0
Writes coordinates to a stream in VTK text format.
weipa::NodeData::getNumDims
virtual int getNumDims() const =0
Returns the dimensionality of this mesh (2 or 3).
weipa::NodeData::getName
virtual std::string getName() const =0
Returns the name of this node mesh.
weipa::NodeData::getVarNames
virtual StringVec getVarNames() const =0
Returns a vector with the mesh variable names.
weipa::NodeData::getGlobalNodeIndices
virtual const IntVec & getGlobalNodeIndices() const =0
Returns the global node index array.
weipa::NodeData::getCoords
virtual const CoordArray & getCoords() const =0
Returns the coordinates of the mesh nodes.
weipa::NodeData::getFullSiloName
virtual std::string getFullSiloName() const =0
Returns full Silo mesh name, e.g. "/block0000/Nodes".
weipa
Definition: DataVar.cpp:51
weipa::StringVec
std::vector< std::string > StringVec
Definition: weipa.h:61
weipa::IntVec
std::vector< int > IntVec
Definition: weipa.h:60
weipa::CoordArray
std::vector< float * > CoordArray
Definition: weipa.h:62