escript  Revision_
ElementData.h
Go to the documentation of this file.
00001 
00002 /*****************************************************************************
00003 *
00004 * Copyright (c) 2003-2014 by University of Queensland
00005 * http://www.uq.edu.au
00006 *
00007 * Primary Business: Queensland, Australia
00008 * Licensed under the Open Software License version 3.0
00009 * http://www.opensource.org/licenses/osl-3.0.php
00010 *
00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
00012 * Development 2012-2013 by School of Earth Sciences
00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
00014 *
00015 *****************************************************************************/
00016 
00017 #ifndef __WEIPA_ELEMENTDATA_H__
00018 #define __WEIPA_ELEMENTDATA_H__
00019 
00020 #include <weipa/weipa.h>
00021 #include <weipa/vtkCellType.h>
00022 #include <ostream>
00023 
00024 namespace weipa {
00025     
00026 typedef enum {
00027     ZONETYPE_UNKNOWN=0,
00028     ZONETYPE_BEAM=VTK_LINE,
00029     ZONETYPE_HEX=VTK_HEXAHEDRON,
00030     ZONETYPE_POLYGON=VTK_POLYGON,
00031     ZONETYPE_QUAD=VTK_QUAD,
00032     ZONETYPE_TET=VTK_TETRA,
00033     ZONETYPE_TRIANGLE=VTK_TRIANGLE
00034 } ZoneType;
00035 
00039 struct QuadMaskInfo {
00040     std::vector<IntVec> mask;
00041     IntVec factor;
00042 };
00043 
00048 class ElementData
00049 {
00050 public:
00052     virtual void writeConnectivityVTK(std::ostream& os) = 0;
00053 
00055     virtual StringVec getMeshNames() const = 0;
00056 
00058     virtual StringVec getVarNames() const = 0;
00059 
00061     virtual int getNumElements() const = 0;
00062 
00064     virtual int getNodesPerElement() const = 0;
00065 
00067     virtual int getGhostCount() const = 0;
00068 
00070     virtual ZoneType getType() const = 0;
00071 
00073     virtual const IntVec& getNodeList() const = 0;
00074 
00076     virtual const IntVec& getIDs() const = 0;
00077 
00079     virtual NodeData_ptr getNodes() const = 0;
00080 
00082     virtual ElementData_ptr getReducedElements() const = 0;
00083  
00085     virtual const QuadMaskInfo& getQuadMask(int fsCode) const = 0;
00086  
00090     virtual int getElementFactor() const = 0;
00091 
00092 protected:
00093     virtual ~ElementData() {}
00094 };
00095 
00096 } // namespace weipa
00097 
00098 #endif // __WEIPA_ELEMENTDATA_H__
00099