Commit 01d5ac50 authored by incardon's avatar incardon
Browse files

Adding test for double precision

parent aa3154bb
Pipeline #3061 passed with stages
in 14 minutes and 50 seconds
......@@ -917,7 +917,8 @@ template<unsigned int dims,typename T> inline void output_point(Point<dims,T> &
{
if (ft == file_type::ASCII)
{
v_out << p.toString();
for (int i = 0 ; i < dims ; i++)
{v_out << p[i];}
size_t i = dims;
for ( ; i < 3 ; i++)
{v_out << " 0.0";}
......
......@@ -659,41 +659,43 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_grids)
{
// Create box grids
Point<1,float> offset1({0.0});
Point<1,float> spacing1({0.1});
Point<1,double> offset1({0.0});
Point<1,double> spacing1({0.1});
Box<1,size_t> d1({1},{14});
// Create box grids
Point<1,float> offset2({5.0});
Point<1,double> offset2({5.0});
Point<1,float> spacing2({0.2});
Box<1,size_t> d2({2},{13});
// Create box grids
Point<1,float> offset3({0.0});
Point<1,float> spacing3({0.05});
Point<1,double> offset3({0.0});
Point<1,double> spacing3({0.05});
Box<1,size_t> d3({3},{11});
// Create box grids
Point<1,float> offset4({5.0});
Point<1,float> spacing4({0.1});
Point<1,double> offset4({5.0});
Point<1,double> spacing4({0.1});
Box<1,size_t> d4({1},{7});
size_t sz[] = {16};
grid_cpu<1,Point_test<float>> g1(sz);
grid_cpu<1,Point_test<double>> g1(sz);
g1.setMemory();
fill_grid_some_data(g1);
grid_cpu<1,Point_test<float>> g2(sz);
grid_cpu<1,Point_test<double>> g2(sz);
g2.setMemory();
fill_grid_some_data(g2);
grid_cpu<1,Point_test<float>> g3(sz);
grid_cpu<1,Point_test<double>> g3(sz);
g3.setMemory();
fill_grid_some_data(g3);
grid_cpu<1,Point_test<float>> g4(sz);
grid_cpu<1,Point_test<double>> g4(sz);
g4.setMemory();
fill_grid_some_data(g4);
g4.template get<Point_test<double>::s>(0) = 1.0/3.0;
// Create a writer and write
VTKWriter<boost::mpl::pair<grid_cpu<1,Point_test<float>>,float>,VECTOR_GRIDS> vtk_g;
VTKWriter<boost::mpl::pair<grid_cpu<1,Point_test<double>>,double>,VECTOR_GRIDS> vtk_g;
vtk_g.add(g1,offset1,spacing1,d1);
vtk_g.add(g2,offset2,spacing2,d2);
vtk_g.add(g3,offset3,spacing3,d3);
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,71 +2,71 @@
grids
ASCII
DATASET POLYDATA
POINTS 64 float
0.000000 0.0 0.0
0.100000 0.0 0.0
0.200000 0.0 0.0
0.300000 0.0 0.0
0.400000 0.0 0.0
0.500000 0.0 0.0
0.600000 0.0 0.0
0.700000 0.0 0.0
0.800000 0.0 0.0
0.900000 0.0 0.0
1.000000 0.0 0.0
1.100000 0.0 0.0
1.200000 0.0 0.0
1.300000 0.0 0.0
1.400000 0.0 0.0
1.500000 0.0 0.0
5.000000 0.0 0.0
5.200000 0.0 0.0
5.400000 0.0 0.0
5.600000 0.0 0.0
5.800000 0.0 0.0
6.000000 0.0 0.0
6.200000 0.0 0.0
6.400000 0.0 0.0
6.600000 0.0 0.0
6.800000 0.0 0.0
7.000000 0.0 0.0
7.200000 0.0 0.0
7.400000 0.0 0.0
7.600000 0.0 0.0
7.800000 0.0 0.0
8.000000 0.0 0.0
0.000000 0.0 0.0
0.050000 0.0 0.0
0.100000 0.0 0.0
0.150000 0.0 0.0
0.200000 0.0 0.0
0.250000 0.0 0.0
0.300000 0.0 0.0
0.350000 0.0 0.0
0.400000 0.0 0.0
0.450000 0.0 0.0
0.500000 0.0 0.0
0.550000 0.0 0.0
0.600000 0.0 0.0
0.650000 0.0 0.0
0.700000 0.0 0.0
0.750000 0.0 0.0
5.000000 0.0 0.0
5.100000 0.0 0.0
5.200000 0.0 0.0
5.300000 0.0 0.0
5.400000 0.0 0.0
5.500000 0.0 0.0
5.600000 0.0 0.0
5.700000 0.0 0.0
5.800000 0.0 0.0
5.900000 0.0 0.0
6.000000 0.0 0.0
6.100000 0.0 0.0
6.200000 0.0 0.0
6.300000 0.0 0.0
6.400000 0.0 0.0
6.500000 0.0 0.0
POINTS 64 double
0 0.0 0.0
0.1 0.0 0.0
0.2 0.0 0.0
0.3 0.0 0.0
0.4 0.0 0.0
0.5 0.0 0.0
0.6000000000000001 0.0 0.0
0.7000000000000001 0.0 0.0
0.8 0.0 0.0
0.9 0.0 0.0
1 0.0 0.0
1.1 0.0 0.0
1.2 0.0 0.0
1.3 0.0 0.0
1.4 0.0 0.0
1.5 0.0 0.0
5 0.0 0.0
5.200000002980232 0.0 0.0
5.400000005960464 0.0 0.0
5.600000008940697 0.0 0.0
5.800000011920929 0.0 0.0
6.000000014901161 0.0 0.0
6.200000017881393 0.0 0.0
6.400000020861626 0.0 0.0
6.600000023841858 0.0 0.0
6.80000002682209 0.0 0.0
7.000000029802322 0.0 0.0
7.200000032782555 0.0 0.0
7.400000035762787 0.0 0.0
7.600000038743019 0.0 0.0
7.800000041723251 0.0 0.0
8.000000044703484 0.0 0.0
0 0.0 0.0
0.05 0.0 0.0
0.1 0.0 0.0
0.15 0.0 0.0
0.2 0.0 0.0
0.25 0.0 0.0
0.3 0.0 0.0
0.35 0.0 0.0
0.4 0.0 0.0
0.45 0.0 0.0
0.5 0.0 0.0
0.55 0.0 0.0
0.6000000000000001 0.0 0.0
0.65 0.0 0.0
0.7000000000000001 0.0 0.0
0.75 0.0 0.0
5 0.0 0.0
5.1 0.0 0.0
5.2 0.0 0.0
5.3 0.0 0.0
5.4 0.0 0.0
5.5 0.0 0.0
5.6 0.0 0.0
5.7 0.0 0.0
5.8 0.0 0.0
5.9 0.0 0.0
6 0.0 0.0
6.1 0.0 0.0
6.2 0.0 0.0
6.3 0.0 0.0
6.4 0.0 0.0
6.5 0.0 0.0
VERTICES 64 128
1 0
1 1
......@@ -133,7 +133,7 @@ VERTICES 64 128
1 62
1 63
POINT_DATA 64
SCALARS attr0 float
SCALARS attr0 double
LOOKUP_TABLE default
0
1
......@@ -199,7 +199,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr1 float
SCALARS attr1 double
LOOKUP_TABLE default
0
0
......@@ -265,7 +265,7 @@ LOOKUP_TABLE default
0
0
0
SCALARS attr2 float
SCALARS attr2 double
LOOKUP_TABLE default
0
0
......@@ -331,7 +331,7 @@ LOOKUP_TABLE default
0
0
0
SCALARS attr3 float
SCALARS attr3 double
LOOKUP_TABLE default
1
1
......@@ -381,6 +381,7 @@ LOOKUP_TABLE default
1
1
1
0.3333333333333333
1
1
1
......@@ -396,8 +397,7 @@ LOOKUP_TABLE default
1
1
1
1
VECTORS attr4 float
VECTORS attr4 double
0 0 0
1 1 1
2 2 2
......@@ -462,7 +462,7 @@ VECTORS attr4 float
13 13 13
14 14 14
15 15 15
SCALARS attr5_0_0 float
SCALARS attr5_0_0 double
LOOKUP_TABLE default
0
1
......@@ -528,7 +528,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr5_0_1 float
SCALARS attr5_0_1 double
LOOKUP_TABLE default
0
1
......@@ -594,7 +594,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr5_0_2 float
SCALARS attr5_0_2 double
LOOKUP_TABLE default
0
1
......@@ -660,7 +660,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr5_1_0 float
SCALARS attr5_1_0 double
LOOKUP_TABLE default
0
1
......@@ -726,7 +726,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr5_1_1 float
SCALARS attr5_1_1 double
LOOKUP_TABLE default
0
1
......@@ -792,7 +792,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr5_1_2 float
SCALARS attr5_1_2 double
LOOKUP_TABLE default
0
1
......@@ -858,7 +858,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr5_2_0 float
SCALARS attr5_2_0 double
LOOKUP_TABLE default
0
1
......@@ -924,7 +924,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr5_2_1 float
SCALARS attr5_2_1 double
LOOKUP_TABLE default
0
1
......@@ -990,7 +990,7 @@ LOOKUP_TABLE default
13
14
15
SCALARS attr5_2_2 float
SCALARS attr5_2_2 double
LOOKUP_TABLE default
0
1
......
......@@ -6,106 +6,106 @@ FIELD FieldData 1
TIME 1 1 double
5.123000
POINTS 100 double
0.191120 0.542772 0.939108
0.933523 0.710147 0.682257
0.228446 0.513097 0.438905
0.700754 0.436179 0.434735
0.751419 0.522504 0.196855
0.666369 0.261523 0.050127
0.573708 0.768383 0.022587
0.750211 0.313137 0.190846
0.507718 0.273360 0.264172
0.670213 0.932599 0.212948
0.586036 0.006718 0.574775
0.336361 0.205412 0.440432
0.553825 0.740555 0.064820
0.764503 0.468990 0.878126
0.323438 0.181610 0.943831
0.329992 0.043079 0.688576
0.095793 0.009830 0.801123
0.349360 0.212307 0.266992
0.368002 0.414173 0.890974
0.471037 0.198481 0.584590
0.363141 0.971788 0.567570
0.193627 0.047362 0.347666
0.078823 0.824102 0.303324
0.892978 0.147594 0.589520
0.768770 0.021556 0.879563
0.173734 0.131239 0.179741
0.392798 0.563805 0.325374
0.241990 0.120892 0.993650
0.950192 0.297734 0.372967
0.618250 0.020735 0.852418
0.507541 0.634685 0.435244
0.857826 0.812930 0.263612
0.905927 0.426169 0.242918
0.551551 0.826687 0.394286
0.107476 0.018033 0.122876
0.027658 0.315680 0.861391
0.864926 0.042390 0.667640
0.937087 0.686836 0.209923
0.960032 0.214003 0.456393
0.838234 0.705078 0.379994
0.743514 0.670946 0.671558
0.434425 0.879627 0.032296
0.954834 0.877288 0.061284
0.239914 0.979709 0.690876
0.334337 0.292961 0.194138
0.397971 0.064623 0.159310
0.639743 0.559217 0.628284
0.319393 0.698422 0.808751
0.534981 0.605794 0.215716
0.932453 0.633508 0.954549
0.860046 0.170877 0.901505
0.581338 0.696935 0.013719
0.273513 0.037100 0.801600
0.857205 0.467507 0.627542
0.752721 0.974119 0.427029
0.371101 0.245019 0.119228
0.733240 0.911167 0.240259
0.659184 0.906727 0.920069
0.723200 0.826380 0.620956
0.665010 0.286470 0.644219
0.550957 0.831365 0.249487
0.136109 0.843937 0.995786
0.958540 0.434625 0.812213
0.025767 0.297417 0.212592
0.956965 0.060432 0.382506
0.647490 0.425935 0.083679
0.492244 0.694858 0.917290
0.595547 0.101746 0.165874
0.715210 0.552892 0.556047
0.727179 0.190203 0.479701
0.452899 0.191989 0.800239
0.189775 0.575804 0.255534
0.787141 0.426864 0.467209
0.674216 0.630124 0.240190
0.921028 0.344758 0.550895
0.051571 0.205424 0.679874
0.450943 0.397533 0.256193
0.520349 0.229449 0.854270
0.444768 0.451041 0.509270
0.033064 0.374076 0.800554
0.524198 0.393980 0.552048
0.743037 0.632495 0.584216
0.264430 0.570424 0.532054
0.538226 0.023322 0.450331
0.513191 0.768138 0.952403
0.790408 0.301653 0.043437
0.328417 0.622360 0.766373
0.186272 0.564519 0.339561
0.251027 0.787802 0.694365
0.045131 0.074015 0.734981
0.066324 0.363983 0.337433
0.129496 0.763412 0.395678
0.451936 0.568539 0.719855
0.084249 0.651408 0.904191
0.484451 0.939076 0.217938
0.355350 0.994250 0.900963
0.195476 0.033896 0.116821
0.772962 0.692030 0.614234
0.727780 0.125820 0.608612
0.602774 0.518449 0.155444
0.191120.5427720.939108
0.9335230.7101470.682257
0.2284460.5130970.438905
0.7007540.4361790.434735
0.7514190.5225040.196855
0.6663690.2615230.0501269
0.5737080.7683830.0225871
0.7502110.3131370.190846
0.5077180.273360.264172
0.6702130.9325990.212948
0.5860360.006718090.574775
0.3363610.2054120.440432
0.5538250.7405550.0648196
0.7645030.468990.878126
0.3234380.181610.943831
0.3299920.04307920.688576
0.09579280.009829630.801123
0.349360.2123070.266992
0.3680020.4141730.890974
0.4710370.1984810.58459
0.3631410.9717880.56757
0.1936270.04736230.347666
0.07882260.8241020.303324
0.8929780.1475940.58952
0.768770.02155640.879563
0.1737340.1312390.179741
0.3927980.5638050.325374
0.241990.1208920.99365
0.9501920.2977340.372967
0.618250.02073460.852418
0.5075410.6346850.435244
0.8578260.812930.263612
0.9059270.4261690.242918
0.5515510.8266870.394286
0.1074760.0180330.122876
0.0276580.315680.861391
0.8649260.04239010.66764
0.9370870.6868360.209923
0.9600320.2140030.456393
0.8382340.7050780.379994
0.7435140.6709460.671558
0.4344250.8796270.0322956
0.9548340.8772880.0612842
0.2399140.9797090.690876
0.3343370.2929610.194138
0.3979710.06462350.15931
0.6397430.5592170.628284
0.3193930.6984220.808751
0.5349810.6057940.215716
0.9324530.6335080.954549
0.8600460.1708770.901505
0.5813380.6969350.013719
0.2735130.03710030.8016
0.8572050.4675070.627542
0.7527210.9741190.427029
0.3711010.2450190.119228
0.733240.9111670.240259
0.6591840.9067270.920069
0.72320.826380.620956
0.665010.286470.644219
0.5509570.8313650.249487
0.1361090.8439370.995786
0.958540.4346250.812213
0.02576740.2974170.212592
0.9569650.06043220.382506
0.647490.4259350.0836791
0.4922440.6948580.91729
0.5955470.1017460.165874
0.715210.5528920.556047
0.7271790.1902030.479701
0.4528990.1919890.800239
0.1897750.5758040.255534
0.7871410.4268640.467209
0.6742160.6301240.24019
0.9210280.3447580.550895
0.05157140.2054240.679874
0.4509430.3975330.256193
0.5203490.2294490.85427
0.4447680.4510410.50927
0.03306420.3740760.800554
0.5241980.393980.552048
0.7430370.6324950.584216
0.264430.5704240.532054
0.5382260.02332190.450331
0.5131910.7681380.952403
0.7904080.3016530.0434372
0.3284170.622360.766373
0.1862720.5645190.339561
0.2510270.7878020.694365
0.04513140.07401470.734981
0.06632410.3639830.337433
0.1294960.7634120.395678
0.4519360.5685390.719855
0.08424920.6514080.904191
0.4844510.9390760.217938
0.355350.994250.900963
0.1954760.03389620.116821
0.7729620.692030.614234
0.727780.125820.608612
0.6027740.5184490.155444
VERTICES 100 200
1 0
1 1
......
......@@ -3,106 +3,106 @@ points
ASCII
DATASET POLYDATA
POINTS 100 double
0.191120 0.542772 0.939108
0.933523 0.710147 0.682257
0.228446 0.513097 0.438905
0.700754 0.436179 0.434735
0.751419 0.522504 0.196855
0.666369 0.261523 0.050127
0.573708 0.768383 0.022587
0.750211 0.313137 0.190846
0.507718 0.273360 0.264172
0.670213 0.932599 0.212948
0.586036 0.006718 0.574775
0.336361 0.205412 0.440432
0.553825 0.740555 0.064820
0.764503 0.468990 0.878126
0.323438 0.181610 0.943831
0.329992 0.043079 0.688576
0.095793 0.009830 0.801123
0.349360 0.212307 0.266992
0.368002 0.414173 0.890974
0.471037 0.198481 0.584590
0.363141 0.971788 0.567570
0.193627 0.047362 0.347666
0.078823 0.824102 0.303324
0.892978 0.147594 0.589520
0.768770 0.021556 0.879563
0.173734 0.131239 0.179741
0.392798 0.563805 0.325374
0.241990 0.120892 0.993650
0.950192 0.297734 0.372967
0.618250 0.020735 0.852418
0.507541 0.634685 0.435244
0.857826 0.812930 0.263612
0.905927 0.426169 0.242918
0.551551 0.826687 0.394286
0.107476 0.018033 0.122876
0.027658 0.315680 0.861391
0.864926 0.042390 0.667640
0.937087 0.686836 0.209923
0.960032 0.214003 0.456393
0.838234 0.705078 0.379994
0.743514 0.670946 0.671558
0.434425 0.879627 0.032296
0.954834 0.877288 0.061284
0.239914 0.979709 0.690876
0.334337 0.292961 0.194138
0.397971 0.064623 0.159310
0.639743 0.559217 0.628284
0.319393 0.698422 0.808751
0.534981 0.605794 0.215716
0.932453 0.633508 0.954549
0.860046 0.170877 0.901505
0.581338 0.696935 0.013719
0.273513 0.037100 0.801600
0.857205 0.467507 0.627542
0.752721 0.974119 0.427029
0.371101 0.245019 0.119228
0.733240 0.911167 0.240259
0.659184 0.906727 0.920069
0.723200 0.826380 0.620956
0.665010 0.286470 0.644219
0.550957 0.831365 0.249487
0.136109 0.843937 0.995786
0.958540 0.434625 0.812213
0.025767 0.297417 0.212592
0.956965 0.060432 0.382506
0.647490 0.425935 0.083679
0.492244 0.694858 0.917290
0.595547 0.101746 0.165874
0.715210 0.552892 0.556047
0.727179 0.190203 0.479701
0.452899 0.191989 0.800239
0.189775 0.575804 0.255534
0.787141 0.426864 0.467209
0.674216 0.630124 0.240190