MeshKit  1.0
MergeMesh Class Reference

A simple class for merging meshes. More...

#include <meshkit/MergeMesh.hpp>

Inheritance diagram for MergeMesh:

List of all members.

Public Member Functions

 MergeMesh (MKCore *mkcore, const MEntVector &me_vec)
virtual ~MergeMesh ()
virtual const moab::EntityType * mesh_types_arr () const
 Return the mesh entity types operated on by this scheme.
virtual bool add_modelent (ModelEnt *model_ent)
 Re-implemented here so we can check topological dimension of model_ent.
virtual void setup_this ()
 Setup is a no-op, but must be provided since it's pure virtual.
virtual void execute_this ()
 The only setup/execute function we need, since meshing vertices is trivial.
iMeshimpl () const
void merge_entities (iBase_EntityHandle *elems, int elems_size, const double merge_tol, const int do_merge=true, const int update_sets=false, iBase_TagHandle merge_tag=0)
void perform_merge (iBase_TagHandle merged_to)
void set_merge_params (double mergeTol=1e-4, int update_sets=0, int do_merge=1, iBase_TagHandle mergeTag=NULL)

Static Public Member Functions

static const char * name ()
 Get class name.
static bool can_mesh (iBase_EntityType dim)
 Function returning whether this scheme can mesh entities of t the specified dimension.
static bool can_mesh (ModelEnt *me)
 Function returning whether this scheme can mesh the specified entity.
static const moab::EntityType * output_types ()
 Get list of mesh entity types that can be generated.

Private Member Functions

moab::ErrorCode find_merged_to (moab::AdaptiveKDTree &tree, moab::EntityHandle &tree_root, moab::Tag merged_to)
moab::ErrorCode merge_entities (moab::Range &elems, const int do_merge, const int update_sets, moab::Tag merge_tag)
moab::ErrorCode perform_merge (moab::Tag merged_to)

Private Attributes

iMeshimeshImpl
double mergeTol
double mergeTolSq
iBase_TagHandle mergeTag
int updateSets
int doMerge
moab::Interface * mbImpl
moab::Tag mbMergeTag
moab::Range deadEnts

Detailed Description

A simple class for merging meshes.

INPUT: ModelEnts representing meshes MESH TYPE(S): ALL TYPES OUTPUT: Copied mesh along with the existing mesh DEPENDENCIES: (none) CONSTRAINTS: (none)

This class performs the trivial task of merging meshes. There can be multiple instances of this class, and therefore it is pointed to and managed by ....

Each instance of this class stores all the ModelEnt's representing the mesh data, and after execution after meshing new entities are created and tag propagation happens.

Definition at line 43 of file MergeMesh.hpp.


Constructor & Destructor Documentation

MergeMesh ( MKCore mkcore,
const MEntVector me_vec 
)

Definition at line 29 of file MergeMesh.cpp.

~MergeMesh ( ) [virtual]

Definition at line 39 of file MergeMesh.cpp.


Member Function Documentation

bool add_modelent ( ModelEnt model_ent) [virtual]

Re-implemented here so we can check topological dimension of model_ent.

Parameters:
model_entModelEnt being added

Reimplemented from MeshOp.

Definition at line 44 of file MergeMesh.cpp.

bool can_mesh ( iBase_EntityType  dim) [inline, static]

Function returning whether this scheme can mesh entities of t the specified dimension.

Parameters:
dimentity dimension

Definition at line 154 of file MergeMesh.hpp.

bool can_mesh ( ModelEnt me) [inline, static]

Function returning whether this scheme can mesh the specified entity.

Used by MeshOpFactory to find scheme for an entity.

Parameters:
meModelEnt being queried
Returns:
If true, this scheme can mesh the specified ModelEnt

Definition at line 159 of file MergeMesh.hpp.

void execute_this ( ) [virtual]

The only setup/execute function we need, since meshing vertices is trivial.

Implements GraphNode.

Definition at line 64 of file MergeMesh.cpp.

moab::ErrorCode find_merged_to ( moab::AdaptiveKDTree &  tree,
moab::EntityHandle &  tree_root,
moab::Tag  merged_to 
) [private]

Definition at line 180 of file MergeMesh.cpp.

iMesh* impl ( ) const [inline]

Definition at line 100 of file MergeMesh.hpp.

void merge_entities ( iBase_EntityHandle *  elems,
int  elems_size,
const double  merge_tol,
const int  do_merge = true,
const int  update_sets = false,
iBase_TagHandle  merge_tag = 0 
)

Definition at line 88 of file MergeMesh.cpp.

moab::ErrorCode merge_entities ( moab::Range &  elems,
const int  do_merge,
const int  update_sets,
moab::Tag  merge_tag 
) [private]

Definition at line 114 of file MergeMesh.cpp.

const moab::EntityType * mesh_types_arr ( ) const [inline, virtual]

Return the mesh entity types operated on by this scheme.

Returns:
array terminated with moab::MBMAXTYPE

Implements MeshOp.

Definition at line 164 of file MergeMesh.hpp.

const char * name ( ) [inline, static]

Get class name.

Definition at line 149 of file MergeMesh.hpp.

const moab::EntityType * output_types ( ) [static]

Get list of mesh entity types that can be generated.

Returns:
array terminated with moab::MBMAXTYPE

Definition at line 26 of file MergeMesh.cpp.

void perform_merge ( iBase_TagHandle  merged_to)

Definition at line 106 of file MergeMesh.cpp.

moab::ErrorCode perform_merge ( moab::Tag  merged_to) [private]

Definition at line 156 of file MergeMesh.cpp.

void set_merge_params ( double  mergeTol = 1e-4,
int  update_sets = 0,
int  do_merge = 1,
iBase_TagHandle  mergeTag = NULL 
)

Definition at line 49 of file MergeMesh.cpp.

void setup_this ( ) [virtual]

Setup is a no-op, but must be provided since it's pure virtual.

Implements GraphNode.

Definition at line 58 of file MergeMesh.cpp.


Member Data Documentation

moab::Range deadEnts [private]

Definition at line 146 of file MergeMesh.hpp.

int doMerge [private]

Definition at line 124 of file MergeMesh.hpp.

iMesh* imeshImpl [private]

Definition at line 120 of file MergeMesh.hpp.

moab::Interface* mbImpl [private]

Definition at line 140 of file MergeMesh.hpp.

moab::Tag mbMergeTag [private]

Definition at line 143 of file MergeMesh.hpp.

iBase_TagHandle mergeTag [private]

Definition at line 122 of file MergeMesh.hpp.

double mergeTol [private]

Definition at line 121 of file MergeMesh.hpp.

double mergeTolSq [private]

Definition at line 121 of file MergeMesh.hpp.

int updateSets [private]

Definition at line 123 of file MergeMesh.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines