Replaced include math.h with cmath, and changed from fabs to abs. Fixed an error in the testfile, a filename was wrong
This commit is contained in:
parent
e7e2f6588b
commit
ed8efaefe1
@ -19,12 +19,12 @@
|
||||
|
||||
#ifndef OPM_BLACKOILSTATE_HEADER_INCLUDED
|
||||
#define OPM_BLACKOILSTATE_HEADER_INCLUDED
|
||||
#include <math.h>
|
||||
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/props/BlackoilPropertiesInterface.hpp>
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -128,7 +128,7 @@ namespace Opm
|
||||
return false;
|
||||
|
||||
for (size_t i = 0; i < v1.size(); i++)
|
||||
if (fabs(v1[i] - v2[i]) > epsilon * (fabs(v1[i]) + fabs(v2[i])))
|
||||
if (std::abs(v1[i] - v2[i]) > epsilon * (std::abs(v1[i]) + std::abs(v2[i])))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(EqualsDifferentNumPhasesReturnFalse) {
|
||||
|
||||
const string filename = "testBlackoilState.DATA";
|
||||
const string filename = "testBlackoilState1.DATA";
|
||||
const EclipseGridParser deck (filename);
|
||||
|
||||
GridManager gridManager(deck);
|
||||
@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentNumPhasesReturnFalse) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(EqualsNumericalDifferenceReturnFalse) {
|
||||
|
||||
const string filename = "testBlackoilState.DATA";
|
||||
const string filename = "testBlackoilState1.DATA";
|
||||
const EclipseGridParser deck (filename);
|
||||
|
||||
GridManager gridManager(deck);
|
||||
|
Loading…
Reference in New Issue
Block a user