10 #include "InitCGMA.hpp"
11 #include "GeometryQueryTool.hpp"
18 if( MB_SUCCESS != ( A ) ) \
20 std::cerr << "Failure (error code " << ( A ) << ") at " __FILE__ ":" << __LINE__ << std::endl; \
26 std::string
input_cylcube = TestDir +
"unittest/io/cylcube.stp";
39 std::vector< std::string >& group_names,
41 std::vector< int >& );
43 std::vector< int >& group_ent_ids );
47 void load_group_references( std::vector< int >& ids, std::vector< std::string >& names, std::vector< int >& ent_ids );
63 InitCGMA::initialize_cgma();
64 GeometryQueryTool::instance()->delete_geometry();
95 void* val[] = { &query };
98 std::vector< int > g_ids;
99 std::vector< std::string > g_names;
100 std::vector< int > g_ent_ids;
105 g_ids.push_back( group_id );
110 std::string temp( group_name );
111 g_names.push_back( temp );
115 if( group_ents.
size() != 1 )
CHECK(
false );
117 g_ent_ids.push_back( grp_ent_id );
123 std::vector< std::string >& group_names,
125 std::vector< int >& )
127 std::vector< int >& group_ent_ids )
133 int num_g_ids = group_ids.size();
134 int num_g_names = group_names.size();
141 std::vector< int > group_ref_ids;
142 std::vector< std::string > group_ref_names;
143 std::vector< int > group_ref_ent_ids;
147 CHECK_EQUAL( group_ref_ids.size(), group_ids.size() );
148 CHECK_EQUAL( group_ref_names.size(), group_names.size() );
149 CHECK_EQUAL( group_ref_ent_ids.size(), group_ent_ids.size() );
152 for(
unsigned int i = 0; i < group_ids.size(); i++ )
154 for(
unsigned int j = 0; j < group_ref_ids.size(); j++ )
156 if( group_ids[i] == group_ref_ids[j] && group_names[i] == group_ref_names[j] &&
157 group_ent_ids[i] == group_ref_ent_ids[j] )
159 group_ref_ids.erase( group_ref_ids.begin() + j );
160 group_ref_names.erase( group_ref_names.begin() + j );
161 group_ref_ent_ids.erase( group_ref_ent_ids.begin() + j );
169 int leftovers = group_ref_ids.size();
171 leftovers = group_ref_names.size();
173 leftovers = group_ref_ent_ids.size();
178 void load_group_references( std::vector< int >& ids, std::vector< std::string >& names, std::vector< int >& ent_ids )
181 names.push_back(
"Group 3" );
183 ent_ids.push_back( 2 );
186 names.push_back(
"Group 2" );
188 ent_ids.push_back( 1 );