Fix abs() ambiguity, add copyright headers.

This commit is contained in:
Atgeirr Flø Rasmussen
2019-11-14 13:09:35 +01:00
parent 6d83672f94
commit 87a0e0e402

View File

@@ -1,10 +1,29 @@
//#include <chrono>
/*
Copyright 2019 Equinor ASA.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cmath>
#include <iomanip>
#include <iostream>
#include <tuple>
#include <getopt.h>
#include <sstream>
#include <opm/io/eclipse/ESmry.hpp>
@@ -32,7 +51,7 @@ std::string formatString(float data){
std::stringstream stream;
if (abs(data)<1e6){
if (std::fabs(data) < 1e6){
stream << std::fixed << std::setw(16) << std::setprecision(6) << data;
} else {
stream << std::scientific << std::setw(16) << std::setprecision(6) << data;