11 int main(
int argc,
char* argv[] )
13 MPI_Init( &argc, &argv );
18 std::string filename0 = TestDir +
"unittest/brick1.vtk";
19 std::string filename1 = TestDir +
"unittest/brick2.vtk";
32 std::cout <<
"fail to load file\n";
43 int num_verts = (int)verts.
size();
44 std::vector< double > coords;
45 coords.resize( num_verts * 3 );
48 double z_translate = steps * 10.;
49 for(
int i = 0; i < num_verts; i++ )
50 coords[3 * i + 2] += z_translate;
58 std::cout <<
"fail to merge in parallel \n";
82 if( numV != 9 || numE != 12 || numF != 4 )
84 std::cout <<
" wrong number of shared entities on proc " <<
rank <<
" v:" << numV <<
" e:" << numE
85 <<
" f:" << numF <<
"\n";
92 Range verts, verts_owned;
97 int num_owned_verts = (int)verts_owned.
size();
99 int num_total_verts = 0;
100 MPI_Reduce( &num_owned_verts, &num_total_verts, 1, MPI_INT, MPI_SUM, 0,
MPI_COMM_WORLD );
102 if( 0 ==
rank ) std::cout <<
"total vertex number: " << num_total_verts <<
"\n";
107 int correct = 45 + ( nproc / 2 - 1 ) * 30;
108 if( nproc % 2 == 1 ) correct += 18;
109 if( nproc >= 2 && 0 ==
rank )
111 if( correct != num_total_verts )
113 std::cout <<
"incorrect number of vertices, expected: " << correct <<
"\n";
124 std::cout <<
"fail to write output file \n";