20 #define DECLARE_TEST( A ) \
22 int A##_reg_var = register_test( &test_##A, #A );
38 fprintf( stderr,
"VtkTest.cpp::regeister_test(): reallocation of test array failed\n" );
135 int
main(
int argc,
char* argv[] )
137 int* test_indices = (
int*)malloc(
sizeof(
int ) *
num_tests );
142 for(
unsigned i = 0; i <
num_tests; ++i )
150 for(
int i = 1; i < argc; ++i )
151 for(
unsigned j = 0; j <
num_tests; ++j )
152 if( !strcmp(
test_array[j].name, argv[i] ) ) test_indices[test_count++] = j;
156 for(
int i = 0; i < test_count; ++i )
159 printf(
"Testing %s...\n",
test.name );
160 if( !(
test.result =
test.test() ) ) ++fail_count;
166 printf(
"FAILED TESTS:\n" );
167 for(
int i = 0; i < test_count; ++i )
170 if( !
test.result ) printf(
"\t%s\n",
test.name );
174 if( test_count == 0 )
175 printf(
"0 VTK tests run\n" );
176 else if( fail_count == 0 )
177 printf(
"%d tests passed\n", test_count );
179 printf(
"%d of %d tests failed\n", fail_count, test_count );
182 free( test_indices );
190 if( is_error( ( A ) ) ) return do_error( #A, __LINE__ )
191 static bool do_error(
const char*
string,
int line )
193 fprintf( stderr,
"Check failed at line %d: %s\n", line,
string );
219 const int* moab_conn,
223 EntityType moab_type );
227 const double coords[] = { 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1 };
228 const int conn[] = { 0, 1, 1, 2, 2, 3, 3, 4, 0, 4 };
235 const double coords[] = { -1, -1, 2, 1, -1, 2, 1, 1, 2, -1, 1, 2,
236 0.000, -0.707, 2, 0.707, 0.000, 2, 0.000, 0.707, 2, -0.707, 0.000, 2 };
237 const int conn[] = { 0, 1, 4, 1, 2, 5, 2, 3, 6, 3, 0, 7 };
244 const double coords[] = { 0, 0, 0, 5, 0, 0, 0, 5, 0, -5, 0, 0, 0, -5, 0 };
245 const int conn[] = { 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 1 };
252 const double coords[] = { 0, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, -2, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 0, 0 };
253 const int conn[] = { 0, 1, 3, 4, 5, 8, 1, 2, 3, 6, 7, 8 };
258 const double grid_3x3[] = { 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0,
259 0, 2, 0, 1, 2, 0, 2, 2, 0, 3, 2, 0, 0, 3, 0, 1, 3, 0, 2, 3, 0, 3, 3, 0 };
261 const int quad_structured_conn[] = { 0, 1, 5, 4, 1, 2, 6, 5, 2, 3, 7, 6, 4, 5, 9, 8, 5, 6,
262 10, 9, 6, 7, 11, 10, 8, 9, 13, 12, 9, 10, 14, 13, 10, 11, 15, 14 };
270 const int conn2[] = { 0, 1, 4, 5, 1, 2, 5, 6, 2, 3, 6, 7, 4, 5, 8, 9, 5, 6,
271 9, 10, 6, 7, 10, 11, 8, 9, 12, 13, 9, 10, 13, 14, 10, 11, 14, 15 };
274 return rval1 && rval2;
279 const double coords[] = { 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 4, 0, 2, 4, 0, 4, 4, 4, 0,
280 0, 4, 2, 0, 4, 4, 0, 2, 0, 0, 2, 4, 0, 0, 0, 2, 0, 4, 2 };
281 const int conn[] = { 0, 2, 5, 3, 1, 12, 4, 11, 2, 0, 6, 8, 1, 9, 7, 10 };
288 const double coords[] = { 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 4, 0, 2, 4, 0, 4, 4, 4, 0, 0, 4, 2,
289 0, 4, 4, 0, 2, 0, 0, 2, 2, 0, 2, 4, 0, 0, 0, 2, 0, 2, 2, 0, 4, 2 };
290 const int conn[] = { 0, 2, 5, 3, 1, 14, 4, 12, 12, 2, 0, 6, 8, 1, 9, 7, 11, 10 };
297 const double coords[] = { 0, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 4, 0, 2, 4, 0, 4, 4, 4, 0,
298 0, 4, 2, 0, 4, 4, 0, 2, 0, 0, 2, 4, 0, 0, 0, 2, 0, 4, 2 };
299 const int conn[] = { 0, 1, 2, 12, 5, 4, 3, 11, 2, 1, 0, 9, 6, 7, 8, 10 };
327 if( 10 != polyhedras.
size() )
return false;
332 const double coords[] = { 1, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 0, 0, -1, 0, 0, 1 };
333 const int conn[] = { 0, 1, 3, 5, 1, 2, 3, 5, 0, 1, 4, 3, 1, 2, 4, 3 };
340 const double coords[] = { 4, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 2, 0, 1, 1, 2, 0, 1,
341 0, -1, 1, 0, 0, 0, 2, 1, 0, 2, -1, 0, 2, 0, -1, 0, -1, -1, 0, 1, -1 };
342 const int conn[] = { 0, 1, 2, 4, 9, 8, 10, 6, 5, 7, 2, 1, 0, 3, 8, 9, 10, 12, 13, 11 };
347 const double grid_2x2x2[] = { 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 0, 2, 0, 1, 2, 0, 2, 2, 0,
348 0, 0, 1, 1, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 2, 1, 1, 2, 1, 2, 2, 1,
349 0, 0, 2, 1, 0, 2, 2, 0, 2, 0, 1, 2, 1, 1, 2, 2, 1, 2, 0, 2, 2, 1, 2, 2, 2, 2, 2 };
351 const int hex_structured_conn[] = { 0, 1, 4, 3, 9, 10, 13, 12, 1, 2, 5, 4, 10, 11, 14, 13,
352 3, 4, 7, 6, 12, 13, 16, 15, 4, 5, 8, 7, 13, 14, 17, 16,
353 9, 10, 13, 12, 18, 19, 22, 21, 10, 11, 14, 13, 19, 20, 23, 22,
354 12, 13, 16, 15, 21, 22, 25, 24, 13, 14, 17, 16, 22, 23, 26, 25 };
362 const int conn2[] = { 0, 1, 3, 4, 9, 10, 12, 13, 1, 2, 4, 5, 10, 11, 13, 14, 3, 4, 6, 7, 12, 13,
363 15, 16, 4, 5, 7, 8, 13, 14, 16, 17, 9, 10, 12, 13, 18, 19, 21, 22, 10, 11, 13, 14,
364 19, 20, 22, 23, 12, 13, 15, 16, 21, 22, 24, 25, 13, 14, 16, 17, 22, 23, 25, 26 };
375 const int vtk_conn[] = { 0, 2, 8, 6, 18, 20, 26, 24, 1, 5, 7, 3, 19, 23, 25, 21, 9, 11, 17, 15 };
376 const int exo_conn[] = { 0, 2, 8, 6, 18, 20, 26, 24, 1, 5, 7, 3, 9, 11, 17, 15, 19, 23, 25, 21 };
383 const int vtk_conn[] = { 0, 2, 8, 6, 18, 20, 26, 24, 1, 5, 7, 3, 19, 23,
384 25, 21, 9, 11, 17, 15, 10, 16, 14, 12, 4, 22, 13 };
385 const int moab_conn[] = { 0, 2, 8, 6, 18, 20, 26, 24, 1, 5, 7, 3, 9, 11,
386 17, 15, 19, 23, 25, 21, 14, 16, 12, 10, 4, 22, 13 };
393 const double coords[] = { 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1 };
394 const int exo_conn[] = { 0, 1, 3, 4, 5, 7, 1, 2, 3, 5, 6, 7 };
395 const int vtk_conn[] = { 0, 3, 1, 4, 7, 5, 1, 3, 2, 5, 7, 6 };
401 const double coords[] = { 2, 0, 0, 2, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 2, 2, 2, 2, 0, 2, 2, 0,
402 0, 2, 2, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 2, 1, 2, 1, 2,
403 2, 0, 1, 2, 1, 0, 2, 1, 1, 2, 2, 0, 1, 2, 2, 1, 0, 2, 1, 0, 0, 1 };
404 const int exo_conn[] = { 0, 1, 3, 4, 5, 7, 8, 12, 11, 18, 19, 21, 13, 17, 16,
405 1, 2, 3, 5, 6, 7, 9, 10, 12, 19, 20, 21, 14, 15, 17 };
406 const int vtk_conn[] = { 0, 3, 1, 4, 7, 5, 11, 12, 8, 16, 17, 13, 18, 21, 19,
407 1, 3, 2, 5, 7, 6, 12, 10, 9, 17, 15, 14, 19, 21, 20 };
413 const double coords[] = { 1, -1, 0, 1, 1, 0, -1, 1, 0, -1, -1, 0, 0, 0, -1, 0, 0, 1 };
414 const int conn[] = { 0, 1, 2, 3, 5, 3, 2, 1, 0, 4 };
421 const double coords[] = { 2, -2, 0, 2, 2, 0, -2, 2, 0, -2, -2, 0, 0, 0, -2, 0, 0, 2,
422 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, -2, 0, 1, -1, -1, 1, 1, -1,
423 -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1 };
424 const int conn[] = { 0, 1, 2, 3, 5, 6, 7, 8, 9, 14, 15, 16, 17, 3, 2, 1, 0, 4, 8, 7, 6, 9, 13, 12, 11, 10 };
434 const char file[] =
"# vtk DataFile Version 3.0\n"
435 "MOAB Version 1.00\n"
437 "DATASET STRUCTURED_POINTS\n"
444 const char file2[] =
"# vtk DataFile Version 3.0\n"
445 "MOAB Version 1.00\n"
447 "DATASET STRUCTURED_POINTS\n"
450 "ASPECT_RATIO 1 1 1\n";
453 return rval1 && rval2;
459 bool bval =
read_file( &instance, file );
466 const char file1[] =
"# vtk DataFile Version 3.0\n"
467 "MOAB Version 1.00\n"
469 "DATASET UNSTRUCTURED_GRID\n"
482 const char file2[] =
"# vtk DataFile Version 3.0\n"
483 "MOAB Version 1.00\n"
485 "DATASET UNSTRUCTURED_GRID\n"
502 return rval1 && rval2;
506 char file[4096] =
"# vtk DataFile Version 3.0\n"
507 "MOAB Version 1.00\n"
509 "DATASET STRUCTURED_GRID\n"
511 "POINTS 16 double\n";
512 int len = strlen( file );
513 for(
unsigned i = 0; i < 16; ++i )
521 const char file[] =
"# vtk DataFile Version 3.0\n"
522 "MOAB Version 1.00\n"
524 "DATASET RECTILINEAR_GRID\n"
526 "X_COORDINATES 4 float 0 1 2 3\n"
527 "Y_COORDINATES 4 float 0 1 2 3\n"
528 "Z_COORDINATES 1 float 0\n";
535 const char file[] =
"# vtk DataFile Version 3.0\n"
536 "MOAB Version 1.00\n"
538 "DATASET STRUCTURED_POINTS\n"
547 char file[4096] =
"# vtk DataFile Version 3.0\n"
548 "MOAB Version 1.00\n"
550 "DATASET STRUCTURED_GRID\n"
552 "POINTS 27 double\n";
554 int len = strlen( file );
555 for(
unsigned i = 0; i < 27; ++i )
563 const char file[] =
"# vtk DataFile Version 3.0\n"
564 "MOAB Version 1.00\n"
566 "DATASET RECTILINEAR_GRID\n"
568 "X_COORDINATES 3 float 0 1 2\n"
569 "Y_COORDINATES 3 float 0 1 2\n"
570 "Z_COORDINATES 3 float 0 1 2\n";
796 char fname[] =
"tmp_file.vtk";
797 FILE* fptr = fopen(
fname,
"w" );
809 const char fname[] =
"tmp_file.vtk";
820 for(
unsigned i = 0; i < len; ++i )
821 if( conn1[i] != conn2[i] )
return false;
826 EntityType moab_type,
829 unsigned vert_per_elem,
830 const double* coords,
831 const int* connectivity,
850 std::vector< EntityHandle > vert_array( num_vert );
851 std::copy( verts.
begin(), verts.
end(), vert_array.begin() );
852 std::vector< double > mb_coords( 3 * num_vert );
858 std::map< EntityHandle, int > vert_map;
859 std::vector< bool > seen( num_vert,
false );
860 for(
unsigned i = 0; i < num_vert; ++i )
862 double* vert_coords = &mb_coords[3 * i];
864 for(
unsigned j = 0; j < num_vert; ++j )
866 const double* file_coords = &coords[3 * j];
868 for(
unsigned k = 0; k < 3; ++k )
870 double diff = vert_coords[k] - file_coords[k];
876 seen[j] = found =
true;
877 vert_map[vert_array[i]] = j;
878 vert_handles[j] = vert_array[i];
887 seen.resize( num_elem,
false );
889 for(
unsigned i = 0; i < num_elem; ++i )
894 std::vector< EntityHandle > elem_conn;
897 CHECK( elem_conn.size() == vert_per_elem );
900 std::vector< int > elem_conn2( vert_per_elem );
901 for(
unsigned j = 0; j < vert_per_elem; ++j )
903 std::map< EntityHandle, int >::iterator k = vert_map.find( elem_conn[j] );
904 CHECK( k != vert_map.end() );
905 elem_conn2[j] = k->second;
910 for(
unsigned j = 0; j < num_elem; ++j )
912 const int* conn_arr = connectivity + j * vert_per_elem;
915 seen[j] = found =
true;
916 elem_handles[j] = elem;
927 EntityType moab_type,
929 unsigned vert_per_elem,
930 const double* coords,
932 const int* connectivity )
934 std::vector< EntityHandle > junk1( num_vert ), junk2( num_elem );
936 &junk1[0], &junk2[0] );
944 const int* moab_conn,
948 EntityType moab_type )
952 char file[4096] =
"# vtk DataFile Version 3.0\n"
953 "MOAB Version 1.00\n"
955 "DATASET UNSTRUCTURED_GRID\n";
956 size_t len = strlen( file );
958 len += sprintf( file + len,
"POINTS %u double\n", num_verts );
959 for(
unsigned i = 0; i < num_verts; ++i )
960 len += sprintf( file + len,
"%f %f %f\n", coords[3 * i], coords[3 * i + 1], coords[3 * i + 2] );
962 len += sprintf( file + len,
"CELLS %u %u\n", num_elem, num_conn + num_elem );
963 assert( num_conn % num_elem == 0 );
964 unsigned conn_len = num_conn / num_elem;
965 for(
unsigned i = 0; i < num_elem; ++i )
967 len += sprintf( file + len,
"%u", conn_len );
968 for(
unsigned j = 0; j < conn_len; ++j )
969 len += sprintf( file + len,
" %u", vtk_conn[conn_len * i + j] );
970 len += sprintf( file + len,
"\n" );
973 len += sprintf( file + len,
"CELL_TYPES %u\n", num_elem );
974 for(
unsigned i = 0; i < num_elem; ++i )
975 len += sprintf( file + len,
"%u\n", vtk_type );
978 Core instance1, instance2;
979 bool bval =
read_file( &instance1, file );
981 bval =
check_elements( &instance1, moab_type, num_elem, conn_len, coords, num_verts, moab_conn );
987 bval =
check_elements( &instance2, moab_type, num_elem, conn_len, coords, num_verts, moab_conn );
997 bool bval =
read_file( &instance, file );
1009 bool bval =
read_file( &instance, file );
1018 "MOAB Version 1.00\n"
1020 "DATASET UNSTRUCTURED_GRID\n"
1034 const double two_quad_mesh_coords[] = { -1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 1, 0, 0, 1, 0, 1, 1, 0 };
1037 const int vertex_values[] = { 9, 3, 8, 2, 0, 6, 4, 1, 4, 1, 0, 3, 8, 6, 6, 4, 0, 2, 1, 2, 3, 4, 5, 6, 6, 5, 4,
1038 3, 2, 1, 0, 6, 1, 5, 2, 4, 3, 6, 9, 2, 5, 8, 1, 3, 5, 7, 1, 3, 5, 8, 1, 9, 7, 4 };
1039 const int element_values[] = { 1001, 1002, 1004, 1003, 50, 60, 51, 61, 1, 2, 3, 4, 5, 6,
1040 7, 8, 9, 0, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 };
1047 for(
unsigned i = 0; i < count; ++i )
1048 len += sprintf( file + len,
"%d\n", abs( vals[i] ) % 2 );
1051 for(
unsigned i = 0; i < count; ++i )
1052 len += sprintf( file + len,
"%d\n", vals[i] );
1055 for(
unsigned i = 0; i < count; ++i )
1056 len += sprintf( file + len,
"%f\n", (
double)vals[i] );
1059 for(
unsigned i = 0; i < count; ++i )
1060 len += sprintf( file + len,
"%d\n", abs( vals[i] % 256 ) );
1082 std::vector< unsigned char > data(
size * num_entities );
1090 for(
int i = 0; i < num_entities; ++i )
1095 for(
int j = 0; j < tag_length; ++j )
1097 int bitval = !!( val & ( 1 << j ) );
1098 int expval = abs( *values ) % 2;
1099 CHECK( bitval == expval );
1108 for(
int i = 0; i < num_entities; ++i )
1109 for(
int j = 0; j < tag_length; ++j, ++values )
1110 CHECK( (
unsigned)( *values % 256 ) == data[i * tag_length + j] );
1115 CHECK( tag_length *
sizeof(
int ) == (
unsigned)
size );
1116 intptr =
reinterpret_cast< int*
>( &data[0] );
1117 for(
int i = 0; i < num_entities; ++i )
1118 for(
int j = 0; j < tag_length; ++j, ++values )
1119 CHECK( *values == intptr[i * tag_length + j] );
1124 CHECK( tag_length *
sizeof(
double ) == (
unsigned)
size );
1125 dblptr =
reinterpret_cast< double*
>( &data[0] );
1126 for(
int i = 0; i < num_entities; ++i )
1127 for(
int j = 0; j < tag_length; ++j, ++values )
1128 CHECK( *values == dblptr[i * tag_length + j] );
1141 vert_handles, elem_handles );
1154 Core instance1, instance2;
1171 size_t len = strlen( file );
1172 len += sprintf( file + len,
"POINT_DATA 6\n" );
1173 len += sprintf( file + len,
"SCALARS data %s %d\n", vtk_type, count );
1174 len += sprintf( file + len,
"LOOKUP_TABLE default\n" );
1176 len += sprintf( file + len,
"CELL_DATA 2\n" );
1177 len += sprintf( file + len,
"SCALARS data %s %d\n", vtk_type, count );
1178 len += sprintf( file + len,
"LOOKUP_TABLE default\n" );
1188 size_t len = strlen( file );
1189 len += sprintf( file + len,
"POINT_DATA 6\n" );
1190 len += sprintf( file + len,
"VECTORS data %s\n", vtk_type );
1192 len += sprintf( file + len,
"CELL_DATA 2\n" );
1193 len += sprintf( file + len,
"VECTORS data %s\n", vtk_type );
1203 size_t len = strlen( file );
1204 len += sprintf( file + len,
"POINT_DATA 6\n" );
1205 len += sprintf( file + len,
"TENSORS data %s\n", vtk_type );
1207 len += sprintf( file + len,
"CELL_DATA 2\n" );
1208 len += sprintf( file + len,
"TENSORS data %s\n", vtk_type );
1222 const double coords[][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 2, 0, 0 }, { 0, 1, 0 }, { 1, 1, 0 },
1223 { 2, 1, 0 }, { 0, 2, 0 }, { 1, 2, 0 }, { 2, 2, 0 } };
1224 for(
unsigned i = 0; i < 9; ++i )
1226 rval =
moab.create_vertex( coords[i], verts[i] );
1231 const int conn[][4] = { { 0, 1, 4, 3 }, { 1, 2, 5, 4 }, { 3, 4, 7, 6 }, { 4, 5, 8, 7 } };
1233 for(
unsigned i = 0; i < 4; ++i )
1235 for(
unsigned j = 0; j < 4; ++j )
1236 econn[j] = verts[conn[i][j]];
1237 rval =
moab.create_element(
MBQUAD, econn, 4, elems[i] );
1243 for(
unsigned i = 0; i < 3; ++i )
1245 rval =
moab.create_meshset( 0, sets[i] );
1250 rval =
moab.add_entities( sets[0], elems + 3, 1 );
1253 rval =
moab.add_entities( sets[1], verts + 2, 1 );
1256 rval =
moab.add_entities( sets[2], elems + 2, 2 );
1260 rval =
moab.add_child_meshset( sets[1], sets[2] );
1263 rval =
moab.add_entities( sets[0], sets + 1, 1 );
1267 rval =
moab.write_mesh(
"tmp_file.vtk", sets, 1 );
1272 rval =
moab.load_mesh(
"tmp_file.vtk" );
1273 remove(
"tmp_file.vtk" );
1279 Range new_elems, new_verts;
1280 rval =
moab.get_entities_by_type( 0,
MBQUAD, new_elems );
1283 rval =
moab.get_entities_by_type( 0,
MBVERTEX, new_verts );
1295 rval =
moab.get_coords( free_verts, vcoords );
1296 CHECK( vcoords[0] == 2 );
1297 CHECK( vcoords[1] == 0 );
1298 CHECK( vcoords[2] == 0 );
1311 const double coords[][3] = { { 0, 0, 0 }, { 1, 0, 0 }, { 2, 0, 0 }, { 0, 1, 0 }, { 1, 1, 0 },
1312 { 2, 1, 0 }, { 0, 2, 0 }, { 1, 2, 0 }, { 2, 2, 0 } };
1313 for(
unsigned i = 0; i < 9; ++i )
1315 rval =
moab.create_vertex( coords[i], verts[i] );
1320 const int conn[][4] = { { 0, 1, 4, 3 }, { 1, 2, 5, 4 }, { 3, 4, 7, 6 } };
1326 for(
unsigned i = 0; i < 3; ++i )
1328 for(
unsigned j = 0; j < 4; ++j )
1329 econn[j] = verts[conn[i][j]];
1330 rval =
moab.create_element(
MBQUAD, econn, 4, elems[i] );
1333 rval =
moab.tag_set_data( gid, &elems[i], 1, &
id );
1337 rval =
moab.write_file(
"tmp_file.vtk" );
1340 rval =
moab.write_file(
"tmp_file2.vtk", 0,
"CREATE_ONE_NODE_CELLS;" );
1345 rval =
moab.load_file(
"tmp_file.vtk" );
1346 remove(
"tmp_file.vtk" );
1347 remove(
"tmp_file2.vtk" );
1360 std::ostringstream file_data;
1362 while( getline( base_data, line ) )
1364 if( 0 == line.find(
"POINTS" ) )
1366 file_data <<
"FIELD FieldData 2" << std::endl
1367 <<
"avtOriginalBounds 1 6 float" << std::endl
1368 <<
"-10 10 -10 10 -10 10 " << std::endl
1369 <<
"TIME 1 1 double" << std::endl
1370 <<
"10.543" << std::endl;
1372 else if( 0 == line.find(
"CELLS" ) )
1374 file_data <<
"FIELD more_data 2" << std::endl
1375 <<
"first_array 3 2 int" << std::endl
1376 <<
"0 1 2" << std::endl
1377 <<
"3 4 5" << std::endl
1378 <<
"second_array 4 3 bit" << std::endl
1379 <<
"0 0 0 0" << std::endl
1380 <<
"1 1 1 1" << std::endl
1381 <<
"1 0 1 0" << std::endl;
1383 file_data << line << std::endl;
1388 bool rval =
read_file( &
mb, file_data.str().c_str() );