Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
A dictionary of new vertices. More...
#include <SplitVertices.hpp>
Public Types | |
typedef std::map < SplitVertexIndex< _n > , EntityHandle > | MapType |
typedef std::map < SplitVertexIndex< _n > , EntityHandle >::iterator | MapIteratorType |
Public Member Functions | |
SplitVertices (RefinerTagManager *tag_mgr) | |
virtual | ~SplitVertices () |
virtual bool | find_or_create (const EntityHandle *split_src, const double *coords, EntityHandle &vert_handle, std::map< ProcessSet, int > &proc_partition_counts, bool handles_on_output_mesh) |
virtual void | assign_global_ids (std::map< ProcessSet, int > &gids) |
A dictionary of new vertices.
A map from a set of pre-existing vertices to a new mesh vertex.
This is used as a dictionary to determine whether a new vertex should be created on the given n-simplex (n being the template parameter) or whether it has already been created as part of the refinement of a neighboring entity.
An array of existing vertex ids used as a key in a dictionary of new vertices.
Definition at line 222 of file SplitVertices.hpp.
typedef std::map< SplitVertexIndex< _n >, EntityHandle >::iterator moab::SplitVertices< _n >::MapIteratorType |
Definition at line 226 of file SplitVertices.hpp.
typedef std::map< SplitVertexIndex< _n >, EntityHandle > moab::SplitVertices< _n >::MapType |
Definition at line 225 of file SplitVertices.hpp.
moab::SplitVertices< _n >::SplitVertices | ( | RefinerTagManager * | tag_mgr | ) |
Definition at line 241 of file SplitVertices.hpp.
References moab::SplitVerticesBase::split_gids.
: SplitVerticesBase( tag_mgr ) { this->split_gids.resize( _n ); }
moab::SplitVertices< _n >::~SplitVertices | ( | ) | [virtual] |
Definition at line 247 of file SplitVertices.hpp.
{ }
void moab::SplitVertices< _n >::assign_global_ids | ( | std::map< ProcessSet, int > & | gids | ) | [virtual] |
Implements moab::SplitVerticesBase.
Definition at line 290 of file SplitVertices.hpp.
{ typename std::map< SplitVertexIndex< _n >, EntityHandle >::iterator it; for( it = this->begin(); it != this->end(); ++it ) { int gid = gids[it->first.process_set]++; this->tag_manager->set_gid( it->second, gid ); #ifdef MB_DEBUG std::cout << "Assigning entity: " << it->first << " GID: " << gid << "\n"; #endif // MB_DEBUG } }
bool moab::SplitVertices< _n >::find_or_create | ( | const EntityHandle * | split_src, |
const double * | coords, | ||
EntityHandle & | vert_handle, | ||
std::map< ProcessSet, int > & | proc_partition_counts, | ||
bool | handles_on_output_mesh | ||
) | [virtual] |
Implements moab::SplitVerticesBase.
Definition at line 252 of file SplitVertices.hpp.
References MB_SUCCESS, and moab::SplitVertexIndex< _n >::set_common_processes().
{ // Get the global IDs of the input vertices if( handles_on_output_mesh ) { this->tag_manager->get_output_gids( _n, split_src, this->split_gids ); } else { this->tag_manager->get_input_gids( _n, split_src, this->split_gids ); } SplitVertexIndex< _n > key( &this->split_gids[0] ); MapIteratorType it = this->find( key ); if( it == this->end() ) { #ifdef MB_DEBUG std::cout << " wrt output: " << handles_on_output_mesh << " "; #endif // MB_DEBUG this->tag_manager->get_common_processes( _n, split_src, this->common_shared_procs, handles_on_output_mesh ); proc_partition_counts[this->common_shared_procs]++; key.set_common_processes( this->common_shared_procs ); if( this->mesh_out->create_vertex( coords + 3, vert_handle ) != MB_SUCCESS ) { return false; } ( *this )[key] = vert_handle; this->tag_manager->set_sharing( vert_handle, this->common_shared_procs ); return true; } vert_handle = it->second; return false; }