Commit db2860f9 authored by snuverink_j's avatar snuverink_j

Merge branch '532-compiler-errors-with-clang' into 'master'

Resolve "compiler errors with clang"

Closes #532

See merge request OPAL/src!352
parents 79f8978e 3e2e1d2f
......@@ -14,10 +14,11 @@
#include "AbsBeamline/Cyclotron.h"
#include "Utilities/Timer.h"
#include <iostream>
#include <cmath>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <iostream>
#include <string>
......@@ -484,7 +485,7 @@ void Aperture::calcul(Twiss::TLine::iterator i, A_row &a, int nslice, Twiss *tp)
}
if(abs(Kx) < 1e-6) {
if(std::abs(Kx) < 1e-6) {
for(int j = 1; j <= nslice - 1; ++j) {
//expansion of the transformation matrix coefficients at third order
......@@ -550,7 +551,7 @@ void Aperture::calcul(Twiss::TLine::iterator i, A_row &a, int nslice, Twiss *tp)
(Transf_mat(1, 1) * Transf_mat(0, 0) - Transf_mat(1, 0) * Transf_mat(0, 1));
}
}
if(abs(Ky) < 1e-6) {
if(std::abs(Ky) < 1e-6) {
for(int j = 1; j <= nslice - 1; ++j) {
//expansion of the transformation matrix coefficients at third order
......
......@@ -459,7 +459,7 @@ void MSplit::calcul(Twiss::TLine::iterator i, A_row &a, int nslice, Twiss *tp) {
}
if(abs(Kx) < 1e-6) {
if(std::abs(Kx) < 1e-6) {
for(int j = 1; j <= nslice - 1; ++j) {
//expansion of the transformation matrix coefficients at third order
......@@ -528,7 +528,7 @@ void MSplit::calcul(Twiss::TLine::iterator i, A_row &a, int nslice, Twiss *tp) {
(Transf_mat(1, 1) * Transf_mat(0, 0) - Transf_mat(1, 0) * Transf_mat(0, 1));
}
}
if(abs(Ky) < 1e-6) {
if(std::abs(Ky) < 1e-6) {
for(int j = 1; j <= nslice - 1; ++j) {
//expansion of the transformation matrix coefficients at third order
......
This diff is collapsed.
......@@ -118,7 +118,7 @@ void GreenWakeFunction::apply(PartBunchBase<double, 3> *bunch) {
mindist = rmin(2);
switch(direction_m) {
case LONGITUDINAL:
spacing = abs(rmax(2) - rmin(2));
spacing = std::abs(rmax(2) - rmin(2));
break; //FIXME: Kann mann das Spacing immer ändern?
case TRANSVERSAL:
spacing = rmax(0) * rmax(0) + rmax(1) * rmax(1);
......
......@@ -289,7 +289,7 @@ void Period::findClosedOrbit() {
//std::cerr << "for static map ...\n" << std::endl;
for(int i = 0; i < 4; i++) {
A(i, i) -= 1.0;
if(abs(Error(i)) > error) error = abs(Error(i));
if(std::abs(Error(i)) > error) error = std::abs(Error(i));
}
for(int i = 4; i < 6; i++) {
for(int j = 0; j < 6; j++) A(i, j) = A(j, i) = 0.0;
......@@ -301,7 +301,7 @@ void Period::findClosedOrbit() {
//std::cerr << "for dynamic map ...\n" << std::endl;
for(int i = 0; i < 6; i++) {
A(i, i) -= 1.0;
if(abs(Error(i)) > error) error = abs(Error(i));
if(std::abs(Error(i)) > error) error = std::abs(Error(i));
}
}
......
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