From ba316dd6513d3781fbe82a44d542b47d9cccf683 Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Tue, 7 Oct 2014 10:45:09 +0200 Subject: [PATCH] more convenient name. --- opm/core/simulator/PIDTimeStepControl.cpp | 8 ++++---- opm/core/simulator/PIDTimeStepControl.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/opm/core/simulator/PIDTimeStepControl.cpp b/opm/core/simulator/PIDTimeStepControl.cpp index e54c61a2..6c21ed1f 100644 --- a/opm/core/simulator/PIDTimeStepControl.cpp +++ b/opm/core/simulator/PIDTimeStepControl.cpp @@ -57,12 +57,12 @@ namespace Opm } // compute || u^n - u^n+1 || - const double stateOld = euclideanNorm2( p0_.begin(), p0_.end() ) + - euclideanNorm2( sat0_.begin(), sat0_.end() ); + const double stateOld = euclideanNormSquared( p0_.begin(), p0_.end() ) + + euclideanNormSquared( sat0_.begin(), sat0_.end() ); // compute || u^n+1 || - const double stateNew = euclideanNorm2( state.pressure().begin(), state.pressure().end() ) + - euclideanNorm2( state.saturation().begin(), state.saturation().end() ); + const double stateNew = euclideanNormSquared( state.pressure().begin(), state.pressure().end() ) + + euclideanNormSquared( state.saturation().begin(), state.saturation().end() ); // shift errors for( int i=0; i<2; ++i ) diff --git a/opm/core/simulator/PIDTimeStepControl.hpp b/opm/core/simulator/PIDTimeStepControl.hpp index 46024e7b..b02a28cd 100644 --- a/opm/core/simulator/PIDTimeStepControl.hpp +++ b/opm/core/simulator/PIDTimeStepControl.hpp @@ -57,7 +57,7 @@ namespace Opm protected: // return inner product for given container, here std::vector template - double euclideanNorm2( Iterator it, const Iterator end ) const + double euclideanNormSquared( Iterator it, const Iterator end ) const { double product = 0.0 ; for( ; it != end; ++it )