From a686abdbe314cfebf9863deacc588dd2c3ed2a15 Mon Sep 17 00:00:00 2001 From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de> Date: Tue, 11 Jun 2013 11:05:55 +0000 Subject: [PATCH] Add namespace std:: for usages of isnan and isinf. (thanks to Timo for finding the issue on Mac; reviewed by kathinka) git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10841 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- .../diffusion/fvmpfa/lmethod/fvmpfal2pfaboundpressure2p.hh | 6 +++--- dumux/decoupled/2p2c/fvpressure2p2c.hh | 2 +- dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh | 2 +- dumux/decoupled/2p2c/fvpressurecompositional.hh | 2 +- dumux/linear/seqsolverbackend.hh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2pfaboundpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2pfaboundpressure2p.hh index 37d35f9d21..786b9563e6 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2pfaboundpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2pfaboundpressure2p.hh @@ -1703,7 +1703,7 @@ void FVMPFAL2PFABoundPressure2P<TypeTag>::assemble() pcFluxReal[2] *= fracFlow34; pcFluxReal[3] *= fracFlow14; -// if (isnan(pcFluxReal.two_norm())) +// if (std::isnan(pcFluxReal.two_norm())) // std::cout<<"pcFlux = "<<pcFlux<<"\n"; switch (pressureType_) @@ -2249,7 +2249,7 @@ bool FVMPFAL2PFABoundPressure2P<TypeTag>::calculateTransmissibility( if (sR <= sL) { transmissibility = TR1; -// if (isnan(transmissibility.frobenius_norm())) +// if (std::isnan(transmissibility.frobenius_norm())) // { // std::cout<<"right transmissibility = "<<transmissibility<<"\n"; // std::cout<<"globalPos1 = "<<globalPos1<<"\n"; @@ -2280,7 +2280,7 @@ bool FVMPFAL2PFABoundPressure2P<TypeTag>::calculateTransmissibility( else { transmissibility = TL1; -// if (isnan(transmissibility.frobenius_norm())) +// if (std::isnan(transmissibility.frobenius_norm())) // { // std::cout<<"left transmissibility = "<<transmissibility<<"\n"; // std::cout<<"globalPos1 = "<<globalPos1<<"\n"; diff --git a/dumux/decoupled/2p2c/fvpressure2p2c.hh b/dumux/decoupled/2p2c/fvpressure2p2c.hh index 14c3a0e2f2..b591e00364 100644 --- a/dumux/decoupled/2p2c/fvpressure2p2c.hh +++ b/dumux/decoupled/2p2c/fvpressure2p2c.hh @@ -279,7 +279,7 @@ void FVPressure2P2C<TypeTag>::getStorage(Dune::FieldVector<Scalar, 2>& storageEn // the pressure Index used as a Primary Variable storageEntry[rhs] -= cellDataI.pressure(pressureType) * compress_term * volume; - if (isnan(compress_term) || isinf(compress_term)) + if (std::isnan(compress_term) || std::isinf(compress_term)) DUNE_THROW(Dune::MathError, "Compressibility term leads to NAN matrix entry at index " << globalIdxI); if(!GET_PROP_VALUE(TypeTag, EnableCompressibility)) diff --git a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh index dd8cf675f2..07909c4f1c 100644 --- a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh +++ b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh @@ -415,7 +415,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pStorage(Dune::FieldVector<Scalar, storageEntry[matrix] -= compress_term*volume; storageEntry[rhs] -= cellDataI.pressure(pressureType) * compress_term * volume; - if (isnan(compress_term) || isinf(compress_term)) + if (std::isnan(compress_term) || std::isinf(compress_term)) DUNE_THROW(Dune::MathError, "Compressibility term leads to NAN matrix entry at index " << globalIdxI); if(!GET_PROP_VALUE(TypeTag, EnableCompressibility)) diff --git a/dumux/decoupled/2p2c/fvpressurecompositional.hh b/dumux/decoupled/2p2c/fvpressurecompositional.hh index 37962a264b..0731c431b5 100644 --- a/dumux/decoupled/2p2c/fvpressurecompositional.hh +++ b/dumux/decoupled/2p2c/fvpressurecompositional.hh @@ -770,7 +770,7 @@ void FVPressureCompositional<TypeTag>::volumeDerivatives(const GlobalPosition& g mass[compIdx] -= massIncrement[compIdx]; //check routines if derivatives are meaningful - if (isnan(cellData.dv(compIdx)) || isinf(cellData.dv(compIdx)) ) + if (std::isnan(cellData.dv(compIdx)) || std::isinf(cellData.dv(compIdx)) ) { DUNE_THROW(Dune::MathError, "NAN/inf of dV_dm. If that happens in first timestep, try smaller firstDt!"); } diff --git a/dumux/linear/seqsolverbackend.hh b/dumux/linear/seqsolverbackend.hh index 763d6fa161..e5228106ad 100644 --- a/dumux/linear/seqsolverbackend.hh +++ b/dumux/linear/seqsolverbackend.hh @@ -566,7 +566,7 @@ public: { for (int j = 0; j < blockSize; j++) { - if (isnan(x[i][j]) || isinf(x[i][j])) + if (std::isnan(x[i][j]) || std::isinf(x[i][j])) { result_.converged = false; break; -- GitLab