MeshKit  1.0
MeshOpTemplate.hpp
Go to the documentation of this file.
00001 #ifndef MESHKIT_MESH_OP_TEMPLATE_HPP
00002 #define MESHKIT_MESH_OP_TEMPLATE_HPP
00003 
00004 #include <cassert>
00005 #include <string>
00006 #include <vector>
00007 #include <set>
00008 
00009 #include "meshkit/Types.hpp"
00010 #include "meshkit/Error.hpp"
00011 #include "meshkit/MeshScheme.hpp"
00012 #include "meshkit/ModelEnt.hpp"
00013 
00014 #include "CESets.hpp"
00015 #include "meshkit/LocalTag.hpp"
00016 #include "meshkit/Matrix.hpp"
00017 
00018 #include "meshkit/iMesh.hpp"
00019 #include "meshkit/iGeom.hpp"
00020 
00021 namespace MeshKit {
00022 
00023 class MKCore;
00024 
00025 class MeshOpTemplate : public MeshScheme
00026 {
00027 public:
00028   /* \brief Constructor
00029    *
00030    * Create a new MeshOpTemplate instance
00031    * \param impl the iGeom instance handle for the Geom
00032    */
00033   MeshOpTemplate(MKCore *mkcore, const MEntVector &me_vec);
00034 
00035   /* \brief Destructor
00036    */
00037   virtual ~MeshOpTemplate();
00038 
00040   static const char* name();
00041 
00046   static bool can_mesh(iBase_EntityType dim);
00047 
00054   static bool can_mesh(ModelEnt *me);
00055 
00059   static const moab::EntityType* output_types();
00060 
00064   virtual const moab::EntityType* mesh_types_arr() const;
00065 
00069   virtual bool add_modelent(ModelEnt *model_ent);
00070 
00072   virtual void setup_this();
00073 
00075   virtual void execute_this();
00076 
00077   /* \brief set size
00078    *
00079    * \param vector with x y z size
00080    */
00081   void set_size(const Vector<3> &dx);
00082 
00083   void tag_copied_sets(const char **tag_names, const char **tag_vals,
00084                        const int num_tags);
00085 private:
00086   iGeom *igeomImpl;
00087   Vector<3> s_x;
00088 };
00089 
00090 inline const char* MeshOpTemplate::name()
00091 {
00092   return "MeshOpTemplate";
00093 }
00094 
00095 inline bool MeshOpTemplate::can_mesh(iBase_EntityType)
00096 {
00097   // Given just a dimension, MeshOpTemplate can't do anything since it doesn't know
00098   // what to copy.
00099   return false;
00100 }
00101 
00102 inline bool MeshOpTemplate::can_mesh(ModelEnt *)
00103 {
00104   return true;
00105 }
00106 
00107 inline const moab::EntityType* MeshOpTemplate::mesh_types_arr() const
00108 {
00109   return output_types();
00110 }
00111 
00112 } // namespace MeshKit
00113 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines