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