MeshKit  1.0
MeshOp.hpp
Go to the documentation of this file.
00001 #ifndef MESHKIT_MESHOP_HPP
00002 #define MESHKIT_MESHOP_HPP
00003 
00004 #include "meshkit/Types.hpp"
00005 #include "meshkit/MKCore.hpp"
00006 #include "meshkit/GraphNode.hpp"
00007 #include "moab/Types.hpp"
00008 #include <vector>
00009 
00010 namespace MeshKit {
00011 
00012 class ModelEnt;
00013 
00021 class MeshOp : public GraphNode
00022 {
00023 public:
00024 
00026   MeshOp(const MeshOp &mesh_op);
00027   
00029   MeshOp(MKCore *mkcore, const MEntVector &me_vec = MEntVector());
00030 
00032   virtual ~MeshOp();
00033   
00039   virtual bool add_modelent(ModelEnt *model_ent);
00040 
00045   virtual bool remove_modelent(ModelEnt *model_ent);
00046 
00048   virtual MEntSelection &me_selection();
00049 
00051   virtual const MEntSelection &me_selection() const;
00052 
00054   MKCore *mk_core() const;
00055   
00059   virtual const moab::EntityType* mesh_types_arr() const = 0;
00060 
00064   void mesh_types(std::vector<moab::EntityType> &mesh_types);
00065   
00071   void setup_boundary();
00072 
00082   void ensure_facet_dependencies(bool recurse_to_facets = true);
00083 
00088   static bool canmesh_vertex(ModelEnt *model_ent);
00089   
00094   static bool canmesh_edge(ModelEnt *model_ent);
00095   
00100   static bool canmesh_face(ModelEnt *model_ent);
00101   
00106   static bool canmesh_region(ModelEnt *model_ent);
00107 
00112   void create_model_ents_from_previous_ops();
00113 
00117   int get_debug_verbosity() { return debugLevel;} ;
00121   void set_debug_verbosity(int debug) { debugLevel = debug;} ;
00122 
00123 protected:
00125   MEntSelection mentSelection;
00126   int debugLevel;
00127 private:
00128 
00129 };
00130 
00131 inline const MEntSelection &MeshOp::me_selection() const
00132 {
00133   return mentSelection;
00134 }
00135 
00136 inline MEntSelection &MeshOp::me_selection() 
00137 {
00138   return mentSelection;
00139 }
00140 
00141 inline MKCore *MeshOp::mk_core() const
00142 {
00143   return dynamic_cast<MKCore*>(mkGraph);
00144 }
00145 
00146 } // namespace MeshKit
00147 
00148 #endif
00149 
00150   
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines