ElementData.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_ELEMENTDATA_H__
#define __WEIPA_ELEMENTDATA_H__
#include <weipa/weipa.h>
#include <weipa/vtkCellType.h>
#include <ostream>
namespace weipa {
typedef enum {
ZONETYPE_UNKNOWN=0,
ZONETYPE_BEAM=VTK_LINE,
ZONETYPE_HEX=VTK_HEXAHEDRON,
ZONETYPE_POLYGON=VTK_POLYGON,
ZONETYPE_QUAD=VTK_QUAD,
ZONETYPE_TET=VTK_TETRA,
ZONETYPE_TRIANGLE=VTK_TRIANGLE
} ZoneType;
struct QuadMaskInfo {
std::vector<IntVec> mask;
IntVec factor;
};
class ElementData
{
public:
virtual void writeConnectivityVTK(std::ostream& os) = 0;
virtual StringVec getMeshNames() const = 0;
virtual StringVec getVarNames() const = 0;
virtual int getNumElements() const = 0;
virtual int getNodesPerElement() const = 0;
virtual int getGhostCount() const = 0;
virtual ZoneType getType() const = 0;
virtual const IntVec& getNodeList() const = 0;
virtual const IntVec& getIDs() const = 0;
virtual NodeData_ptr getNodes() const = 0;
virtual ElementData_ptr getReducedElements() const = 0;
virtual const QuadMaskInfo& getQuadMask(int fsCode) const = 0;
virtual int getElementFactor() const = 0;
protected:
virtual ~ElementData() {}
};
} // namespace weipa
#endif // __WEIPA_ELEMENTDATA_H__
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::QuadMaskInfo::mask
std::vector< IntVec > mask
Definition: ElementData.h:40
weipa::ZONETYPE_TRIANGLE
Definition: ElementData.h:33
weipa::ElementData
Stores and manipulates one type of domain elements.
Definition: ElementData.h:48
weipa::ZONETYPE_TET
Definition: ElementData.h:32
VTK_LINE
#define VTK_LINE
Definition: vtkCellType.h:39
weipa::ZONETYPE_UNKNOWN
Definition: ElementData.h:27
weipa::StringVec
std::vector< std::string > StringVec
Definition: weipa.h:60
weipa::ZONETYPE_QUAD
Definition: ElementData.h:31
weipa
Definition: DataVar.cpp:50
weipa::ZONETYPE_POLYGON
Definition: ElementData.h:30
weipa::IntVec
std::vector< int > IntVec
Definition: weipa.h:59
weipa::ZoneType
ZoneType
Definition: ElementData.h:26
VTK_TETRA
#define VTK_TETRA
Definition: vtkCellType.h:46
VTK_HEXAHEDRON
#define VTK_HEXAHEDRON
Definition: vtkCellType.h:48
weipa::QuadMaskInfo::factor
IntVec factor
Definition: ElementData.h:41
VTK_POLYGON
#define VTK_POLYGON
Definition: vtkCellType.h:43
weipa::ElementData_ptr
boost::shared_ptr< ElementData > ElementData_ptr
Definition: weipa.h:66
VTK_TRIANGLE
#define VTK_TRIANGLE
Definition: vtkCellType.h:41
weipa::ElementData::~ElementData
virtual ~ElementData()
Definition: ElementData.h:93
weipa::NodeData_ptr
boost::shared_ptr< NodeData > NodeData_ptr
Definition: weipa.h:68
VTK_QUAD
#define VTK_QUAD
Definition: vtkCellType.h:45
weipa::ZONETYPE_BEAM
Definition: ElementData.h:28
weipa::ZONETYPE_HEX
Definition: ElementData.h:29