From 270bf8615cc1cda701f7a74054c6b112aeefa2de Mon Sep 17 00:00:00 2001 From: Philipp Nuske <philipp.nuske@mailbox.org> Date: Wed, 14 Nov 2012 13:32:13 +0000 Subject: [PATCH] - boxspatialparams1p: forward declaration of SpatialParamsForchCoeff - co2 Problems: the boundary IDs need to be initialized *before* intersectionToVertexBC_ can be built. Unclear why it was (most of the time) working before. Reviewed by Bernd git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9543 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/material/spatialparams/boxspatialparams1p.hh | 5 +++-- test/boxmodels/co2/heterogeneousproblem.hh | 8 +++++++- test/boxmodels/co2ni/heterogeneousproblemni.hh | 14 +++++++------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/dumux/material/spatialparams/boxspatialparams1p.hh b/dumux/material/spatialparams/boxspatialparams1p.hh index a5c001780e..3cfffbc7a0 100644 --- a/dumux/material/spatialparams/boxspatialparams1p.hh +++ b/dumux/material/spatialparams/boxspatialparams1p.hh @@ -34,9 +34,10 @@ #include <dune/common/fmatrix.hh> namespace Dumux { -// forward declation of property tags +// forward declaration of property tags namespace Properties { NEW_PROP_TAG(SpatialParams); +NEW_PROP_TAG(SpatialParamsForchCoeff); } /*! @@ -175,7 +176,6 @@ public: * \param fvElemGeom The current finite volume geometry of the element * \param scvIdx The index sub-control volume face where the * intrinsic velocity ought to be calculated. - * */ Scalar forchCoeff(const Element &element, const FVElementGeometry &fvElemGeom, @@ -184,6 +184,7 @@ public: try { const Scalar forchCoeff = GET_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, ForchCoeff); + return forchCoeff ; } catch (Dumux::ParameterException &e) { diff --git a/test/boxmodels/co2/heterogeneousproblem.hh b/test/boxmodels/co2/heterogeneousproblem.hh index bd5397f5e9..4f4c5c62ee 100644 --- a/test/boxmodels/co2/heterogeneousproblem.hh +++ b/test/boxmodels/co2/heterogeneousproblem.hh @@ -178,7 +178,13 @@ public: */ HeterogeneousProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, GridCreator::grid().leafView()), intersectionToVertexBC_(*this) + : ParentType(timeManager, GridCreator::grid().leafView()), + //Boundary Id Setup: + injectionTop_(1), + injectionBottom_(2), + dirichletBoundary_(3), + noFlowBoundary_(4), + intersectionToVertexBC_(*this) { try { diff --git a/test/boxmodels/co2ni/heterogeneousproblemni.hh b/test/boxmodels/co2ni/heterogeneousproblemni.hh index 5f18139ac9..e84a1b508c 100644 --- a/test/boxmodels/co2ni/heterogeneousproblemni.hh +++ b/test/boxmodels/co2ni/heterogeneousproblemni.hh @@ -174,7 +174,13 @@ public: */ HeterogeneousProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, GridCreator::grid().leafView()), intersectionToVertexBC_(*this) + : ParentType(timeManager, GridCreator::grid().leafView()), + //Boundary Id Setup: + injectionTop_ (1), + injectionBottom_(2), + dirichletBoundary_(3), + noFlowBoundary_(4), + intersectionToVertexBC_(*this) { try { @@ -209,12 +215,6 @@ public: * - Overwriting on command line not possible */ - //Boundary Id Setup: - injectionTop_ = 1; - injectionBottom_ = 2; - dirichletBoundary_ = 3; - noFlowBoundary_ = 4; - GridPointer *gridPtr = &GridCreator::gridPtr(); this->spatialParams().setParams(gridPtr); -- GitLab