MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Member Functions | |
EntityCount () | |
ErrorCode | get_counts () |
ErrorCode | create_adjacencies (Range &entities, int adj_dim) |
void | copy_counts (EntityCount &count) |
void | print () |
Public Attributes | |
unsigned int | node |
unsigned int | edge |
unsigned int | quad |
unsigned int | tri |
unsigned int | hex |
unsigned int | tet |
Definition at line 13 of file merge_test.cpp.
void EntityCount::copy_counts | ( | EntityCount & | count | ) |
Definition at line 41 of file merge_test.cpp.
References edge, hex, node, quad, tet, and tri.
Referenced by process_bu_auto_merge(), process_merge(), process_mo_auto_merge(), and process_td_auto_merge().
ErrorCode EntityCount::create_adjacencies | ( | Range & | entities, |
int | adj_dim | ||
) |
Definition at line 101 of file merge_test.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Interface::get_adjacencies(), gMB, and MB_SUCCESS.
{ ErrorCode result; Range::iterator iter; std::vector< EntityHandle > adjacencies; for( iter = entities.begin(); iter != entities.end(); ++iter ) { result = gMB->get_adjacencies( &*iter, 1, adj_dim, true, adjacencies ); if( result != MB_SUCCESS ) break; } return result; }
Definition at line 51 of file merge_test.cpp.
References moab::Range::clear(), entities, moab::Interface::get_entities_by_type(), gMB, MB_SUCCESS, MBEDGE, MBHEX, MBQUAD, MBTET, MBTRI, MBVERTEX, and moab::Range::size().
Referenced by merge_2D_elem(), merge_3D_elem(), merge_edges(), merge_nodes(), merge_top_down(), process_bu_auto_merge(), process_merge(), process_mo_auto_merge(), process_td_auto_merge(), and read_file().
{ Range entities; int do_create = edge == 0; if( gMB->get_entities_by_type( 0, MBVERTEX, entities ) != MB_SUCCESS ) return MB_FAILURE; node = entities.size(); entities.clear(); if( gMB->get_entities_by_type( 0, MBHEX, entities ) != MB_SUCCESS ) return MB_FAILURE; hex = entities.size(); if( hex > 0 && do_create ) { if( create_adjacencies( entities, 2 ) != MB_SUCCESS ) return MB_FAILURE; if( create_adjacencies( entities, 1 ) != MB_SUCCESS ) return MB_FAILURE; } entities.clear(); if( gMB->get_entities_by_type( 0, MBQUAD, entities ) != MB_SUCCESS ) return MB_FAILURE; quad = entities.size(); if( quad > 0 && do_create ) { if( create_adjacencies( entities, 1 ) != MB_SUCCESS ) return MB_FAILURE; } entities.clear(); if( gMB->get_entities_by_type( 0, MBTET, entities ) != MB_SUCCESS ) return MB_FAILURE; tet = entities.size(); if( tet > 0 && do_create ) { if( create_adjacencies( entities, 2 ) != MB_SUCCESS ) return MB_FAILURE; if( create_adjacencies( entities, 1 ) != MB_SUCCESS ) return MB_FAILURE; } entities.clear(); if( gMB->get_entities_by_type( 0, MBTRI, entities ) != MB_SUCCESS ) return MB_FAILURE; tri = entities.size(); if( tri > 0 && do_create ) { if( create_adjacencies( entities, 1 ) != MB_SUCCESS ) return MB_FAILURE; } entities.clear(); if( gMB->get_entities_by_type( 0, MBEDGE, entities ) != MB_SUCCESS ) return MB_FAILURE; edge = entities.size(); return MB_SUCCESS; }
void EntityCount::print | ( | ) |
Definition at line 116 of file merge_test.cpp.
Referenced by process_bu_auto_merge(), process_merge(), process_mo_auto_merge(), and process_td_auto_merge().
{ std::cout << " Vertices: " << node << std::endl; cout << " Edges: " << edge << endl; if( quad > 0 ) cout << " Quad Elements: " << quad << endl; if( hex > 0 ) cout << " Hex Elements: " << hex << endl; if( tri > 0 ) cout << " Tri Elements: " << tri << endl; if( tet > 0 ) cout << " Tet Elements: " << tet << endl; }
unsigned int EntityCount::edge |
Definition at line 17 of file merge_test.cpp.
Referenced by coincident_counts(), copy_counts(), merge_2D_elem(), merge_3D_elem(), merge_edges(), merge_nodes(), merge_top_down(), process_bu_auto_merge(), process_mo_auto_merge(), and process_td_auto_merge().
unsigned int EntityCount::hex |
Definition at line 20 of file merge_test.cpp.
Referenced by coincident_counts(), copy_counts(), merge_2D_elem(), merge_3D_elem(), merge_edges(), merge_nodes(), merge_top_down(), process_bu_auto_merge(), process_mo_auto_merge(), and process_td_auto_merge().
unsigned int EntityCount::node |
Definition at line 16 of file merge_test.cpp.
Referenced by coincident_counts(), copy_counts(), merge_2D_elem(), merge_3D_elem(), merge_edges(), merge_nodes(), merge_top_down(), process_bu_auto_merge(), process_mo_auto_merge(), and process_td_auto_merge().
unsigned int EntityCount::quad |
Definition at line 18 of file merge_test.cpp.
Referenced by coincident_counts(), copy_counts(), merge_2D_elem(), merge_3D_elem(), merge_edges(), merge_nodes(), merge_top_down(), process_bu_auto_merge(), process_mo_auto_merge(), and process_td_auto_merge().
unsigned int EntityCount::tet |
Definition at line 21 of file merge_test.cpp.
Referenced by coincident_counts(), copy_counts(), merge_2D_elem(), merge_3D_elem(), merge_edges(), merge_nodes(), merge_top_down(), process_bu_auto_merge(), process_mo_auto_merge(), and process_td_auto_merge().
unsigned int EntityCount::tri |
Definition at line 19 of file merge_test.cpp.
Referenced by coincident_counts(), copy_counts(), merge_2D_elem(), merge_3D_elem(), merge_edges(), merge_nodes(), merge_top_down(), process_bu_auto_merge(), process_mo_auto_merge(), and process_td_auto_merge().