Commit 4868efe8 authored by snuverink_j's avatar snuverink_j
Browse files

Merge branch '484-clang-compiler-error-for-verticalffamagnet' into 'master'

Resolve "clang compiler error for VerticalFFAMagnet"

Closes #484

See merge request !299
parents f47470ad d0a6810c
......@@ -12,6 +12,8 @@
#include "AbsBeamline/VerticalFFAMagnet.h"
#include <cmath>
VerticalFFAMagnet::VerticalFFAMagnet(const std::string &name)
: Component(name), straightGeometry_m(1.) {
setElType(isDrift);
......@@ -79,7 +81,7 @@ void VerticalFFAMagnet::accept(BeamlineVisitor& visitor) 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[1] < -zNegExtent_m || R[1] > zPosExtent_m) {
return true;
......
......@@ -132,7 +132,7 @@ TEST_F(VerticalFFAMagnetTest, MaxwellTest) {
//maxTest.printLine(std::cerr, pos, 0.);
double div = maxTest.divB(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);
std::cerr << "Max Order: " << i << " |curlB|: " << curl
<< " 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