MeshKit
1.0
|
Base class for creating MeshOps that call Mesquite smoother. More...
#include <MesquiteOpt.hpp>
Public Member Functions | |
MesquiteOpt (MKCore *core, const MEntVector &me_vec=MEntVector()) | |
void | set_mesquite_op (Mesquite::IQInterface *msq_algo) |
specify mesquite optimization algorithm to execute | |
iBase_TagHandle | get_fixed_tag () |
Get handle of tag used to designate vertices as fixed. | |
void | set_fixed_tag (iBase_TagHandle tag) |
Set handle of tag used to designate vertices as fixed. | |
void | set_fixed_tag (const char *name) |
Set handle of tag used to designate vertices as fixed. | |
void | smooth_with_fixed_boundary () |
smooth only interior of mesh | |
void | smooth_with_free_boundary () |
smooth interior and exiterior of mesh | |
virtual void | setup_this () |
Pure virtual, derived class must define. | |
virtual void | execute_this () |
Pure virtual, derived class must define. | |
virtual const moab::EntityType * | mesh_types_arr () const |
Return the mesh entity types operated on by this scheme. | |
void | print_quality (bool yesno) |
Static Public Member Functions | |
static const char * | name () |
Get class name. | |
static const moab::EntityType * | output_types () |
static bool | can_mesh (iBase_EntityType dimension) |
static bool | can_mesh (ModelEnt *entity) |
Protected Member Functions | |
void | create_byte_tag () |
void | set_fixed_tag (ModelEnt *ent, int value) |
Set fixed tag on vertices of ModelEnt's mesh entities. | |
void | set_fixed_tag_on_skin (ModelEnt *ent, int value) |
Set fixed tag on boundary of ModelEnt's mesh. | |
bool | all_model_ents_have_geom () const |
Verify that all model entities have associated geometry. | |
void | get_adjacent_entity_set (MEntSet &from_this, MEntVector &smooth_ents, iBase_EntitySetHandle &result, iBase_EntityType &dimension, bool &created_result_set) |
Helper function for free smooth of multiple entities. | |
void | set_irel_both_relation () |
Change relation on iMesh side to BOTH-type. | |
Private Attributes | |
Mesquite::IQInterface * | msqAlgo |
bool | fixedBoundary |
bool | haveFixedTag |
bool | createdByteTag |
bool | verboseOutput |
iBase_TagHandle | fixedTag |
Base class for creating MeshOps that call Mesquite smoother.
This class can be used to either create a MeshOp from any custom Mesquite algorithm or Mesquite wrapper, or as a base class for MeshOp classes that implement a specific Mesquite algorithm.
Definition at line 17 of file MesquiteOpt.hpp.
MesquiteOpt | ( | MKCore * | core, |
const MEntVector & | me_vec = MEntVector() |
||
) |
Definition at line 36 of file MesquiteOpt.cpp.
bool all_model_ents_have_geom | ( | ) | const [protected] |
Verify that all model entities have associated geometry.
Definition at line 207 of file MesquiteOpt.cpp.
bool can_mesh | ( | iBase_EntityType | dimension | ) | [static] |
Definition at line 51 of file MesquiteOpt.cpp.
Definition at line 56 of file MesquiteOpt.cpp.
void create_byte_tag | ( | ) | [protected] |
Create Mesquite's internal-use tag for it so that we can create it as a dense tag.
Definition at line 106 of file MesquiteOpt.cpp.
void execute_this | ( | ) | [virtual] |
Pure virtual, derived class must define.
Implements GraphNode.
Definition at line 309 of file MesquiteOpt.cpp.
void get_adjacent_entity_set | ( | MEntSet & | from_this, |
MEntVector & | smooth_ents, | ||
iBase_EntitySetHandle & | result, | ||
iBase_EntityType & | dimension, | ||
bool & | created_result_set | ||
) | [protected] |
Helper function for free smooth of multiple entities.
For proper results when doing a free smooth of multiple model entities, the mesh for all model entities connected by a curve or surface should be smoothed together. This finds a single connected group of ModelEnts in from_this
, removes them from from_this
, and creates a single iBase_EntitySetHandle
containing the mesh of all of the ModelEnts in the connected set.
from_this | Set of ModelEnts in which to search for a group of connected ModelEnts. Connected ModelEnts are _removed_ from the passed MEntSet. |
smooth_ents | List of connected entities that are to be smoothed together. |
result | An iBase_EntitySetHandle corresponding to a set that contains all of the mesh entities of all of the connected ModelEnts removed from from_this |
dimension | If all connected ModelEnts have the same dimension, that dimension. Otherwise iBase_ALL_TYPES. |
created_result_set | True if the function created a new iBase_EntitySetHandle. Will be false if the set corresponds to a single ModelEnt that was connected to no others, in which case the returned set is just that of the ModelEnt. |
Definition at line 218 of file MesquiteOpt.cpp.
iBase_TagHandle get_fixed_tag | ( | ) |
Get handle of tag used to designate vertices as fixed.
Definition at line 61 of file MesquiteOpt.cpp.
virtual const moab::EntityType* mesh_types_arr | ( | ) | const [inline, virtual] |
Return the mesh entity types operated on by this scheme.
moab::MBMAXTYPE
Implements MeshOp.
Definition at line 59 of file MesquiteOpt.hpp.
const char * name | ( | ) | [inline, static] |
Get class name.
Definition at line 146 of file MesquiteOpt.hpp.
const moab::EntityType * output_types | ( | ) | [static] |
Definition at line 45 of file MesquiteOpt.cpp.
void print_quality | ( | bool | yesno | ) | [inline] |
Definition at line 67 of file MesquiteOpt.hpp.
void set_fixed_tag | ( | iBase_TagHandle | tag | ) |
Set handle of tag used to designate vertices as fixed.
Definition at line 68 of file MesquiteOpt.cpp.
void set_fixed_tag | ( | const char * | name | ) |
Set handle of tag used to designate vertices as fixed.
Tag will be created if it does not already exists. If tag already exists then it must be a single integer value.
Definition at line 80 of file MesquiteOpt.cpp.
void set_fixed_tag | ( | ModelEnt * | ent, |
int | value | ||
) | [protected] |
Set fixed tag on vertices of ModelEnt's mesh entities.
ent | Entity for which to set 'fixed' tag on vertices of all owned elements. |
value | Value to set 'fixed' tag to. Should be either zero or one, corresponding to free or fixed, respectively. |
Definition at line 145 of file MesquiteOpt.cpp.
void set_fixed_tag_on_skin | ( | ModelEnt * | ent, |
int | value | ||
) | [protected] |
Set fixed tag on boundary of ModelEnt's mesh.
ent | Entity for which to set 'fixed' tag on vertices of boundary |
value | Value to set 'fixed' tag to. Should be either zero or one, corresponding to free or fixed, respectively. |
Definition at line 176 of file MesquiteOpt.cpp.
void set_irel_both_relation | ( | ) | [protected] |
void set_mesquite_op | ( | Mesquite::IQInterface * | msq_algo | ) | [inline] |
specify mesquite optimization algorithm to execute
Definition at line 27 of file MesquiteOpt.hpp.
void setup_this | ( | ) | [virtual] |
Pure virtual, derived class must define.
Implements GraphNode.
Definition at line 139 of file MesquiteOpt.cpp.
void smooth_with_fixed_boundary | ( | ) |
smooth only interior of mesh
This is the default behavior
Definition at line 125 of file MesquiteOpt.cpp.
void smooth_with_free_boundary | ( | ) |
smooth interior and exiterior of mesh
This method will throw an exception if Mesquite is configured w/out iRel support or the boundary of the mesh is not constrained to geometric entities.
Definition at line 130 of file MesquiteOpt.cpp.
bool createdByteTag [private] |
Definition at line 141 of file MesquiteOpt.hpp.
bool fixedBoundary [private] |
Definition at line 139 of file MesquiteOpt.hpp.
iBase_TagHandle fixedTag [private] |
Definition at line 143 of file MesquiteOpt.hpp.
bool haveFixedTag [private] |
Definition at line 140 of file MesquiteOpt.hpp.
Mesquite::IQInterface* msqAlgo [private] |
Definition at line 138 of file MesquiteOpt.hpp.
bool verboseOutput [private] |
Definition at line 142 of file MesquiteOpt.hpp.