From 1d7646836efca30dc538451fa9ff72a407712361 Mon Sep 17 00:00:00 2001 From: Benjamin Faigle <benjamin.faigle@posteo.de> Date: Wed, 12 Feb 2014 10:30:10 +0000 Subject: [PATCH] =?UTF-8?q?Adapt=20the=202d-adaptive=20tests=20to=20r12460?= =?UTF-8?q?=20to=20use=20new=20class=20names.=20Changed=20name=20of=20the?= =?UTF-8?q?=20test=20application,=20problem,=20reference=20file=20etc.=20t?= =?UTF-8?q?o=20prepare=20for=20the=20upcoming=203d=20test.=20Reviewd=20by?= =?UTF-8?q?=20Gr=C3=BCniB=C3=BCni?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12464 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- test/decoupled/2p2c/Makefile.am | 4 +- ...adaptive2p2c.cc => test_adaptive2p2c2d.cc} | 4 +- ...ve2p2c.input => test_adaptive2p2c2d.input} | 4 +- ...oblem.hh => test_adaptive2p2c2dproblem.hh} | 59 ++++++++++--------- ....vtu => test_adaptive2p2c2d-reference.vtu} | 0 5 files changed, 38 insertions(+), 33 deletions(-) rename test/decoupled/2p2c/{test_adaptive2p2c.cc => test_adaptive2p2c2d.cc} (97%) rename test/decoupled/2p2c/{test_adaptive2p2c.input => test_adaptive2p2c2d.input} (88%) rename test/decoupled/2p2c/{test_adaptive2p2cproblem.hh => test_adaptive2p2c2dproblem.hh} (85%) rename test/references/{test_adaptive2p2c-reference.vtu => test_adaptive2p2c2d-reference.vtu} (100%) diff --git a/test/decoupled/2p2c/Makefile.am b/test/decoupled/2p2c/Makefile.am index fc55716bea..05596195af 100644 --- a/test/decoupled/2p2c/Makefile.am +++ b/test/decoupled/2p2c/Makefile.am @@ -1,9 +1,9 @@ # programs just to build when "make check" is used -check_PROGRAMS = test_adaptive2p2c test_dec2p2c test_multiphysics2p2c +check_PROGRAMS = test_adaptive2p2c2d test_dec2p2c test_multiphysics2p2c noinst_HEADERS = *.hh -test_adaptive2p2c_SOURCES = test_adaptive2p2c.cc +test_adaptive2p2c2d_SOURCES = test_adaptive2p2c2d.cc test_dec2p2c_SOURCES = test_dec2p2c.cc test_multiphysics2p2c_SOURCES = test_multiphysics2p2c.cc diff --git a/test/decoupled/2p2c/test_adaptive2p2c.cc b/test/decoupled/2p2c/test_adaptive2p2c2d.cc similarity index 97% rename from test/decoupled/2p2c/test_adaptive2p2c.cc rename to test/decoupled/2p2c/test_adaptive2p2c2d.cc index 1ae6f7a870..6844effc98 100644 --- a/test/decoupled/2p2c/test_adaptive2p2c.cc +++ b/test/decoupled/2p2c/test_adaptive2p2c2d.cc @@ -23,7 +23,7 @@ */ #include "config.h" -#include "test_adaptive2p2cproblem.hh" +#include "test_adaptive2p2c2dproblem.hh" #include <dumux/common/start.hh> /*! @@ -60,7 +60,7 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { #if HAVE_ALUGRID - typedef TTAG(Adaptive2p2c) TypeTag; + typedef TTAG(Adaptive2p2c2d) TypeTag; return Dumux::start<TypeTag>(argc, argv, usage); #else #warning ALUGrid needed for this test. diff --git a/test/decoupled/2p2c/test_adaptive2p2c.input b/test/decoupled/2p2c/test_adaptive2p2c2d.input similarity index 88% rename from test/decoupled/2p2c/test_adaptive2p2c.input rename to test/decoupled/2p2c/test_adaptive2p2c2d.input index 302b1e58d3..ed13f70d56 100644 --- a/test/decoupled/2p2c/test_adaptive2p2c.input +++ b/test/decoupled/2p2c/test_adaptive2p2c2d.input @@ -19,14 +19,14 @@ MaxLevel = 1 # CoarsenTolerance = 0.1 # RefineTolerance = 0.15 EnableMultiPointFluxApproximation = 1 -EnableSecondHalfEdge = 1 +MaxInteractionVolumes = 2 ############################################################# #Problem parameters ############################################################# [Problem] -SimulationName = test_adaptive2p2c # name of the output files +SimulationName = test_adaptive2p2c2d # name of the output files OutputInterval = 5 [TimeManager] diff --git a/test/decoupled/2p2c/test_adaptive2p2cproblem.hh b/test/decoupled/2p2c/test_adaptive2p2c2dproblem.hh similarity index 85% rename from test/decoupled/2p2c/test_adaptive2p2cproblem.hh rename to test/decoupled/2p2c/test_adaptive2p2c2dproblem.hh index 7af179920d..168dd356eb 100644 --- a/test/decoupled/2p2c/test_adaptive2p2cproblem.hh +++ b/test/decoupled/2p2c/test_adaptive2p2c2dproblem.hh @@ -21,8 +21,8 @@ * * \brief Test problem for the adaptive sequential 2p2c model */ -#ifndef DUMUX_TEST_ADAPTIVE_2P2C_PROBLEM_HH -#define DUMUX_TEST_ADAPTIVE_2P2C_PROBLEM_HH +#ifndef DUMUX_TEST_ADAPTIVE2D_2P2C_PROBLEM_HH +#define DUMUX_TEST_ADAPTIVE2D_2P2C_PROBLEM_HH #include <dune/grid/alugrid.hh> // #include <dune/grid/uggrid.hh> @@ -44,58 +44,59 @@ namespace Dumux { template<class TypeTag> -class Adaptive2p2c; +class Adaptive2p2c2d; namespace Properties { -NEW_TYPE_TAG(Adaptive2p2c, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpatialParams)); +NEW_TYPE_TAG(Adaptive2p2c2d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpatialParams)); // Set the grid type -SET_PROP(Adaptive2p2c, Grid) +SET_PROP(Adaptive2p2c2d, Grid) { #if HAVE_ALUGRID typedef Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming> type; -// #elif HAVE_UG -// typedef Dune::UGGrid<2> type; +// #elseif HAVE_UG +// typedef Dune::UGGrid<2> type; //would need a DGF file to specify closure #endif }; // set the GridCreator property -SET_TYPE_PROP(Adaptive2p2c, GridCreator, CubeGridCreator<TypeTag>); +SET_TYPE_PROP(Adaptive2p2c2d, GridCreator, CubeGridCreator<TypeTag>); // Set the problem property -SET_PROP(Adaptive2p2c, Problem) +SET_PROP(Adaptive2p2c2d, Problem) { - typedef Dumux::Adaptive2p2c<TTAG(Adaptive2p2c)> type; + typedef Dumux::Adaptive2p2c2d<TTAG(Adaptive2p2c2d)> type; }; // Select fluid system -SET_PROP(Adaptive2p2c, FluidSystem) +SET_PROP(Adaptive2p2c2d, FluidSystem) { typedef Dumux::H2OAirFluidSystem<TypeTag> type; // typedef Dumux::H2ON2FluidSystem<TypeTag> type; // typedef Dumux::Brine_CO2_System<TypeTag, Dumux::Benchmark3::CO2Tables> type; }; -SET_BOOL_PROP(Adaptive2p2c, EnableComplicatedFluidSystem, true); +// Set the 2d Transport and Pressure model (already set as default in properties file) +SET_TYPE_PROP(Adaptive2p2c2d, TransportModel, FV2dTransport2P2CAdaptive<TypeTag>); +SET_TYPE_PROP(Adaptive2p2c2d, PressureModel, FV2dPressure2P2CAdaptive<TypeTag>); + +SET_BOOL_PROP(Adaptive2p2c2d, EnableComplicatedFluidSystem, true); // Select water formulation -SET_PROP(Adaptive2p2c, Components) : public GET_PROP(TypeTag, DefaultComponents) +SET_PROP(Adaptive2p2c2d, Components) : public GET_PROP(TypeTag, DefaultComponents) { typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; // typedef Dumux::TabulatedComponent<Scalar, typename Dumux::H2O<Scalar> > H20; typedef Dumux::H2O<Scalar> H2O; }; // Specify indicator -SET_TYPE_PROP(Adaptive2p2c, AdaptionIndicator, GridAdaptionIndicator2P<TypeTag>); +SET_TYPE_PROP(Adaptive2p2c2d, AdaptionIndicator, GridAdaptionIndicator2P<TypeTag>); // Enable gravity -SET_BOOL_PROP(Adaptive2p2c, ProblemEnableGravity, true); -SET_INT_PROP(Adaptive2p2c, - BoundaryMobility, - GET_PROP_TYPE(TypeTag, Indices)::permDependent); -SET_BOOL_PROP(Adaptive2p2c, EnableCapillarity, true); -SET_INT_PROP(Adaptive2p2c, PressureFormulation, +SET_BOOL_PROP(Adaptive2p2c2d, ProblemEnableGravity, true); +SET_BOOL_PROP(Adaptive2p2c2d, EnableCapillarity, true); +SET_INT_PROP(Adaptive2p2c2d, PressureFormulation, GET_PROP_TYPE(TypeTag, Indices)::pressureN); } @@ -106,8 +107,7 @@ SET_INT_PROP(Adaptive2p2c, PressureFormulation, * * \brief test problem for the grid-adaptive sequential 2p2c model * - * The domain is box shaped (2D), as the gird-adaptive model can only run in - * two dimensions!. All sides are closed (Neumann 0 boundary) + * The domain is box shaped (2D). All sides are closed (Neumann 0 boundary) * except the top and bottom boundaries (Dirichlet). A Gas (Air) * is injected over a vertical well in the center of the domain. * @@ -115,14 +115,14 @@ SET_INT_PROP(Adaptive2p2c, PressureFormulation, * The input file can alter the grid adaptation in group [GridAdapt]: * MinLevel and MaxLevel define the refinement levels of the grid. * Afterwards, the refinement tolerances can be specified. On hanging - * nodes, an mpfa can be used (EnableMultiPointFluxApproximation = 1), at - * best taken both half-edges into account (EnableSecondHalfEdge = 1). + * nodes, a MPFA can be used (EnableMultiPointFluxApproximation = 1), at + * best taken both interaction regions into account (MaxInteractionVolumes = 2). * * To run the simulation execute the following line in shell: * <tt>./test_adaptive2p2c -parameterFile ./test_adaptive2p2c.input</tt> */ -template<class TypeTag = TTAG(Adaptive2p2c)> -class Adaptive2p2c: public IMPETProblem2P2C<TypeTag> +template<class TypeTag = TTAG(Adaptive2p2c2d)> +class Adaptive2p2c2d: public IMPETProblem2P2C<TypeTag> { typedef IMPETProblem2P2C<TypeTag> ParentType; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; @@ -155,7 +155,7 @@ typedef typename GridView::Intersection Intersection; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: -Adaptive2p2c(TimeManager &timeManager, const GridView& gridView) : +Adaptive2p2c2d(TimeManager &timeManager, const GridView& gridView) : ParentType(timeManager, gridView), debugWriter_(gridView, "gridAfterAdapt") { @@ -246,6 +246,7 @@ const void boundaryFormulation(typename Indices::BoundaryFormulation &bcFormulat { bcFormulation = Indices::concentration; } + /*! * \copydoc Dumux::TestDecTwoPTwoCProblem::dirichletAtPos() */ @@ -263,6 +264,7 @@ void dirichletAtPos(PrimaryVariables &bcValues, const GlobalPosition& globalPos) bcValues[Indices::contiNEqIdx] = 1.- bcValues[Indices::contiWEqIdx]; } + /*! * \copydoc Dumux::TestDecTwoPTwoCProblem::neumannAtPos() */ @@ -270,6 +272,7 @@ void neumannAtPos(PrimaryVariables &neumannValues, const GlobalPosition& globalP { this->setZero(neumannValues); } + /*! * \copydoc Dumux::IMPETProblem::source() */ @@ -286,6 +289,7 @@ void source(PrimaryVariables &values, const Element &element) if (fabs(globalPos[0] - 4.8) < 0.5 && fabs(globalPos[1] - 4.8) < 0.5) values[Indices::contiNEqIdx] = 0.0001; } + /*! * \copydoc Dumux::TestDecTwoPTwoCProblem::initialFormulation() */ @@ -293,6 +297,7 @@ const void initialFormulation(typename Indices::BoundaryFormulation &initialForm { initialFormulation = Indices::concentration; } + /*! * \copydoc Dumux::TestDecTwoPTwoCProblem::initConcentrationAtPos() */ diff --git a/test/references/test_adaptive2p2c-reference.vtu b/test/references/test_adaptive2p2c2d-reference.vtu similarity index 100% rename from test/references/test_adaptive2p2c-reference.vtu rename to test/references/test_adaptive2p2c2d-reference.vtu -- GitLab