MeshKit  1.0
JaalMoabConverter.hpp
Go to the documentation of this file.
00001 #ifndef MOAB_QUADMESH_H
00002 #define MOAB_QUADMESH_H
00003 
00004 #include "Mesh.hpp"
00005 
00006 #include <meshkit/SimpleArray.hpp>
00007 #include <meshkit/iMesh.hpp>
00008 
00009 using namespace Jaal;
00010 
00011 class JaalMoabConverter
00012 {
00013    public:
00014     void clear()
00015     {
00016         moabnode.clear();
00017         moabface.clear();
00018         jaalnode.clear();
00019         jaalface.clear();
00020     }
00021     //  Converts the mesh into MOAB data structures.
00022     int toMOAB(Jaal::Mesh *mesh, iMesh_Instance &imesh, iBase_EntitySetHandle eset = 0);
00023 
00024     //  Fill the mesh from MOAB..
00025     Jaal::Mesh *fromMOAB(iMesh_Instance imesh, Jaal::Mesh *m = NULL, iBase_EntitySetHandle eset = 0);
00026 
00027 private:
00028     Jaal::Mesh *jmesh;
00029 
00030     iBase_EntityHandle new_MOAB_Handle(iMesh_Instance imesh, Vertex *vertex);
00031     iBase_EntityHandle new_MOAB_Handle(iMesh_Instance imesh, Face *f);
00032 
00033     std::map<PNode, iBase_EntityHandle> moabnode;
00034     std::map<PFace, iBase_EntityHandle> moabface;
00035     std::map<iBase_EntityHandle, PNode> jaalnode;
00036     std::map<iBase_EntityHandle, PFace> jaalface;
00037 };
00038 
00039 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines