23 #define FILE_NAME_BASE "portable"
24 #define BASE_NAME STRINGIFY( MESHDIR ) "/h5file/" FILE_NAME_BASE
25 #define NATIVE_NAME FILE_NAME_BASE ".h5m"
26 #define READ_OPTS "BUFFER_SIZE=256"
37 const double EPS = std::numeric_limits< double >::epsilon();
83 Tag int_tag, real_tag, handle_tag, bit_tag, row_tag;
97 for(
size_t i = 0; i <
NUM_VERT; ++i )
99 double coords[] = {
static_cast< double >( i % 9 ),
static_cast< double >( i / 9 ),
100 static_cast< double >(
Z ) };
104 for(
size_t i = 0; i <
NUM_QUAD; ++i )
106 size_t j = ( i / 8 ) * 9 + i % 8;
107 EntityHandle conn[] = { verts[j], verts[j + 1], verts[j + 10], verts[j + 9] };
110 double coords[4 * 3];
113 int int_val[] = { (int)coords[0], (
int)coords[1] };
116 double real_val[] = { coords[0], coords[1], coords[3], coords[4], coords[6], coords[7], coords[9], coords[10] };
174 size_t x = (size_t)coords[0];
175 size_t y = (size_t)coords[1];
180 CHECK( !seen[x][y] );
202 double coords[4 * 3];
205 size_t x = (size_t)coords[0];
206 size_t y = (size_t)coords[1];
226 for(
size_t i = 0; i <
INTERVALS; i += 2 )
228 CHECK( !seen[i][j] );
262 size_t y = (size_t)coords[1];
293 size_t y = (size_t)coords[1];
309 std::vector< EntityHandle > list;
310 for(
size_t i = 0; i <
INTERVALS - 1; ++i )
319 CHECK( list.empty() );
323 CHECK( list.empty() );
375 int exp[] = { (int)coords[0], (
int)coords[1] };
423 double coords[3 * 4];
425 double exp[] = { coords[0], coords[1], coords[3], coords[4], coords[6], coords[7], coords[9], coords[10] };
497 expected[i] = (
char)( i % 2 );
527 if( !getenv(
"KEEP_FILE" ) ) remove(
filename );
530 #define DEFINE_TEST_SET( NAME ) \
531 void test_load_file_##NAME() \
533 test_load_file( BASE_NAME "_" #NAME ".h5m" ); \
535 void test_read_vertices_##NAME() \
537 test_read_vertices( BASE_NAME "_" #NAME ".h5m" ); \
539 void test_read_elements_##NAME() \
541 test_read_elements( BASE_NAME "_" #NAME ".h5m" ); \
543 void test_read_set_contents_##NAME() \
545 test_read_set_contents( BASE_NAME "_" #NAME ".h5m" ); \
547 void test_read_set_parent_child_##NAME() \
549 test_read_set_parent_child( BASE_NAME "_" #NAME ".h5m" ); \
551 void test_read_int_tag_##NAME() \
553 test_read_int_tag( BASE_NAME "_" #NAME ".h5m" ); \
555 void test_read_real_tag_##NAME() \
557 test_read_real_tag( BASE_NAME "_" #NAME ".h5m" ); \
559 void test_read_handle_tag_##NAME() \
561 test_read_handle_tag( BASE_NAME "_" #NAME ".h5m" ); \
563 void test_read_bit_tag_##NAME() \
565 test_read_bit_tag( BASE_NAME "_" #NAME ".h5m" ); \
567 void test_read_partial_##NAME() \
569 test_read_partial( BASE_NAME "_" #NAME ".h5m" ); \
572 #define REGISTER_TEST_SET( NAME ) \
573 REGISTER_DEP_TEST( test_load_file_##NAME, test_native_read ); \
574 REGISTER_DEP_TEST( test_read_vertices_##NAME, test_load_file_##NAME ); \
575 REGISTER_DEP_TEST( test_read_elements_##NAME, test_read_vertices_##NAME ); \
576 REGISTER_DEP_TEST( test_read_set_contents_##NAME, test_read_elements_##NAME ); \
577 REGISTER_DEP_TEST( test_read_set_parent_child_##NAME, test_read_set_contents_##NAME ); \
578 REGISTER_DEP_TEST( test_read_int_tag_##NAME, test_read_elements_##NAME ); \
579 REGISTER_DEP_TEST( test_read_real_tag_##NAME, test_read_elements_##NAME ); \
580 REGISTER_DEP_TEST( test_read_handle_tag_##NAME, test_read_elements_##NAME ); \
581 REGISTER_DEP_TEST( test_read_bit_tag_##NAME, test_read_set_contents_##NAME ); \
582 REGISTER_DEP_TEST( test_read_partial_##NAME, test_read_elements_##NAME );
588 int
main(
int argc,
char* argv[] )
591 int fail = MPI_Init( &argc, &argv );
600 fail = MPI_Finalize();