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::getCoords
virtual const CoordArray & getCoords() const =0
Returns the coordinates of the mesh nodes.
paso::util::lsup
double lsup(dim_t n, const double *x, escript::JMPI mpiinfo)
returns the global Lsup of x
Definition: PasoUtil.cpp:495
paso::InputError
@ InputError
Definition: Paso.h:74
weipa
Definition: DataVar.cpp:51
Options.h
weipa::NodeData::getNodeIDs
virtual const IntVec & getNodeIDs() const =0
Returns the node ID array.
paso::Solver_GMRES2
SolverResult Solver_GMRES2(Function *F, const double *f0, const double *x0, double *dx, dim_t *iter, double *tolerance, Performance *pp)
Definition: GMRES2.cpp:39
weipa::NodeData::getNumNodes
virtual int getNumNodes() const =0
Returns the number of mesh nodes.
weipa::NodeData::getNodeDistribution
virtual const IntVec & getNodeDistribution() const =0
Returns the node distribution array.
Solver.h
paso::Breakdown
@ Breakdown
Definition: Paso.h:76
Paso.h
paso::util::update
void update(dim_t n, double a, double *x, double b, const double *y)
Definition: PasoUtil.cpp:368
paso::util::l2
double l2(dim_t n, const double *x, escript::JMPI mpiinfo)
returns the global L2 norm of x
Definition: PasoUtil.cpp:530
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:93
weipa::CoordArray
std::vector< float * > CoordArray
Definition: weipa.h:62
weipa::NodeData::getFullSiloName
virtual std::string getFullSiloName() const =0
Returns full Silo mesh name, e.g. "/block0000/Nodes".
weipa::NodeData::getGlobalNodeIndices
virtual const IntVec & getGlobalNodeIndices() const =0
Returns the global node index array.
paso::SolverResult
SolverResult
Definition: Paso.h:57
paso::MaxIterReached
@ MaxIterReached
Definition: Paso.h:73
weipa::NodeData::getName
virtual std::string getName() const =0
Returns the name of this node mesh.
weipa::NodeData::~NodeData
virtual ~NodeData()
Virtual destructor.
Definition: NodeData.h:93
PasoUtil.h
weipa::StringVec
std::vector< std::string > StringVec
Definition: weipa.h:61
weipa::NodeData::writeCoordinatesVTK
virtual void writeCoordinatesVTK(std::ostream &os, int ownIndex)=0
Writes coordinates to a stream in VTK text format.
paso::Solver_NewtonGMRES
SolverResult Solver_NewtonGMRES(Function *F, double *x, Options *options, Performance *pp)
Definition: NewtonGMRES.cpp:58
weipa::NodeData::getGlobalNumNodes
virtual int getGlobalNumNodes() const =0
Returns the total number of mesh nodes for a distributed mesh.
paso
Definition: BiCGStab.cpp:26
weipa::IntVec
std::vector< int > IntVec
Definition: weipa.h:60
paso::NoError
@ NoError
Definition: Paso.h:72
weipa::NodeData::getNumDims
virtual int getNumDims() const =0
Returns the dimensionality of this mesh (2 or 3).
weipa::NodeData::getVarNames
virtual StringVec getVarNames() const =0
Returns a vector with the mesh variable names.