escript  Revision_
ElementData.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 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_ELEMENTDATA_H__
18 #define __WEIPA_ELEMENTDATA_H__
19 
20 #include <weipa/weipa.h>
21 #include <weipa/vtkCellType.h>
22 #include <ostream>
23 
24 namespace weipa {
25 
26 typedef enum {
34 } ZoneType;
35 
39 struct QuadMaskInfo {
40  std::vector<IntVec> mask;
42 };
43 
49 {
50 public:
52  virtual void writeConnectivityVTK(std::ostream& os) = 0;
53 
55  virtual StringVec getMeshNames() const = 0;
56 
58  virtual StringVec getVarNames() const = 0;
59 
61  virtual int getNumElements() const = 0;
62 
64  virtual int getNodesPerElement() const = 0;
65 
67  virtual int getGhostCount() const = 0;
68 
70  virtual ZoneType getType() const = 0;
71 
73  virtual const IntVec& getNodeList() const = 0;
74 
76  virtual const IntVec& getIDs() const = 0;
77 
79  virtual NodeData_ptr getNodes() const = 0;
80 
82  virtual ElementData_ptr getReducedElements() const = 0;
83 
85  virtual const QuadMaskInfo& getQuadMask(int fsCode) const = 0;
86 
90  virtual int getElementFactor() const = 0;
91 
92 protected:
93  virtual ~ElementData() {}
94 };
95 
96 } // namespace weipa
97 
98 #endif // __WEIPA_ELEMENTDATA_H__
99 
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
std::vector< IntVec > mask
Definition: ElementData.h:40
Definition: ElementData.h:33
Stores and manipulates one type of domain elements.
Definition: ElementData.h:48
Definition: ElementData.h:32
#define VTK_LINE
Definition: vtkCellType.h:39
Definition: ElementData.h:27
std::vector< std::string > StringVec
Definition: weipa.h:60
Definition: ElementData.h:31
Definition: DataVar.cpp:39
Definition: ElementData.h:30
std::vector< int > IntVec
Definition: weipa.h:59
ZoneType
Definition: ElementData.h:26
#define VTK_TETRA
Definition: vtkCellType.h:46
#define VTK_HEXAHEDRON
Definition: vtkCellType.h:48
IntVec factor
Definition: ElementData.h:41
#define VTK_POLYGON
Definition: vtkCellType.h:43
boost::shared_ptr< ElementData > ElementData_ptr
Definition: weipa.h:66
#define VTK_TRIANGLE
Definition: vtkCellType.h:41
virtual ~ElementData()
Definition: ElementData.h:93
boost::shared_ptr< NodeData > NodeData_ptr
Definition: weipa.h:68
#define VTK_QUAD
Definition: vtkCellType.h:45
Definition: ElementData.h:28
Definition: ElementData.h:29