1 #include "TestUtil.hpp"
8 #error Specify MESHDIR to compile test
41 double positions[] = { 236.80706050970281, -139.55422526228017, 193.27999999999997,
42 236.47511729348639, -141.33020962638582, 193.27999999999997,
43 237.8457938295229, -142.57076074835663, 193.27999999999997,
44 239.12702305519684, -139.96608933577852, 193.27999999999997,
45 236.80841321361444, -139.55341321335499, 202.654,
46 236.47655014713746, -141.32980272396816, 202.654,
47 237.8477913707564, -142.57047282187165, 202.654,
48 239.12865103844533, -139.96531051891105, 202.654 };
49 CartVect x( 235.96518686964933, -142.43503000077749, 188.19999999999987 );
50 std::vector< CartVect > vertices;
51 for(
int i = 0; i < 8; i++ )
52 vertices.push_back(
CartVect( positions + 3 * i ) );
59 std::cout << nat_par <<
"\n";
62 double positions2[] = { 49.890500000000024, -20.376134375374882, 312.72000000000003,
63 52.015875000000044, -19.149048546996006, 312.72000000000003,
64 48.430375821458099, -18.548796774572125, 312.72000000000003,
65 47.717616239031223, -21.191360829777231, 312.72000000000003,
66 49.890500000000024, -20.376134375374882, 322.88,
67 52.015875000000044, -19.149048546996006, 322.88,
68 48.429930354643275, -18.52828610485021, 322.88,
69 47.720552036968819, -21.167591146685712, 322.88 };
71 CartVect x2( 51.469000000000015, -20.145482942833631, 317.80000000000001 );
74 for(
int i = 0; i < 8; i++ )
75 vertices.push_back(
CartVect( positions2 + 3 * i ) );
82 std::cout << nat_par <<
"\n";
96 std::string meshFile =
STRINGIFY( MESHDIR )
"/spectral.h5m";
100 std::cout <<
"Problems reading file " << meshFile <<
"." << std::endl;
111 std::cout <<
"can't find tag, no spectral set\n";
118 std::cout <<
"can't get sem set\n";
127 rval =
mb->
tag_get_data( sem_tag, &firstSemSet, 1, (
void*)sem_dims );
140 std::cout <<
"Found " << ents.
size() <<
" " << 3 <<
"-dimensional entities:" << std::endl;
142 if( sem_dims[0] != sem_dims[1] || sem_dims[0] != sem_dims[2] )
144 std::cout <<
" dimensions are different. bail out\n";
151 int ntot = sem_dims[0] * sem_dims[1] * sem_dims[2];
155 std::cout <<
"can't get xm1tag \n";
162 std::cout <<
"can't get ym1tag \n";
169 std::cout <<
"can't get zm1tag \n";
178 std::cout <<
"can't get veltag \n";
195 std::cout <<
"can't get xm1 values \n";
202 std::cout <<
"can't get ym1 values \n";
209 std::cout <<
"can't get zm1 values \n";
213 if( rit == ents.
begin() )
215 std::cout <<
" xm1 for first element: \n";
216 for(
int i = 0; i < ntot; i++ )
217 std::cout <<
" " << xval[i];
220 specHex.
set_gl_points( (
double*)xval, (
double*)yval, (
double*)zval );
225 std::cout <<
"difference" << rst -
inverse <<
"\n";
227 std::cout <<
"jacobian: \n" << jac <<
" \n determinant: " << jac.
determinant() <<
"\n";
233 std::cout <<
"can't get vel values \n";
238 std::cout <<
"velocity: " << vel1 <<
"\n";
241 std::cout <<
"integral over vx: " << integral <<
"\n";
243 std::cout <<
"success...\n";
253 std::string meshFile =
STRINGIFY( MESHDIR )
"/mbcslam/eulerHomme.vtk";
257 std::cout <<
"Problems reading file " << meshFile <<
"." << std::endl;
274 std::cout <<
"Found " << ents.
size() <<
" " << 2 <<
"-dimensional entities:" << std::endl;
289 std::cout <<
"can't get connectivity for quad \n";
293 assert( num_nodes == 4 );
295 std::vector< CartVect > verts( 4 );
296 rval =
mb->
get_coords( conn4, num_nodes, &( verts[0][0] ) );
299 std::cout <<
"can't get coords for quad \n";
307 if( rit == ents.
begin() )
309 std::cout <<
" gl points for first element: \n";
313 for(
int i = 0; i <
size; i++ )
314 std::cout << xyz[0][i] <<
" " << xyz[1][i] <<
" " << xyz[2][i] <<
"\n";
319 std::cout <<
"success...\n";
328 double positions[] = { -0.88882388032987436, -0.069951956448441419, 0.45287838714646161, -0.88226455385461389,
329 -0.13973697758043971, 0.4495362433757738, -0.84497006020160348, -0.13383011007602069,
330 0.51779831884618843, -0.85072691325794214, -0.066953660115039074, 0.52132612293631853 };
331 CartVect x( -0.85408569769999998, -0.12391301439999999, 0.50515659540000002 );
332 std::vector< CartVect > vertices;
333 for(
int i = 0; i < 4; i++ )
334 vertices.push_back(
CartVect( positions + 3 * i ) );
337 double tol( 0.0001 );
341 std::cout << nat_par <<
"\n";
343 std::cout <<
"success...\n";
348 double positions[] = { 0, 0, 0, 2, 0, 0, 0, 3, 0 };
350 std::vector< CartVect > vertices;
351 for(
int i = 0; i < 3; i++ )
352 vertices.push_back(
CartVect( positions + 3 * i ) );
355 double tol( 0.0001 );
359 std::cout << x <<
" :" << nat_par <<
"\n";
366 std::cout << x <<
" :" << nat_par <<
"\n";
373 std::cout << x <<
" :" << nat_par <<
"\n";
376 double positions2[] = { -0.866026, -0.500001, 0., 0.866026, -0.500001, 0., 0.000000, 100.000000, 0. };
378 std::vector< CartVect > vertices2;
379 for(
int i = 0; i < 3; i++ )
380 vertices2.push_back(
CartVect( positions2 + 3 * i ) );
387 std::cout << x <<
" :" << nat_par <<
"\n";
390 std::cout <<
"vertices2 " << vertices2[0] <<
" " << vertices2[1] <<
" " << vertices2[2] <<
"\n";
392 x =
CartVect( -0.866026, -0.500001, 0. );
393 std::cout << x <<
" :" << tri2.
ievaluate( x ) <<
"\n";
395 x =
CartVect( +0.866026, -0.500001, 0. );
396 std::cout << x <<
" :" << tri2.
ievaluate( x ) <<
"\n";
397 x =
CartVect( 0.000000, 100.000000, 0. );
398 std::cout << x <<
" :" << tri2.
ievaluate( x ) <<
"\n";
400 std::cout <<
"success...\n";
408 double positions[] = { -0.86339258282987197, -0.17004443185241255, 0.47501383044112816,
409 -0.80777478326268271, -0.15172299908552511, 0.5696314870803928,
410 -0.8655618847392077, -0.061613422011313854, 0.49699739427361828 };
411 CartVect x( -0.85408569769999998, -0.12391301439999999, 0.50515659540000002 );
412 std::vector< CartVect > vertices;
413 for(
int i = 0; i < 3; i++ )
414 vertices.push_back(
CartVect( positions + 3 * i ) );
417 double tol( 0.000001 );
421 std::cout << nat_par <<
"\n";
423 std::cout <<
"success...\n";