From 61c4cbf40d96f6a22b755d2656a7b95ce729f496 Mon Sep 17 00:00:00 2001 From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de> Date: Mon, 27 Feb 2012 17:36:07 +0000 Subject: [PATCH] Changed abs to fabs. git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7932 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/decoupled/2p2c/fvpressure2p2c.hh | 4 ++-- dumux/material/components/iapws/common.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dumux/decoupled/2p2c/fvpressure2p2c.hh b/dumux/decoupled/2p2c/fvpressure2p2c.hh index d5d05a72d1..06adf310c2 100644 --- a/dumux/decoupled/2p2c/fvpressure2p2c.hh +++ b/dumux/decoupled/2p2c/fvpressure2p2c.hh @@ -953,12 +953,12 @@ void FVPressure2P2C<TypeTag>::updateMaterialLawsInElement(const Element& element fluidState.saturation(wPhaseIdx)); // TODO: get right criterion, do output for evaluation //converge criterion - if (abs(oldPc-pc)<10) + if (fabs(oldPc-pc)<10) maxiter = 1; iterout = iter; } if(iterout !=0) - Dune::dinfo << iterout << "times iteration of pc was applied at Idx " << globalIdx << ", pc delta still " << abs(oldPc-pc) << std::endl; + Dune::dinfo << iterout << "times iteration of pc was applied at Idx " << globalIdx << ", pc delta still " << fabs(oldPc-pc) << std::endl; } // initialize phase properties not stored in fluidstate cellData.setViscosity(wPhaseIdx, FluidSystem::viscosity(fluidState, wPhaseIdx)); diff --git a/dumux/material/components/iapws/common.hh b/dumux/material/components/iapws/common.hh index 200dbc8850..db52883e08 100644 --- a/dumux/material/components/iapws/common.hh +++ b/dumux/material/components/iapws/common.hh @@ -213,7 +213,7 @@ public: * rhobar + thcond_b2 * exp(thcond_B1 * ((rhobar + thcond_B2)*(rhobar + thcond_B2))); - Scalar DTbar = abs(Tbar - 1) + thcond_c4; + Scalar DTbar = fabs(Tbar - 1) + thcond_c4; Scalar DTbarpow = pow(DTbar, 3./5); Scalar Q = 2. + thcond_c5 / DTbarpow; -- GitLab