compiler errors in src/Classic/Fields/Interpolation with clang
Summary
Compiler errors with clang
Steps to reproduce
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Check for working C compiler: /opt/local/bin/mpicc-mpich-clang90
Relevant logs and/or screenshots
src/Classic/Fields/Interpolation/ThreeDGrid.h:402:35: error: no member
named 'floor' in namespace 'std'; did you mean simply 'floor'?
xIndex = static_cast<int>(std::floor((x - x_m[0])/(x_m[1]-x_m[0]) ));
^~~~~~~~~~
floor
/usr/include/math.h:474:15: note: 'floor' declared here
extern double floor(double);
^
Possible fixes
use
#include <cmath>
instead of #include <math.h>