DomainChunk.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2017 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 by Centre for Geoscience Computing (GeoComp)
*
*****************************************************************************/
#ifndef __WEIPA_DOMAINCHUNK_H__
#define __WEIPA_DOMAINCHUNK_H__
#include <weipa/weipa.h>
class DBfile;
namespace escript {
class AbstractDomain;
}
namespace weipa {
typedef enum {
NODE_CENTERED=0,
ZONE_CENTERED
} Centering;
class DomainChunk
{
public:
virtual bool initFromEscript(const escript::AbstractDomain* domain) = 0;
virtual bool initFromFile(const std::string& filename) = 0;
virtual bool writeToSilo(DBfile* dbfile, const std::string& pathInSilo,
const StringVec& labels,
const StringVec& units,
bool writeMeshData) = 0;
virtual void reorderGhostZones(int ownIndex) = 0;
virtual void removeGhostZones(int ownIndex) = 0;
virtual StringVec getMeshNames() const = 0;
virtual StringVec getVarNames() const = 0;
virtual ElementData_ptr getElementsByName(const std::string& name) const=0;
virtual NodeData_ptr getMeshByName(const std::string& name) const = 0;
virtual DataVar_ptr getDataVarByName(const std::string& name) const = 0;
virtual Centering getCenteringForFunctionSpace(int fsCode) const = 0;
virtual NodeData_ptr getMeshForFunctionSpace(int fsCode) const = 0;
virtual ElementData_ptr getElementsForFunctionSpace(int fsCode) const = 0;
virtual NodeData_ptr getNodes() const = 0;
virtual std::string getSiloPath() const = 0;
virtual void setSiloPath(const std::string& path) = 0;
protected:
virtual ~DomainChunk() {}
};
} // namespace weipa
#endif // __WEIPA_DOMAINCHUNK_H__
escript
Definition: AbstractContinuousDomain.cpp:22
weipa::StringVec
std::vector< std::string > StringVec
Definition: weipa.h:60
weipa::ZONE_CENTERED
Definition: DomainChunk.h:32
weipa
Definition: DataVar.cpp:50
weipa::NODE_CENTERED
Definition: DomainChunk.h:31
weipa::DomainChunk
Abstract base class for weipa&#39;s interface to an Escript domain or one chunk thereof if domain decompo...
Definition: DomainChunk.h:45
weipa::DataVar_ptr
boost::shared_ptr< DataVar > DataVar_ptr
Definition: weipa.h:64
weipa::Centering
Centering
Definition: DomainChunk.h:30
weipa::DomainChunk::~DomainChunk
virtual ~DomainChunk()
Destructor.
Definition: DomainChunk.h:104
weipa::ElementData_ptr
boost::shared_ptr< ElementData > ElementData_ptr
Definition: weipa.h:66
escript::AbstractDomain
Base class for all escript domains.
Definition: AbstractDomain.h:45
weipa::NodeData_ptr
boost::shared_ptr< NodeData > NodeData_ptr
Definition: weipa.h:68