Commit d0a6810c authored by snuverink_j's avatar snuverink_j
Browse files

Resolve "clang compiler error for VerticalFFAMagnet"

parent f47470ad
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include "AbsBeamline/VerticalFFAMagnet.h" #include "AbsBeamline/VerticalFFAMagnet.h"
#include <cmath>
VerticalFFAMagnet::VerticalFFAMagnet(const std::string &name) VerticalFFAMagnet::VerticalFFAMagnet(const std::string &name)
: Component(name), straightGeometry_m(1.) { : Component(name), straightGeometry_m(1.) {
setElType(isDrift); setElType(isDrift);
...@@ -79,7 +81,7 @@ void VerticalFFAMagnet::accept(BeamlineVisitor& visitor) const { ...@@ -79,7 +81,7 @@ void VerticalFFAMagnet::accept(BeamlineVisitor& visitor) const {
bool VerticalFFAMagnet::getFieldValue(const Vector_t &R, Vector_t &B) const { bool VerticalFFAMagnet::getFieldValue(const Vector_t &R, Vector_t &B) const {
if (abs(R[0]) > halfWidth_m || if (std::abs(R[0]) > halfWidth_m ||
R[2] < 0. || R[2] > bbLength_m || R[2] < 0. || R[2] > bbLength_m ||
R[1] < -zNegExtent_m || R[1] > zPosExtent_m) { R[1] < -zNegExtent_m || R[1] > zPosExtent_m) {
return true; return true;
......
...@@ -132,7 +132,7 @@ TEST_F(VerticalFFAMagnetTest, MaxwellTest) { ...@@ -132,7 +132,7 @@ TEST_F(VerticalFFAMagnetTest, MaxwellTest) {
//maxTest.printLine(std::cerr, pos, 0.); //maxTest.printLine(std::cerr, pos, 0.);
double div = maxTest.divB(pos, 0.); double div = maxTest.divB(pos, 0.);
double curl = euclidean_norm(maxTest.curlB(pos, 0.)); double curl = euclidean_norm(maxTest.curlB(pos, 0.));
EXPECT_LT(abs(div), abs(divOld)) << i; EXPECT_LT(std::abs(div), std::abs(divOld)) << i;
EXPECT_LT(curl, 1e-11); EXPECT_LT(curl, 1e-11);
std::cerr << "Max Order: " << i << " |curlB|: " << curl std::cerr << "Max Order: " << i << " |curlB|: " << curl
<< " DivB: " << div << std::endl; << " DivB: " << div << std::endl;
......
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