Commit c8e787e9 by snuverink_j

### Resolve "compiler errors in tests/ippl_src with clang9"

parent deca1fc5
 ... @@ -1563,7 +1563,7 @@ getVertRangeVolume(const NDIndex& ndi) const ... @@ -1563,7 +1563,7 @@ getVertRangeVolume(const NDIndex& ndi) const } } // Compute volume of rectangular solid beweeen these extremal vertices: // Compute volume of rectangular solid beweeen these extremal vertices: MFLOAT volume = 1.0; MFLOAT volume = 1.0; for (d=0; d& ndi) const ... @@ -1593,7 +1593,7 @@ getCellRangeVolume(const NDIndex& ndi) const } } // Compute volume of rectangular solid beweeen these extremal vertices: // Compute volume of rectangular solid beweeen these extremal vertices: MFLOAT volume = 1.0; MFLOAT volume = 1.0; for (unsigned int d=0; d
 ... @@ -1202,9 +1202,9 @@ TEST(Field, SimpleTest8) ... @@ -1202,9 +1202,9 @@ TEST(Field, SimpleTest8) Vektor p1(8,9,10); Vektor p1(8,9,10); Vektor N(static_cast (ceil( (abs(boxMin[0])+boxMax[0])/h[0])), Vektor N(static_cast (std::ceil( (std::abs(boxMin[0])+boxMax[0])/h[0])), static_cast (ceil( (abs(boxMin[1])+boxMax[1])/h[1])), static_cast (std::ceil( (std::abs(boxMin[1])+boxMax[1])/h[1])), static_cast (ceil( (abs(boxMin[2])+boxMax[2])/h[2]))); static_cast (std::ceil( (std::abs(boxMin[2])+boxMax[2])/h[2]))); std::cout << "orig= " << boxMin << " maxext= " << boxMax << std::endl; std::cout << "orig= " << boxMin << " maxext= " << boxMax << std::endl; std::cout << "h= " << h << " N= " << N << std::endl; std::cout << "h= " << h << " N= " << N << std::endl; ... ...
 ... @@ -121,7 +121,7 @@ TEST(Meshes, Cartesian) ... @@ -121,7 +121,7 @@ TEST(Meshes, Cartesian) assign(vectorVert, mesh.getVertexPositionField(vectorVert)); assign(vectorVert, mesh.getVertexPositionField(vectorVert)); scalarCell = Div(vectorVert, scalarCell); scalarCell = Div(vectorVert, scalarCell); // The value should be 3.0 for all elements; test this: // The value should be 3.0 for all elements; test this: EXPECT_NEAR(abs(sum(scalarCell)/totcells), 1.0*D, roundOffError); EXPECT_NEAR(std::abs(sum(scalarCell)/totcells), 1.0*D, roundOffError); //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- ... @@ -160,7 +160,7 @@ TEST(Meshes, Cartesian) ... @@ -160,7 +160,7 @@ TEST(Meshes, Cartesian) double magDiffVectorVert = 0.0; double magDiffVectorVert = 0.0; for (d = 0; d < D; d++) magDiffVectorVert += diffVectorVert(d)*diffVectorVert(d); for (d = 0; d < D; d++) magDiffVectorVert += diffVectorVert(d)*diffVectorVert(d); magDiffVectorVert = sqrt(magDiffVectorVert); magDiffVectorVert = sqrt(magDiffVectorVert); EXPECT_NEAR(abs(magDiffVectorVert), 0, roundOffError); EXPECT_NEAR(std::abs(magDiffVectorVert), 0, roundOffError); //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- ... @@ -198,7 +198,7 @@ TEST(Meshes, Cartesian) ... @@ -198,7 +198,7 @@ TEST(Meshes, Cartesian) double magDiffVectorCell = 0.0; double magDiffVectorCell = 0.0; for (d = 0; d < D; d++) magDiffVectorCell += diffVectorCell(d)*diffVectorCell(d); for (d = 0; d < D; d++) magDiffVectorCell += diffVectorCell(d)*diffVectorCell(d); magDiffVectorCell = sqrt(magDiffVectorCell); magDiffVectorCell = sqrt(magDiffVectorCell); EXPECT_NEAR(abs(magDiffVectorCell), 0, roundOffError); EXPECT_NEAR(std::abs(magDiffVectorCell), 0, roundOffError); //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- ... @@ -224,7 +224,7 @@ TEST(Meshes, Cartesian) ... @@ -224,7 +224,7 @@ TEST(Meshes, Cartesian) magDiffVectorVert = 0.0; magDiffVectorVert = 0.0; for (d = 0; d < D; d++) magDiffVectorVert += diffVectorVert(d)*diffVectorVert(d); for (d = 0; d < D; d++) magDiffVectorVert += diffVectorVert(d)*diffVectorVert(d); magDiffVectorVert = sqrt(magDiffVectorVert); magDiffVectorVert = sqrt(magDiffVectorVert); EXPECT_NEAR(abs(magDiffVectorCell), 0, roundOffError); EXPECT_NEAR(std::abs(magDiffVectorCell), 0, roundOffError); //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- ... @@ -249,7 +249,7 @@ TEST(Meshes, Cartesian) ... @@ -249,7 +249,7 @@ TEST(Meshes, Cartesian) magDiffTensorCell += diffTensorCell(d,d2)*diffTensorCell(d,d2); magDiffTensorCell += diffTensorCell(d,d2)*diffTensorCell(d,d2); } } } } EXPECT_NEAR(abs(magDiffTensorCell), 0, roundOffError); EXPECT_NEAR(std::abs(magDiffTensorCell), 0, roundOffError); //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!