Commit 68cfca2f authored by snuverink_j's avatar snuverink_j
Browse files

fix compiler warnings in ippl unit tests

parent 35057aa4
......@@ -106,7 +106,6 @@ TEST(Field, BC)
Field<Vektor<double,Dim>,Dim,M,Cell> vcB(layout);
// Assign reference values:
counter=0;
value=0.0;
for (j=0; j<5; j++) {
for (i=0; i<5; i++) {
value = counter++;
......@@ -154,9 +153,6 @@ TEST(Field, BC)
// Assign red-flag values for to make inaccessible vector components visible:
vfA = 9.99;
vfB = 9.99;
// Assign reference values:
counter=0;
value=0.0;
Index Iverts(5);
Index Jverts(5);
Index Icells(4);
......@@ -246,7 +242,6 @@ TEST(Field, BC)
vfzC(layout,GuardCellSizes<Dim>(2),vfbcz);
// Assign reference values:
counter=0;
value=0.0;
for (j=0; j<5; j++) {
for (i=0; i<5; i++) {
value = counter++;
......@@ -281,7 +276,6 @@ TEST(Field, BC)
Field<Vektor<double,Dim>,Dim,M,Vert> vzC(layout,GuardCellSizes<Dim>(2),vbcz);
// Assign reference values:
counter=0;
value=0.0;
for (j=0; j<5; j++) {
for (i=0; i<5; i++) {
value = counter++;
......
......@@ -213,7 +213,6 @@ TEST(Field, Compressed)
}
assign(A[3][3] , 1 );
count = 0;
int reduced_count = 0;
if (IpplInfo::noFieldCompression) {
if (A.CompressedFraction() != 0) {
std::cout << "FAILED: Compressed somewhere after assigning single" << std::endl;
......@@ -224,7 +223,7 @@ TEST(Field, Compressed)
if ( (*lf).second->IsCompressed() )
++count;
}
reduced_count = 0;
int reduced_count = 0;
reduce(&count,&count+1,&reduced_count,OpAddAssign());
EXPECT_EQ(reduced_count, 3);
}
......@@ -254,7 +253,7 @@ TEST(Field, Compressed)
if ( (*lf).second->IsCompressed() )
++count;
}
reduced_count = 0;
int reduced_count = 0;
reduce(&count,&count+1,&reduced_count,OpAddAssign());
if (Ippl::deferGuardCellFills) {
EXPECT_EQ(reduced_count,3);
......@@ -282,7 +281,7 @@ TEST(Field, Compressed)
if ( (*lf).second->IsCompressed() )
++count;
}
reduced_count = 0;
int reduced_count = 0;
reduce(&count,&count+1,&reduced_count,OpAddAssign());
if (Ippl::deferGuardCellFills) {
EXPECT_EQ(reduced_count,3);
......@@ -314,7 +313,7 @@ TEST(Field, Compressed)
if ( (*lb).second->IsCompressed() )
++count;
}
reduced_count = 0;
int reduced_count = 0;
reduce(&count,&count+1,&reduced_count,OpAddAssign());
EXPECT_EQ(reduced_count, 3);
}
......@@ -535,9 +534,6 @@ TEST(Field, Reduceloc)
{
Index I(5);
Index J(5);
NDIndex<Dim> domain;
domain[0] = I;
domain[1] = J;
FieldLayout<Dim> layout(I,J);
Field<double,Dim> A(layout);
Field<double,Dim> B(layout);
......
......@@ -85,11 +85,8 @@ TEST(Meshes, Average)
// Test one of the unweighted (2-argument) Average() functions:
// Average from Field<Vektor,Vert> to Field<Vektor,Cell>
// Vector Field, Cell-centered
Field<Vektor<double,Dim3>,Dim3,UniformCartesian<Dim3>,Vert>
vVu(layoutVert,gc);
Field<Vektor<double,Dim3>,Dim3,UniformCartesian<Dim3>,Cell>
avgToCSu(layoutCell,gc);
vVu = ones;
assign(avgToCSu, Average(vV, avgToCSu));
// Check results:
EXPECT_TRUE(sum(avgToCSu) == (nx-1)*(ny-1)*(nz-1));
......
......@@ -19,7 +19,7 @@ TEST(Meshes, Cartesian)
// Sizes:
unsigned nverts[D], ncells[D];
unsigned totverts=1, totcells=1;
unsigned totverts, totcells=1;
unsigned int d;
for (d=0; d<D; d++) {
......@@ -246,7 +246,7 @@ TEST(Meshes, Cartesian)
magDiffTensorCell += diffTensorCell(d,d2)*diffTensorCell(d,d2);
}
}
EXPECT_NEAR(abs(magDiffVectorCell), 0, roundOffError);
EXPECT_NEAR(abs(magDiffTensorCell), 0, roundOffError);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
......
......@@ -4,7 +4,6 @@
// #include "Algorithms/PartData.h"
#include "Particle/IntCIC.h"
#include "Particle/ParticleSpatialLayout.h"
#include "Particle/ParticleUniformLayout.h"
#include "Particle/ParticleAttrib.h"
#include "Meshes/UniformCartesian.h"
#include "Meshes/Centering.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment