moab
|
#include <SplitVertices.hpp>
Public Types | |
typedef std::vector < EntitySourceRecord > | VecType |
typedef std::vector < EntitySourceRecord > ::iterator | VecIteratorType |
Public Member Functions | |
EntitySource (int num_corners, RefinerTagManager *tag_mgr) | |
~EntitySource () | |
bool | create_element (EntityType etyp, int nconn, const EntityHandle *split_src, EntityHandle &elem_handle, std::map< ProcessSet, int > &proc_partition_counts) |
void | assign_global_ids (std::map< ProcessSet, int > &gids) |
Public Attributes | |
Interface * | mesh_out |
RefinerTagManager * | tag_manager |
ProcessSet | common_shared_procs |
int | num_corners |
A vector of pre-existing entities to a new mesh entity.
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.
Definition at line 151 of file SplitVertices.hpp.
typedef std::vector<EntitySourceRecord>::iterator moab::EntitySource::VecIteratorType |
Definition at line 155 of file SplitVertices.hpp.
typedef std::vector<EntitySourceRecord> moab::EntitySource::VecType |
Definition at line 154 of file SplitVertices.hpp.
moab::EntitySource::EntitySource | ( | int | num_corners, |
RefinerTagManager * | tag_mgr | ||
) |
Definition at line 18 of file SplitVertices.cpp.
{ this->tag_manager = tag_mgr; this->mesh_out = tag_mgr->get_output_mesh(); this->num_corners = nc; }
Definition at line 25 of file SplitVertices.cpp.
{ }
void moab::EntitySource::assign_global_ids | ( | std::map< ProcessSet, int > & | gids | ) |
Definition at line 45 of file SplitVertices.cpp.
{ std::vector<EntityHandle> adjacencies; adjacencies.resize( this->num_corners ); std::vector<EntitySourceRecord>::iterator it; for ( it = this->begin(); it != this->end(); ++ it ) { int num_nodes; const EntityHandle* conn; this->mesh_out->get_connectivity( it->handle, conn, num_nodes ); this->tag_manager->get_output_gids( this->num_corners, conn, it->ids ); std::sort( it->ids.begin(), it->ids.end() ); } std::sort( this->begin(), this->end() ); for ( it = this->begin(); it != this->end(); ++ it ) { int gid = gids[it->process_set] ++; this->tag_manager->set_gid( it->handle, gid ); #ifdef MB_DEBUG std::cout << "Assigning entity: " << it->handle << " GID: " << gid << "\n"; #endif // MB_DEBUG } }
bool moab::EntitySource::create_element | ( | EntityType | etyp, |
int | nconn, | ||
const EntityHandle * | split_src, | ||
EntityHandle & | elem_handle, | ||
std::map< ProcessSet, int > & | proc_partition_counts | ||
) |
Definition at line 29 of file SplitVertices.cpp.
{ // Get the global IDs of the input vertices //int stat; proc_partition_counts[this->tag_manager->get_element_procs()]++; if ( this->mesh_out->create_element( etyp, elem_verts, nconn, elem_handle ) != MB_SUCCESS ) { return false; } this->push_back( EntitySourceRecord( this->num_corners, elem_handle, this->tag_manager->get_element_procs() ) ); this->tag_manager->set_sharing( elem_handle, this->tag_manager->get_element_procs() ); return true; }
Definition at line 167 of file SplitVertices.hpp.
Definition at line 165 of file SplitVertices.hpp.
Definition at line 168 of file SplitVertices.hpp.
Definition at line 166 of file SplitVertices.hpp.