RipleyElements.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_RIPLEYELEMENTS_H__
#define __WEIPA_RIPLEYELEMENTS_H__
#include <weipa/ElementData.h>
#include <weipa/RipleyNodes.h>
class DBfile;
namespace ripley {
class RipleyDomain;
}
namespace weipa {
class RipleyElements;
typedef boost::shared_ptr<RipleyElements> RipleyElements_ptr;
class RipleyElements : public ElementData
{
public:
RipleyElements(const std::string& elementName, RipleyNodes_ptr nodes);
RipleyElements(const RipleyElements& e);
virtual ~RipleyElements() {}
bool initFromRipley(const ripley::RipleyDomain* ripleyDomain, int fsType);
void reorderGhostZones(int ownIndex);
void removeGhostZones(int ownIndex);
virtual void writeConnectivityVTK(std::ostream& os);
bool writeToSilo(DBfile* dbfile, const std::string& siloPath,
const StringVec& labels, const StringVec& units,
bool writeMeshData);
virtual StringVec getMeshNames() const;
virtual StringVec getVarNames() const;
virtual int getNumElements() const { return numElements; }
virtual int getNodesPerElement() const { return nodesPerElement; }
virtual int getGhostCount() const { return numGhostElements; }
virtual ZoneType getType() const { return type; }
virtual const IntVec& getNodeList() const { return nodes; }
virtual const IntVec& getIDs() const { return ID; }
virtual const IntVec& getVarDataByName(const std::string varName) const;
virtual NodeData_ptr getNodes() const { return nodeMesh; }
virtual ElementData_ptr getReducedElements() const { return ElementData_ptr(); }
virtual const QuadMaskInfo& getQuadMask(int functionSpace) const { return quadMask; }
virtual int getElementFactor() const { return 1; }
private:
RipleyElements() {}
void buildMeshes();
IntVec prepareGhostIndices(int ownIndex);
void reorderArray(IntVec& v, const IntVec& idx, int elementsPerIndex);
RipleyNodes_ptr nodeMesh;
RipleyNodes_ptr originalMesh;
std::string name;
int numElements;
int numGhostElements;
int nodesPerElement;
ZoneType type;
IntVec nodes;
IntVec ID, tag, owner;
QuadMaskInfo quadMask; // dummy
};
} // namespace weipa
#endif // __WEIPA_RIPLEYELEMENTS_H__
weipa::RipleyElements::nodesPerElement
int nodesPerElement
Definition: RipleyElements.h:133
weipa::RipleyElements::getNumElements
virtual int getNumElements() const
Returns the number of elements.
Definition: RipleyElements.h:86
weipa::QuadMaskInfo
This struct holds a mask (0&#39;s and 1&#39;s) that indicates which quad nodes contribute to a sub-element wh...
Definition: ElementData.h:39
weipa::RipleyElements::quadMask
QuadMaskInfo quadMask
Definition: RipleyElements.h:137
weipa::RipleyNodes_ptr
boost::shared_ptr< RipleyNodes > RipleyNodes_ptr
Definition: RipleyNodes.h:30
weipa::ElementData
Stores and manipulates one type of domain elements.
Definition: ElementData.h:48
weipa::RipleyElements::getGhostCount
virtual int getGhostCount() const
Returns the number of "ghost" elements.
Definition: RipleyElements.h:92
weipa::RipleyElements::getNodes
virtual NodeData_ptr getNodes() const
Returns the node mesh instance used by the elements.
Definition: RipleyElements.h:109
weipa::StringVec
std::vector< std::string > StringVec
Definition: weipa.h:60
weipa::RipleyElements::getIDs
virtual const IntVec & getIDs() const
Returns a vector of element IDs.
Definition: RipleyElements.h:101
weipa::RipleyElements::getElementFactor
virtual int getElementFactor() const
If the original element type is not supported they are subdivided into N smaller elements (e...
Definition: RipleyElements.h:120
weipa
Definition: DataVar.cpp:50
weipa::IntVec
std::vector< int > IntVec
Definition: weipa.h:59
weipa::ZoneType
ZoneType
Definition: ElementData.h:26
weipa::RipleyElements::name
std::string name
Definition: RipleyElements.h:130
weipa::RipleyElements::getQuadMask
virtual const QuadMaskInfo & getQuadMask(int functionSpace) const
Returns a QuadMaskInfo structure for given functionspace code.
Definition: RipleyElements.h:115
ripley::RipleyDomain
RipleyDomain extends the AbstractContinuousDomain interface for the Ripley library and is the base cl...
Definition: ripley/src/RipleyDomain.h:101
weipa::RipleyElements
Stores and manipulates one type of ripley mesh elements (cells, faces).
Definition: RipleyElements.h:44
weipa::RipleyElements::tag
IntVec tag
Definition: RipleyElements.h:136
weipa::RipleyElements_ptr
boost::shared_ptr< RipleyElements > RipleyElements_ptr
Definition: RipleyElements.h:32
weipa::RipleyElements::~RipleyElements
virtual ~RipleyElements()
Destructor.
Definition: RipleyElements.h:55
weipa::RipleyElements::originalMesh
RipleyNodes_ptr originalMesh
Definition: RipleyElements.h:129
weipa::RipleyElements::RipleyElements
RipleyElements()
Definition: RipleyElements.h:123
weipa::RipleyElements::type
ZoneType type
Definition: RipleyElements.h:134
weipa::RipleyElements::getNodeList
virtual const IntVec & getNodeList() const
Returns a vector of the node IDs used by the elements.
Definition: RipleyElements.h:98
weipa::RipleyElements::numElements
int numElements
Definition: RipleyElements.h:131
ripley
Definition: ripley/src/AbstractAssembler.h:25
weipa::RipleyElements::nodes
IntVec nodes
Definition: RipleyElements.h:135
weipa::RipleyElements::getReducedElements
virtual ElementData_ptr getReducedElements() const
Returns the reduced elements.
Definition: RipleyElements.h:112
weipa::ElementData_ptr
boost::shared_ptr< ElementData > ElementData_ptr
Definition: weipa.h:66
weipa::RipleyElements::getNodesPerElement
virtual int getNodesPerElement() const
Returns the number of nodes per element.
Definition: RipleyElements.h:89
weipa::NodeData_ptr
boost::shared_ptr< NodeData > NodeData_ptr
Definition: weipa.h:68
weipa::RipleyElements::getType
virtual ZoneType getType() const
Returns the type of the elements.
Definition: RipleyElements.h:95
weipa::RipleyElements::nodeMesh
RipleyNodes_ptr nodeMesh
Definition: RipleyElements.h:128
weipa::RipleyElements::numGhostElements
int numGhostElements
Definition: RipleyElements.h:132