Commit 828306d8 authored by kraus's avatar kraus
Browse files

fix compile warnings: '‘bct’, ‘voffset‘, ‘coffset‘ may be used uninitialized...

fix compile warnings: '‘bct’, ‘voffset‘, ‘coffset‘ may be used uninitialized in this function' and 'comparison between signed and unsigned integer expressions'
parent 5354120b
......@@ -28,6 +28,7 @@
// include files
#include "Utility/PAssert.h"
#include "Utility/IpplException.h"
#include "Utility/IpplInfo.h"
#include "Field/BareField.h"
#include "Field/BrickExpression.h"
......@@ -995,8 +996,7 @@ storeSpacingFields(e_dim_tag* et, int vnodes)
}
break;
default:
ERRORMSG("Cartesian::storeSpacingFields(): unknown MeshBC type" << endl);
break;
throw IpplException("Cartesian::storeSpacingFields", "unknown MeshBC type");
}
// Loop over all the LField's in the BareField's:
......@@ -3325,4 +3325,4 @@ Average(Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& x,
* $RCSfile: Cartesian.cpp,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:27 $
* IPPL_VERSION_ID: $Id: Cartesian.cpp,v 1.1.1.1 2003/01/23 07:40:27 adelmann Exp $
***************************************************************************/
***************************************************************************/
\ No newline at end of file
......@@ -115,7 +115,7 @@ TEST_F(VerticalFFAMagnetTest, BoundingBoxTest) {
}
TEST_F(VerticalFFAMagnetTest, MaxwellTest) {
// check the field is maxwellian. This is key test for the field model
// check the field is maxwellian. This is key test for the field model
double x = length_m*0.1;
double y = length_m*0.05;
double z = length_m*0.8;
......@@ -134,7 +134,7 @@ TEST_F(VerticalFFAMagnetTest, MaxwellTest) {
double curl = euclidean_norm(maxTest.curlB(pos, 0.));
EXPECT_LT(abs(div), abs(divOld)) << i;
EXPECT_LT(curl, 1e-11);
std::cerr << "Max Order: " << i << " |curlB|: " << curl
std::cerr << "Max Order: " << i << " |curlB|: " << curl
<< " DivB: " << div << std::endl;
if ((i/2)*2 != i) { // div only improves on even orders
divOld = div;
......@@ -148,13 +148,13 @@ TEST_F(VerticalFFAMagnetTest, CoefficientsTest) {
magnet_m->setMaxOrder(10);
magnet_m->initialise();
std::vector< std::vector<double> > coeffs = magnet_m->getDfCoefficients();
EXPECT_EQ(coeffs.size(), 11);
EXPECT_EQ(coeffs.size(), 11u);
for (size_t i = 0; i < coeffs.size(); i++) {
std::vector<double> cv = coeffs[i];
if ((i/2)*2 == i) { // even
EXPECT_EQ(cv.size(), i+1);
EXPECT_EQ(cv.size(), i+1u);
} else { // odd
EXPECT_EQ(cv.size(), 0);
EXPECT_EQ(cv.size(), 0u);
}
}
}
}
\ No newline at end of file
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