escript  Revision_
NodeData.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2018 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 #ifndef __WEIPA_NODEDATA_H__
18 #define __WEIPA_NODEDATA_H__
19 
20 #include <weipa/weipa.h>
21 #include <ostream>
22 
23 namespace weipa {
24 
26 class NodeData
27 {
28 public:
30  virtual void writeCoordinatesVTK(std::ostream& os, int ownIndex) = 0;
31 
33  virtual StringVec getVarNames() const = 0;
34 
36  virtual std::string getName() const = 0;
37 
39  virtual std::string getFullSiloName() const = 0;
40 
42  virtual const IntVec& getNodeIDs() const = 0;
43 
45  virtual const IntVec& getNodeDistribution() const = 0;
46 
48  virtual const IntVec& getGlobalNodeIndices() const = 0;
49 
51  virtual const CoordArray& getCoords() const = 0;
52 
54  virtual int getNumDims() const = 0;
55 
57  virtual int getNumNodes() const = 0;
58 
60  virtual int getGlobalNumNodes() const = 0;
61 
62 protected:
64  virtual ~NodeData() {}
65 };
66 
67 } // namespace weipa
68 
69 #endif // __WEIPA_NODEDATA_H__
70 
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:489
paso::InputError
Definition: Paso.h:68
weipa
Definition: DataVar.cpp:49
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:35
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
Definition: Paso.h:70
Paso.h
paso::util::update
void update(dim_t n, double a, double *x, double b, const double *y)
Definition: PasoUtil.cpp:362
paso::util::l2
double l2(dim_t n, const double *x, escript::JMPI mpiinfo)
returns the global L2 norm of x
Definition: PasoUtil.cpp:524
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:87
weipa::CoordArray
std::vector< float * > CoordArray
Definition: weipa.h:60
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:53
paso::MaxIterReached
Definition: Paso.h:67
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:87
PasoUtil.h
weipa::StringVec
std::vector< std::string > StringVec
Definition: weipa.h:59
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:54
weipa::NodeData::getGlobalNumNodes
virtual int getGlobalNumNodes() const =0
Returns the total number of mesh nodes for a distributed mesh.
paso
Definition: BiCGStab.cpp:25
weipa::IntVec
std::vector< int > IntVec
Definition: weipa.h:58
paso::NoError
Definition: Paso.h:66
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.