diff --git a/test/decoupled/1p/test_1p.cc b/test/decoupled/1p/test_1p.cc index 52a5790c29d6dce7a4c63a7ffb23c9af2c96d0a2..674395f982600c303d18db624ef37c9d3eda2eaf 100644 --- a/test/decoupled/1p/test_1p.cc +++ b/test/decoupled/1p/test_1p.cc @@ -28,75 +28,63 @@ * \brief test for the decoupled one-phase model. */ #include "config.h" + +//#include <dumux/common/structuredgridcreator.hh> +#include "test_1p_problem.hh" +#include "benchmarkresult.hh" +#include <dumux/common/start.hh> +#include <dumux/common/structuredgridcreator.hh> + + #include <iostream> #include <dune/common/exceptions.hh> #include <dune/common/mpihelper.hh> #include <dune/grid/common/gridinfo.hh> -#include "test_1p_problem.hh" -#include "benchmarkresult.hh" +/*! + * \brief Provides an interface for customizing error messages associated with + * reading in parameters. + * + * \param progName The name of the program, that was tried to be started. + * \param errorMsg The error message that was issued by the start function. + * Comprises the thing that went wrong and a general help message. + */ +void usage(const char *progName, const std::string &errorMsg) +{ + if (errorMsg.size() > 0) { + std::string errorMessageOut = "\nUsage: "; + errorMessageOut += progName; + errorMessageOut += " [options]\n"; + errorMessageOut += errorMsg; + errorMessageOut += "\n\nThe List of Mandatory arguments for this program is:\n" + "\t-refine The refinement level of the grid. [-] \n" + "\t-tEnd The end of the simulation. [s] \n" + "\t-dtInitial The initial timestep size. [s] \n"; + errorMessageOut += "\n\nAdditionaly the following arguments can be specified:\n" + "\t-delta ??? (has to be commented in in the parameter file) \n"; + + std::cout << errorMessageOut + << "\n"; + } +} //////////////////////// // the main function //////////////////////// -void usage(const char *progname) -{ - std::cout << "usage: " << progname << " #refine [delta]\n"; - exit(1); -} - int main(int argc, char** argv) { - try { - typedef TTAG(TestProblemOneP) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef GET_PROP_TYPE(TypeTag, Grid) Grid; - static const int dim = Grid::dimension; - typedef Dune::FieldVector<Scalar, dim> GlobalPosition; - - // initialize MPI, finalize is done automatically on exit - Dune::MPIHelper::instance(argc, argv); - - //////////////////////////////////////////////////////////// - // parse the command line arguments - //////////////////////////////////////////////////////////// - if (argc != 2 && argc != 3) - usage(argv[0]); - - int numRefine; - std::istringstream(argv[1]) >> numRefine; + typedef TTAG(TestProblemOneP) ProblemTypeTag; - double delta = 1e-3; - if (argc == 3) - std::istringstream(argv[2]) >> delta; - - //////////////////////////////////////////////////////////// - // create the grid - //////////////////////////////////////////////////////////// - Dune::FieldVector<int,dim> N(1); - GlobalPosition L(0.0); - GlobalPosition H(1.0); - Grid grid(N,L,H); - grid.globalRefine(numRefine); + return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage); +} - //////////////////////////////////////////////////////////// - // instantiate and run the concrete problem - //////////////////////////////////////////////////////////// - typedef GET_PROP_TYPE(TypeTag, Problem) Problem; - Problem problem(grid.leafView(), delta); - problem.init(); - problem.writeOutput(); +//! \cond INTERNAL +// set the GridCreator property +namespace Dumux { +namespace Properties { +SET_TYPE_PROP(TestProblemOneP, GridCreator, CubeGridCreator<TypeTag>); +}} +//! \endcond - return 0; - } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - throw; - } - return 3; -} diff --git a/test/decoupled/1p/test_1p_problem.hh b/test/decoupled/1p/test_1p_problem.hh index dea35c426bd96e79128d1e61ccdcc0edac71c450..008ac683c787947439a3c9101dc98466cfb2b67d 100644 --- a/test/decoupled/1p/test_1p_problem.hh +++ b/test/decoupled/1p/test_1p_problem.hh @@ -59,8 +59,9 @@ NEW_TYPE_TAG(TestProblemOneP, INHERITS_FROM(FVPressureOneP)) // Set the grid type SET_PROP(TestProblemOneP, Grid) -{// typedef Dune::YaspGrid<2> type; - typedef Dune::SGrid<2, 2> type; +{ + typedef Dune::YaspGrid<2> type; +// typedef Dune::SGrid<2, 2> type; }; // Set the wetting phase @@ -94,6 +95,8 @@ template<class TypeTag> class TestProblemOneP: public DiffusionProblem1P<TypeTag > { typedef DiffusionProblem1P<TypeTag> ParentType; + typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, Fluid) Fluid; @@ -111,11 +114,34 @@ class TestProblemOneP: public DiffusionProblem1P<TypeTag > typedef typename GridView::Traits::template Codim<0>::Entity Element; typedef typename GridView::Intersection Intersection; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + typedef typename GET_PROP(TypeTag, ParameterTree) ParameterTree; + typedef typename GET_PROP(TypeTag, GridCreator) GridCreator; + public: - TestProblemOneP(const GridView &gridView, const double delta = 1.0) : - ParentType(gridView), delta_(delta), velocity_(*this) + TestProblemOneP(TimeManager &timeManager, const GridView &gridView) : + ParentType(gridView), velocity_(*this) { + delta_ = 1e-3 ; + + try + { + if (ParameterTree::tree().hasKey("delta")) + delta_ = GET_RUNTIME_PARAM(TypeTag, Scalar, delta_); + int numRefine; + numRefine = GET_RUNTIME_PARAM(TypeTag, int, numRefine); +#warning access to grid does not work + GridCreator::grid().globalRefine(numRefine); + } + catch (Dumux::ParameterException &e) { + std::cerr << e << ". Abort!\n"; + exit(1) ; + } + catch (...) { + std::cerr << "Unknown exception thrown!\n"; + exit(1); + } + this->spatialParameters().setDelta(delta_); } diff --git a/test/decoupled/2p/test_impes.cc b/test/decoupled/2p/test_impes.cc index ff37e53f35a0adef38659bc7654f051e9cdf6e4f..18a7bb852e94fb8a8c79413e5175ecf1ca148ef7 100644 --- a/test/decoupled/2p/test_impes.cc +++ b/test/decoupled/2p/test_impes.cc @@ -28,8 +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/structuredgridcreator.hh> #include <dune/grid/common/gridinfo.hh> @@ -38,91 +40,47 @@ #include <iostream> +/*! + * \brief Provides an interface for customizing error messages associated with + * reading in parameters. + * + * \param progName The name of the program, that was tried to be started. + * \param errorMsg The error message that was issued by the start function. + * Comprises the thing that went wrong and a general help message. + */ +void usage(const char *progName, const std::string &errorMsg) +{ + if (errorMsg.size() > 0) { + std::string errorMessageOut = "\nUsage: "; + errorMessageOut += progName; + errorMessageOut += " [options]\n"; + errorMessageOut += errorMsg; + errorMessageOut += "\n\nThe List of Mandatory arguments for this program is:\n" + "\t-tEnd The end of the simulation. [s] \n" + "\t-dtInitial The initial timestep size. [s] \n" + "\t-Grid.numberOfCellsX Resolution in x-direction [-]\n" + "\t-Grid.numberOfCellsY Resolution in y-direction [-]\n" + "\t-Grid.upperRightX Dimension of the grid [m]\n" + "\t-Grid.upperRightY Dimension of the grid [m]\n"; + + std::cout << errorMessageOut + << "\n"; + } +} //////////////////////// // the main function //////////////////////// -void usage(const char *progname) -{ - std::cout << "usage: " << progname << " [--restart restartTime] tEnd\n"; - exit(1); -} - int main(int argc, char** argv) { - try { - typedef TTAG(IMPESTestProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef Dune::FieldVector<Scalar, Grid::dimensionworld> GlobalPosition; - - static const int dim = Grid::dimension; - - // initialize MPI, finalize is done automatically on exit - Dune::MPIHelper::instance(argc, argv); - - //////////////////////////////////////////////////////////// - // parse the command line arguments - //////////////////////////////////////////////////////////// - if (argc < 2) - usage(argv[0]); - - // deal with the restart stuff - int argPos = 1; - bool restart = false; - double restartTime = 0; - if (std::string("--restart") == argv[argPos]) { - restart = true; - ++argPos; - - std::istringstream(argv[argPos++]) >> restartTime; - } - - if (argc - argPos != 1) { - usage(argv[0]); - } - - // read the initial time step and the end time - double tEnd, dt; - std::istringstream(argv[argPos++]) >> tEnd; - dt = tEnd; - - //////////////////////////////////////////////////////////// - // create the grid - //////////////////////////////////////////////////////////// - Dune::FieldVector<int,dim> numCells; - numCells[0] = 30; - numCells[1] = 6; - Dune::FieldVector<double,dim> lowerLeft; - lowerLeft[0] = 0; - lowerLeft[1] = 0; - Dune::FieldVector<double,dim> upperRight; - upperRight[0] = 300; - upperRight[1] = 60; - Dune::FieldVector<bool,dim> periodic(false); - - Grid grid(Dune::MPIHelper::getCommunicator(), upperRight, numCells, periodic, /*overlap=*/1); - grid.loadBalance(); - //////////////////////////////////////////////////////////// - // instantiate and run the concrete problem - //////////////////////////////////////////////////////////// - TimeManager timeManager; - Problem problem(timeManager, grid.leafView()); - - // use restart file if necessarry - timeManager.init(problem, restartTime, dt, tEnd, restart); - timeManager.run(); - return 0; - } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - throw; - } - - return 3; + typedef TTAG(IMPESTestProblem) ProblemTypeTag; + return Dumux::startWithParameters<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.input b/test/decoupled/2p/test_impes.input new file mode 100644 index 0000000000000000000000000000000000000000..16d8291a892782f9e6dd3905842bdcf0872a9565 --- /dev/null +++ b/test/decoupled/2p/test_impes.input @@ -0,0 +1,30 @@ +############################################################# +# Parameter file for test_impes # +# Everything behind a '#' is a comment # +# Groups can be ordered e.g. : [BoundaryConditions], # +# see ../boxmodels/2p2c/ for a more detailed example # +############################################################# + +############################################################# +# Mandatory arguments # +############################################################# +tEnd = 1e7 # [s] +dtInitial = 0 #[s] + +[Grid] +numberOfCellsX = 30 # [-] resolution in x-direction +numberOfCellsY = 6 # [-] resolution in y-direction + +upperRightX = 300 # [m] dimension of the grid +upperRightY = 60 # [m] dimension of the grid +##################################################################### +# Simulation restart # +# # +# DuMux simulations can be restarted from *.drs files # +# Set restart to the value of a specific file, e.g.: 'restart = 27184.1' # +# for the restart file # +# name_time=27184.1_rank=0.drs # +# Please comment in the below value, if restart is desired. # +##################################################################### +# restart= ... + diff --git a/test/decoupled/2p/test_impes_problem.hh b/test/decoupled/2p/test_impes_problem.hh index f11d6db465951dae5e276ba846b4361d5c42528f..d8646871bcacfe7039c1c0e72afa7ed8175e3c7d 100644 --- a/test/decoupled/2p/test_impes_problem.hh +++ b/test/decoupled/2p/test_impes_problem.hh @@ -134,8 +134,8 @@ SET_SCALAR_PROP(IMPESTestProblem, CFLFactor, 0.95); * and there is free outflow on the right side. * * To run the simulation execute the following line in shell: - * <tt>./test_impes 1e8</tt>, - * where the argument defines the simulation endtime. + * <tt>./test_impes -parameterFile ./test_impes.input</tt>, + * where the arguments define the parameter file.. */ template<class TypeTag> class IMPESTestProblem: public IMPESProblem2P<TypeTag> @@ -179,8 +179,7 @@ typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes; public: IMPESTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView), eps_(1e-6) -{ -} +{} /*! * \name Problem parameters diff --git a/test/decoupled/2p/test_transport.cc b/test/decoupled/2p/test_transport.cc index 3ae67792d968fb303e6442908a3e9bf056313dee..e262168875b1d271795b0c236b531ed1145e0be0 100644 --- a/test/decoupled/2p/test_transport.cc +++ b/test/decoupled/2p/test_transport.cc @@ -30,87 +30,47 @@ #include "config.h" #include "test_transport_problem.hh" +#include <dumux/common/start.hh> -#include <dune/grid/common/gridinfo.hh> +#include <dune/grid/common/gridinfo.hh> #include <dune/common/exceptions.hh> #include <dune/common/mpihelper.hh> - #include <iostream> -//////////////////////// -// the main function -//////////////////////// -void usage(const char *progname) +/*! + * \brief Provides an interface for customizing error messages associated with + * reading in parameters. + * + * \param progName The name of the program, that was tried to be started. + * \param errorMsg The error message that was issued by the start function. + * Comprises the thing that went wrong and a general help message. + */ +void usage(const char *progName, const std::string &errorMsg) { - std::cout << "usage: "<<progname<<" [--restart restartTime] gridFile.dgf tEnd\n"; - exit(1); + if (errorMsg.size() > 0) { + std::string errorMessageOut = "\nUsage: "; + errorMessageOut += progName; + errorMessageOut += " [options]\n"; + errorMessageOut += errorMsg; + errorMessageOut += "\n\nThe List of Mandatory arguments for this program is:\n" + "\t-tEnd The end of the simulation. [s] \n" + "\t-dtInitial The initial timestep size. [s] \n" + "\t-gridFile The file name of the file containing the grid \n" + "\t definition in DGF format\n"; + + std::cout << errorMessageOut + << "\n"; + } } +//////////////////////// +// the main function +//////////////////////// int main(int argc, char** argv) { - try { - typedef TTAG(TransportTestProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - - // initialize MPI, finalize is done automatically on exit - Dune::MPIHelper::instance(argc, argv); - - //////////////////////////////////////////////////////////// - // parse the command line arguments - //////////////////////////////////////////////////////////// - if (argc < 3) - usage(argv[0]); - - // deal with the restart stuff - int argPos = 1; - bool restart = false; - double restartTime = 0; - if (std::string("--restart") == argv[argPos]) { - restart = true; - ++argPos; - - std::istringstream(argv[argPos++]) >> restartTime; - } - - if (argc - argPos != 2) { - usage(argv[0]); - } - - //////////////////////////////////////////////////////////// - // create the grid - //////////////////////////////////////////////////////////// - const char *dgfFileName = argv[argPos++]; - Dune::GridPtr<Grid> gridPtr(dgfFileName); - - // read the initial time step and the end time - double tEnd, dt; - std::istringstream(argv[argPos++]) >> tEnd; - dt = tEnd; - - //////////////////////////////////////////////////////////// - // instantiate and run the concrete problem - //////////////////////////////////////////////////////////// - - TimeManager timeManager; - Problem problem(timeManager, gridPtr->leafView()); - - // use restart file if necessarry - timeManager.init(problem, restartTime, dt, tEnd, restart); - timeManager.run(); - - return 0; - } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - throw; - } - - return 3; + typedef TTAG(TransportTestProblem) ProblemTypeTag; + return Dumux::startWithParameters<ProblemTypeTag>(argc, argv, usage); } + diff --git a/test/decoupled/2p/test_transport.input b/test/decoupled/2p/test_transport.input new file mode 100644 index 0000000000000000000000000000000000000000..c38544bff79f6c4679d68f82da1095bd84b64e80 --- /dev/null +++ b/test/decoupled/2p/test_transport.input @@ -0,0 +1,25 @@ +############################################################# +# Parameter file for test_transport # +# Everything behind a '#' is a comment # +# Groups can be ordered e.g. : [BoundaryConditions], # +# see ../boxmodels/2p2c/ for a more detailed example # +############################################################# + +############################################################# +# Mandatory arguments # +############################################################# +tEnd = 1e4 # [s] +dtInitial = 0 # [s] +gridFile = ./grids/test_transport.dgf + +##################################################################### +# Simulation restart # +# # +# DuMux simulations can be restarted from *.drs files # +# Set restart to the value of a specific file, e.g.: 'restart = 27184.1' # +# for the restart file # +# name_time=27184.1_rank=0.drs # +# Please comment in the below value, if restart is desired. # +##################################################################### +# restart= ... + diff --git a/test/decoupled/2p/test_transport_problem.hh b/test/decoupled/2p/test_transport_problem.hh index 707d58a3da4b6bbc875499570aedfe1b5305e27e..ac2b8dc30910ad3e0c7969726ffe5d2459f396fa 100644 --- a/test/decoupled/2p/test_transport_problem.hh +++ b/test/decoupled/2p/test_transport_problem.hh @@ -106,8 +106,8 @@ SET_SCALAR_PROP(TransportTestProblem, CFLFactor, 1.0); * pressure field being solved. * * To run the simulation execute the following line in shell: - * <tt>./test_transport grids/test_transport.dgf 16000</tt>, - * where the argument defines the simulation endtime. + * <tt>./test_transport -parameterFile ./test_transport.input</tt>, + * where the arguments define the parameter file. */ template<class TypeTag> class TestTransportProblem: public TransportProblem2P<TypeTag> @@ -150,6 +150,7 @@ public: TestTransportProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView), eps_(1e-6) { + GlobalPosition vel(0); vel[0] = 1e-5; diff --git a/test/decoupled/2p2c/test_dec2p2c.cc b/test/decoupled/2p2c/test_dec2p2c.cc index c78a4f92dd9273231a3b59eb759c31159ae0dd5f..3e3cc6ec79e6c36b39dad9d78ddfedc7ff774f85 100644 --- a/test/decoupled/2p2c/test_dec2p2c.cc +++ b/test/decoupled/2p2c/test_dec2p2c.cc @@ -27,107 +27,58 @@ * \brief test for the sequential 2p2c model */ #include "config.h" - #include "test_dec2p2cproblem.hh" +#include <dumux/common/start.hh> -#include <dune/grid/common/gridinfo.hh> +#include <dumux/common/structuredgridcreator.hh> +#include <dune/grid/common/gridinfo.hh> #include <dune/common/exceptions.hh> #include <dune/common/mpihelper.hh> - #include <iostream> -//////////////////////// -// the main function -//////////////////////// -void usage(const char *progname) +/*! + * \brief Provides an interface for customizing error messages associated with + * reading in parameters. + * + * \param progName The name of the program, that was tried to be started. + * \param errorMsg The error message that was issued by the start function. + * Comprises the thing that went wrong and a general help message. + */ +void usage(const char *progName, const std::string &errorMsg) { - std::cout << "usage: " << progname << " [--restart restartTime] tEnd firstDt\n"; - exit(1); + if (errorMsg.size() > 0) { + std::string errorMessageOut = "\nUsage: "; + errorMessageOut += progName; + errorMessageOut += " [options]\n"; + errorMessageOut += errorMsg; + errorMessageOut += "\n\nThe List of Mandatory arguments for this program is:\n" + "\t-tEnd The end of the simulation. [s] \n" + "\t-dtInitial The initial timestep size. [s] \n" + "\t-Grid.numberOfCellsX Resolution in x-direction [-]\n" + "\t-Grid.numberOfCellsY Resolution in y-direction [-]\n" + "\t-Grid.numberOfCellsZ Resolution in z-direction [-]\n" + "\t-Grid.upperRightX Dimension of the grid [m]\n" + "\t-Grid.upperRightY Dimension of the grid [m]\n" + "\t-Grid.upperRightZ Dimension of the grid [m]\n"; + std::cout << errorMessageOut + << "\n"; + } } +//////////////////////// +// the main function +//////////////////////// int main(int argc, char** argv) { - try { - typedef TTAG(TestDecTwoPTwoCProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef GET_PROP_TYPE(TypeTag, Grid) Grid; - typedef GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef Dune::FieldVector<Scalar, Grid::dimensionworld> GlobalPosition; - - static const int dim = Grid::dimension; - - // initialize MPI, finalize is done automatically on exit - Dune::MPIHelper::instance(argc, argv); - - //////////////////////////////////////////////////////////// - // parse the command line arguments - //////////////////////////////////////////////////////////// - // deal with the restart stuff - int argPos = 1; - bool restart = false; - double startTime = 0; - // deal with start parameters - double tEnd= 3e3; - double firstDt = 200; - if (argc != 1) - { - // deal with the restart stuff - if (std::string("--restart") == argv[argPos]) { - restart = true; - ++argPos; - - std::istringstream(argv[argPos++]) >> startTime; - } - if (argc - argPos == 2) - { - // read the initial time step and the end time - std::istringstream(argv[argPos++]) >> tEnd; - std::istringstream(argv[argPos++]) >> firstDt; - } - else - usage(argv[0]); - } - else - { - Dune::dwarn << "simulation started with predefs" << std::endl; - } - - //////////////////////////////////////////////////////////// - // create the grid - //////////////////////////////////////////////////////////// - Dune::FieldVector<int,dim> N(10); - Dune::FieldVector<double ,dim> L(0); - Dune::FieldVector<double,dim> H(10); - Grid grid( -#ifdef HAVE_MPI - Dune::MPIHelper::getCommunicator(), -#endif - H, // upper right - N, // number of cells - Dune::FieldVector<bool,dim>(false), // periodic - 1); // overlap - - //////////////////////////////////////////////////////////// - // instantiate and run the concrete problem - //////////////////////////////////////////////////////////// - TimeManager timeManager; - Problem problem(timeManager, grid.leafView(), L, H); - - // initialize the simulation - timeManager.init(problem, startTime, firstDt, tEnd, restart); - // run the simulation - timeManager.run(); - return 0; - } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - throw; - } - - return 3; + typedef TTAG(TestDecTwoPTwoCProblem) ProblemTypeTag; + return Dumux::startWithParameters<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_dec2p2c.input b/test/decoupled/2p2c/test_dec2p2c.input new file mode 100644 index 0000000000000000000000000000000000000000..13411b74d4e50fc80fc96dc7d72bb075a9c1cbfa --- /dev/null +++ b/test/decoupled/2p2c/test_dec2p2c.input @@ -0,0 +1,32 @@ +############################################################# +# Parameter file for test_dec2p2c # +# Everything behind a '#' is a comment # +# Groups can be ordered e.g. : [BoundaryConditions], # +# see ../boxmodels/2p2c/ for a more detailed example # +############################################################# + +############################################################# +# Mandatory arguments # +############################################################# +tEnd = 3e3 # [s] +dtInitial = 200 #[s] + +[Grid] +numberOfCellsX = 10 # [-] resolution in x-direction +numberOfCellsY = 10 # [-] resolution in y-direction +numberOfCellsZ = 10 # [-] resolution in y-direction + +upperRightX = 10 # [m] dimension of the grid +upperRightY = 10 # [m] dimension of the grid +upperRightZ = 10 # [m] dimension of the grid +##################################################################### +# Simulation restart # +# # +# DuMux simulations can be restarted from *.drs files # +# Set restart to the value of a specific file, e.g.: 'restart = 27184.1' # +# for the restart file # +# name_time=27184.1_rank=0.drs # +# Please comment in the below value, if restart is desired. # +##################################################################### +# restart= ... + diff --git a/test/decoupled/2p2c/test_dec2p2cproblem.hh b/test/decoupled/2p2c/test_dec2p2cproblem.hh index 4e02124a77d3cc8fc5611c19c0e612118f8d6e7a..e49a71c8a1bc1e2ef1438d4f088ffd87eb72e1de 100644 --- a/test/decoupled/2p2c/test_dec2p2cproblem.hh +++ b/test/decoupled/2p2c/test_dec2p2cproblem.hh @@ -122,9 +122,7 @@ SET_SCALAR_PROP(TestDecTwoPTwoCProblem, CFLFactor, 0.8); * is injected over a vertical well in the center of the domain. * * To run the simulation execute the following line in shell: - * <tt>./test_dec2p2c</tt> - * Optionally, simulation endtime and first timestep size can be - * specified by programm arguments. + * <tt>./test_dec2p2c -parameterFile ./test_dec2p2c.input</tt> */ template<class TypeTag = TTAG(TestDecTwoPTwoCProblem)> class TestDecTwoPTwoCProblem: public IMPETProblem2P2C<TypeTag> @@ -157,8 +155,8 @@ typedef typename GridView::Intersection Intersection; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: -TestDecTwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView, const GlobalPosition lowerLeft = 0, const GlobalPosition upperRight = 0) : -ParentType(timeManager, gridView), lowerLeft_(lowerLeft), upperRight_(upperRight), eps_(1e-6), depthBOR_(1000.0) +TestDecTwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView) : +ParentType(timeManager, gridView), eps_(1e-6), depthBOR_(1000.0) { // this->setOutputInterval(20); // initialize the tables of the fluid system