MeshKit  1.0
MesquiteOpt.hpp
Go to the documentation of this file.
00001 #ifndef MESHKIT_MESQUITE_OPT_HPP
00002 #define MESHKIT_MESQUITE_OPT_HPP
00003 
00004 #include "IQInterface.hpp"
00005 #include "meshkit/MeshOp.hpp"
00006 #include "iBase.h"
00007 
00008 namespace MeshKit {
00009 
00017 class MesquiteOpt : public MeshOp
00018 {
00019   public:
00020   
00021     MesquiteOpt( MKCore* core, const MEntVector &me_vec = MEntVector());
00022 
00024     static const char* name();
00025     
00027     void set_mesquite_op( Mesquite::IQInterface* msq_algo ) { msqAlgo = msq_algo; }
00028     
00030     iBase_TagHandle get_fixed_tag();
00031 
00033     void set_fixed_tag( iBase_TagHandle tag );
00034 
00040     void set_fixed_tag( const char* name );
00041     
00046     void smooth_with_fixed_boundary();
00047     
00054     void smooth_with_free_boundary();
00055     
00056     /* virtual functions from MeshOp */
00057     virtual void setup_this();
00058     virtual void execute_this();
00059     virtual const moab::EntityType* mesh_types_arr() const
00060       { return output_types(); }
00061     
00062     /* pseudo-virtual functions from MeshOpProxy */
00063     static const moab::EntityType* output_types();
00064     static bool can_mesh( iBase_EntityType dimension );
00065     static bool can_mesh( ModelEnt* entity );
00066   
00067     void print_quality( bool yesno )
00068       { verboseOutput = yesno; }
00069   
00070   protected:
00071   
00075     void create_byte_tag();
00076   
00083     void set_fixed_tag( ModelEnt* ent, int value );
00084   
00090     void set_fixed_tag_on_skin( ModelEnt* ent, int value );
00091   
00094     bool all_model_ents_have_geom() const;
00095     
00121     void get_adjacent_entity_set( MEntSet& from_this,
00122                                   MEntVector& smooth_ents,
00123                                   iBase_EntitySetHandle& result,
00124                                   iBase_EntityType& dimension,
00125                                   bool& created_result_set );   
00126     
00134     void set_irel_both_relation();
00135     
00136   private:
00137    
00138     Mesquite::IQInterface* msqAlgo;
00139     bool fixedBoundary;
00140     bool haveFixedTag;
00141     bool createdByteTag;
00142     bool verboseOutput;
00143     iBase_TagHandle fixedTag;
00144 };
00145 
00146 inline const char* MesquiteOpt::name()
00147 {
00148   return "MesquiteOpt";
00149 }
00150 
00151 
00152 
00153 }
00154 
00155 
00156 #endif // MESHKIT_MESQUITE_OPT_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines