MeshKit  1.0
MBVolOp.hpp
Go to the documentation of this file.
00001 /*
00002  * MBVolOp.h
00003  *
00004  *  Created on: Jan 13, 2012
00005  */
00006 
00007 #ifndef MBVOLOP_H_
00008 #define MBVOLOP_H_
00009 
00010 #include "meshkit/MeshScheme.hpp"
00011 #include "moab/GeomTopoTool.hpp"
00012 #include "moab/FBEngine.hpp"
00013 
00014 namespace MeshKit {
00015 
00016 class MBVolOp: public MeshKit::MeshScheme {
00017 public:
00018   MBVolOp(MKCore *mk_core, const MEntVector &me_vec);
00019   virtual ~MBVolOp();
00020   //  globalIds: to identify / single out the gfaces to be weaved
00021     // the gface will be found among gfaces in the mentSelection
00022   // gface sources, targets
00023   void add_pair(int source, int target);// these are global ids in input ment vectors
00024   // or maybe orders in some lists?
00025 
00026   // this is the main direction of sweeping / weaving
00027   void set_direction(double x, double y, double z)
00028       {_direction[0]=x; _direction[1]=y; _direction[2]=z;}
00029   //set up the weaving, needed for volume creation
00030   virtual void setup_this();
00031 
00032   // construct the mesh
00033   virtual void execute_this();
00034 
00036   static const char* name()
00037   {
00038     return "MBVolOp";
00039   }
00040 
00041   static bool can_mesh(iBase_EntityType dim)
00042   {
00043     return false;
00044   }
00045 
00052   static bool can_mesh(ModelEnt *me)
00053   {
00054     return false;// this is not used for meshing, but for geometry creation
00055   }
00056 
00060   static const moab::EntityType* output_types();
00061 
00065   virtual const moab::EntityType* mesh_types_arr() const
00066   {
00067     return output_types();
00068   }
00069 
00070 
00071 private:
00076   void establish_mapping();
00077 
00078   double _direction[3];
00079   moab::GeomTopoTool * _pGTT ;
00080   moab::EntityHandle _rootSet;// this is the root set for gtt result
00081   std::map<moab::EntityHandle, moab::EntityHandle> vertexMap;
00082   std::map<moab::EntityHandle, moab::EntityHandle> edgeMap;
00083   std::map<moab::EntityHandle, moab::EntityHandle> faceMap;
00084   moab::FBEngine * _fbe;
00085 };
00086 
00087 }// namespace MeshKit
00088 
00089 #endif /* MBVOLOP_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines