From 963ab213842300f8225f2bcbf5b7e7f51564e044 Mon Sep 17 00:00:00 2001 From: Philipp Nuske <philipp.nuske@mailbox.org> Date: Mon, 13 Feb 2012 10:59:02 +0000 Subject: [PATCH] - further unification of cc files: the Gridcreator property is now set in the problem file -> gridcreator standard is dgf, if the gridcreator property is reset, grid dimensions are specified in input file (test/boxmodels/2pni, test/decoupled/1p) -> in the cc: first include the gridcreator file, then the problem - removed some includes from cc files git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7731 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- test/boxmodels/2p/lensproblem.hh | 4 ---- test/boxmodels/2p/test_2p.cc | 11 ----------- test/boxmodels/2pni/injectionproblem2pni.hh | 3 +++ test/boxmodels/2pni/test_2pni.cc | 15 ++------------- test/decoupled/1p/test_1p.cc | 20 ++------------------ test/decoupled/1p/test_1p_problem.hh | 6 ++++-- test/decoupled/2p/test_impes.cc | 19 ++----------------- test/decoupled/2p/test_impes_problem.hh | 3 +++ test/decoupled/2p2c/test_dec2p2c.cc | 16 ++-------------- test/decoupled/2p2c/test_dec2p2cproblem.hh | 3 +++ 10 files changed, 21 insertions(+), 79 deletions(-) diff --git a/test/boxmodels/2p/lensproblem.hh b/test/boxmodels/2p/lensproblem.hh index 9f45a35b65..82645f1554 100644 --- a/test/boxmodels/2p/lensproblem.hh +++ b/test/boxmodels/2p/lensproblem.hh @@ -184,10 +184,6 @@ class LensProblem : public TwoPProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - - - - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; diff --git a/test/boxmodels/2p/test_2p.cc b/test/boxmodels/2p/test_2p.cc index e42a7b1c79..90de50abc9 100644 --- a/test/boxmodels/2p/test_2p.cc +++ b/test/boxmodels/2p/test_2p.cc @@ -30,14 +30,6 @@ #include "lensproblem.hh" #include <dumux/common/start.hh> -#include <dune/grid/common/gridinfo.hh> - -#include <dune/common/exceptions.hh> -#include <dune/common/mpihelper.hh> -#include <dune/grid/uggrid.hh> - -#include <iostream> - /*! * \brief Provides an interface for customizing error messages associated with * reading in parameters. @@ -77,6 +69,3 @@ int main(int argc, char** argv) typedef TTAG(LensProblem) TypeTag; return Dumux::start<TypeTag>(argc, argv, usage); } - - - diff --git a/test/boxmodels/2pni/injectionproblem2pni.hh b/test/boxmodels/2pni/injectionproblem2pni.hh index 51871e26af..4f39c0f9d2 100644 --- a/test/boxmodels/2pni/injectionproblem2pni.hh +++ b/test/boxmodels/2pni/injectionproblem2pni.hh @@ -58,6 +58,9 @@ NEW_TYPE_TAG(InjectionProblem2PNI, INHERITS_FROM(BoxTwoPNI, InjectionSpatialPara NEW_TYPE_TAG(InjectionProblem2PNI, INHERITS_FROM(BoxTwoP, InjectionSpatialParameters)); #endif +// set the GridCreator property +SET_TYPE_PROP(InjectionProblem2PNI, GridCreator, CubeGridCreator<TypeTag>); + // Set the grid type SET_PROP(InjectionProblem2PNI, Grid) { diff --git a/test/boxmodels/2pni/test_2pni.cc b/test/boxmodels/2pni/test_2pni.cc index 54aded58d3..07065a5900 100644 --- a/test/boxmodels/2pni/test_2pni.cc +++ b/test/boxmodels/2pni/test_2pni.cc @@ -27,11 +27,11 @@ * \brief test for the 2pni box model */ #include "config.h" -#include "injectionproblem2pni.hh" -#include <dumux/common/start.hh> #include <dumux/common/structuredcubegridcreator.hh> +#include "injectionproblem2pni.hh" +#include <dumux/common/start.hh> /*! * \brief Provides an interface for customizing error messages associated with @@ -69,14 +69,3 @@ int main(int argc, char** argv) typedef TTAG(InjectionProblem2PNI) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); } - -//! \cond INTERNAL -// set the GridCreator property -namespace Dumux { -namespace Properties { -SET_TYPE_PROP(InjectionProblem2PNI, GridCreator, CubeGridCreator<TypeTag>); -}} -//! \endcond - - - diff --git a/test/decoupled/1p/test_1p.cc b/test/decoupled/1p/test_1p.cc index 0b567cc628..e375e4ca51 100644 --- a/test/decoupled/1p/test_1p.cc +++ b/test/decoupled/1p/test_1p.cc @@ -29,17 +29,11 @@ */ #include "config.h" +#include <dumux/common/structuredcubegridcreator.hh> + #include "test_1p_problem.hh" #include "benchmarkresult.hh" #include <dumux/common/start.hh> -#include <dumux/common/structuredcubegridcreator.hh> - - -#include <iostream> - -#include <dune/common/exceptions.hh> -#include <dune/common/mpihelper.hh> -#include <dune/grid/common/gridinfo.hh> /*! * \brief Provides an interface for customizing error messages associated with @@ -77,13 +71,3 @@ int main(int argc, char** argv) return Dumux::start<ProblemTypeTag>(argc, argv, usage); } - -//! \cond INTERNAL -// set the GridCreator property -namespace Dumux { -namespace Properties { -SET_TYPE_PROP(TestProblemOneP, GridCreator, CubeGridCreator<TypeTag>); -}} -//! \endcond - - diff --git a/test/decoupled/1p/test_1p_problem.hh b/test/decoupled/1p/test_1p_problem.hh index f5b34974a3..5039bd570b 100644 --- a/test/decoupled/1p/test_1p_problem.hh +++ b/test/decoupled/1p/test_1p_problem.hh @@ -54,8 +54,10 @@ class TestProblemOneP; ////////// namespace Properties { -NEW_TYPE_TAG(TestProblemOneP, INHERITS_FROM(FVPressureOneP)) - ; +NEW_TYPE_TAG(TestProblemOneP, INHERITS_FROM(FVPressureOneP)); + +// set the GridCreator property +SET_TYPE_PROP(TestProblemOneP, GridCreator, CubeGridCreator<TypeTag>); // Set the grid type SET_PROP(TestProblemOneP, Grid) diff --git a/test/decoupled/2p/test_impes.cc b/test/decoupled/2p/test_impes.cc index 64ad25a6f3..9aa8c4d715 100644 --- a/test/decoupled/2p/test_impes.cc +++ b/test/decoupled/2p/test_impes.cc @@ -28,17 +28,10 @@ * \brief test for the sequential 2p model */ #include "config.h" -#include "test_impes_problem.hh" -#include <dumux/common/start.hh> - #include <dumux/common/structuredcubegridcreator.hh> -#include <dune/grid/common/gridinfo.hh> - -#include <dune/common/exceptions.hh> -#include <dune/common/mpihelper.hh> - -#include <iostream> +#include "test_impes_problem.hh" +#include <dumux/common/start.hh> /*! * \brief Provides an interface for customizing error messages associated with @@ -76,11 +69,3 @@ int main(int argc, char** argv) typedef TTAG(IMPESTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); } - -//! \cond INTERNAL -// set the GridCreator property -namespace Dumux { -namespace Properties { -SET_TYPE_PROP(IMPESTestProblem, GridCreator, CubeGridCreator<TypeTag>); -}} -//! \endcond diff --git a/test/decoupled/2p/test_impes_problem.hh b/test/decoupled/2p/test_impes_problem.hh index d8646871bc..a93c5161c7 100644 --- a/test/decoupled/2p/test_impes_problem.hh +++ b/test/decoupled/2p/test_impes_problem.hh @@ -66,6 +66,9 @@ namespace Properties { NEW_TYPE_TAG(IMPESTestProblem, INHERITS_FROM(FVPressureTwoP, FVTransportTwoP, IMPESTwoP, TestIMPESSpatialParams)); +// set the GridCreator property +SET_TYPE_PROP(IMPESTestProblem, GridCreator, CubeGridCreator<TypeTag>); + // Set the grid type SET_PROP(IMPESTestProblem, Grid) { diff --git a/test/decoupled/2p2c/test_dec2p2c.cc b/test/decoupled/2p2c/test_dec2p2c.cc index feb1017763..c2167536ea 100644 --- a/test/decoupled/2p2c/test_dec2p2c.cc +++ b/test/decoupled/2p2c/test_dec2p2c.cc @@ -27,15 +27,11 @@ * \brief test for the sequential 2p2c model */ #include "config.h" -#include "test_dec2p2cproblem.hh" -#include <dumux/common/start.hh> #include <dumux/common/structuredcubegridcreator.hh> -#include <dune/grid/common/gridinfo.hh> -#include <dune/common/exceptions.hh> -#include <dune/common/mpihelper.hh> -#include <iostream> +#include "test_dec2p2cproblem.hh" +#include <dumux/common/start.hh> /*! * \brief Provides an interface for customizing error messages associated with @@ -74,11 +70,3 @@ int main(int argc, char** argv) typedef TTAG(TestDecTwoPTwoCProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); } - -//! \cond INTERNAL -// set the GridCreator property -namespace Dumux { -namespace Properties { -SET_TYPE_PROP(TestDecTwoPTwoCProblem, GridCreator, CubeGridCreator<TypeTag>); -}} -//! \endcond diff --git a/test/decoupled/2p2c/test_dec2p2cproblem.hh b/test/decoupled/2p2c/test_dec2p2cproblem.hh index e49a71c8a1..bd61459fbd 100644 --- a/test/decoupled/2p2c/test_dec2p2cproblem.hh +++ b/test/decoupled/2p2c/test_dec2p2cproblem.hh @@ -57,6 +57,9 @@ namespace Properties { NEW_TYPE_TAG(TestDecTwoPTwoCProblem, INHERITS_FROM(DecoupledTwoPTwoC, Test2P2CSpatialParams)); +// set the GridCreator property +SET_TYPE_PROP(TestDecTwoPTwoCProblem, GridCreator, CubeGridCreator<TypeTag>); + // Set the grid type SET_PROP(TestDecTwoPTwoCProblem, Grid) { -- GitLab