From fd06ea600c723d64f379c78d17fc42a6356602c0 Mon Sep 17 00:00:00 2001
From: Bernd Flemisch <bernd@iws.uni-stuttgart.de>
Date: Wed, 22 May 2013 15:27:51 +0000
Subject: [PATCH] Since commit r10693, all problems that use a model based on
 FVPressure had to provide an initial(AtPos) function. Default implementations
 are available in onemodelproblem.hh and impetproblem.hh, but threw an
 exception. Since many test problems have lived for several years with an
 initial guess of 0, the default behavior has been changed to not throw an
 exception and to set the values to 0.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10737 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/decoupled/common/impetproblem.hh    | 6 ++----
 dumux/decoupled/common/onemodelproblem.hh | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/dumux/decoupled/common/impetproblem.hh b/dumux/decoupled/common/impetproblem.hh
index 6e034a3419..19b7b6fad7 100644
--- a/dumux/decoupled/common/impetproblem.hh
+++ b/dumux/decoupled/common/impetproblem.hh
@@ -309,10 +309,8 @@ public:
     void initialAtPos(PrimaryVariables &values,
                       const GlobalPosition &globalPos) const
     {
-        // Throw an exception (there is no initial condition)
-        DUNE_THROW(Dune::InvalidStateException,
-                   "The problem does not provide "
-                   "a initialAtPos() method.");
+        // initialize with 0 by default
+        values = 0;
     }
 
     /*!
diff --git a/dumux/decoupled/common/onemodelproblem.hh b/dumux/decoupled/common/onemodelproblem.hh
index ce0961d26b..d34009071a 100644
--- a/dumux/decoupled/common/onemodelproblem.hh
+++ b/dumux/decoupled/common/onemodelproblem.hh
@@ -311,10 +311,8 @@ public:
     void initialAtPos(PrimaryVariables &values,
             const GlobalPosition &globalPos) const
     {
-        // Throw an exception (there is no initial condition)
-        DUNE_THROW(Dune::InvalidStateException,
-                   "The problem does not provide "
-                   "a initialAtPos() method.");
+        // initialize with 0 by default
+        values = 0;
     }
 
     /*!
-- 
GitLab