Commit 4f7ba464 authored by Beatrix Becker's avatar Beatrix Becker
Browse files

in common and multidomain: runtime params specified in input file where

possible, removed try and catch for reading runtime parameters 


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14322 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 9b78191d
......@@ -90,9 +90,6 @@ public:
typedef Dumux::LiquidPhase<Scalar, Dumux::DNAPL<Scalar> > type;
};
// Enable gravity
SET_BOOL_PROP(GeneralLensProblem, ProblemEnableGravity, true);
///////////////////////////////////////////////////
// Box model TypeTag
//////////////////////////////////////////////////
......@@ -120,10 +117,6 @@ SET_TYPE_PROP(DecoupledGeneralLensProblem, SpatialParamsBaseClass, Dumux::FVSpat
SET_INT_PROP(DecoupledGeneralLensProblem, Formulation,
DecoupledTwoPCommonIndices::pwsn);
SET_INT_PROP(DecoupledGeneralLensProblem, VtkOutputLevel, 1);
SET_SCALAR_PROP(DecoupledGeneralLensProblem, ImpetCFLFactor, 0.95);
}
/*!
......
......@@ -91,21 +91,10 @@ public:
GeneralLensSpatialParams(const GridView& gridView)
: ParentType(gridView)
{
try
{
lensLowerLeft_[0] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensLowerLeftX);
lensLowerLeft_[1] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensLowerLeftY);
lensUpperRight_[0] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensUpperRightX);
lensUpperRight_[1] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensUpperRightY);
}
catch (Dumux::ParameterException &e) {
std::cerr << e << ". Abort!\n";
exit(1) ;
}
catch (...) {
std::cerr << "Unknown exception thrown!\n";
exit(1);
}
lensLowerLeft_[0] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensLowerLeftX);
lensLowerLeft_[1] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensLowerLeftY);
lensUpperRight_[0] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensUpperRightX);
lensUpperRight_[1] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensUpperRightY);
// residual saturations
lensMaterialParams_.setSwr(0.18);
......
......@@ -3,11 +3,11 @@ DtInitial = 250 # [s]
TEnd = 3000 # [s]
[Grid]
NumberOfCellsX = 48# [-] level 0 resolution in x-direction
NumberOfCellsY = 32# [-] level 0 resolution in y-direction
NumberOfCellsX = 48 # [-] level 0 resolution in x-direction
NumberOfCellsY = 32 # [-] level 0 resolution in y-direction
UpperRightX = 6# [m] dimension of the grid
UpperRightY = 4# [m] dimension of the grid
UpperRightX = 6 # [m] dimension of the grid
UpperRightY = 4 # [m] dimension of the grid
[SpatialParams]
LensLowerLeftX = 1.0 # [m] x-coordinate of the lower left lens corner
......@@ -15,3 +15,9 @@ LensLowerLeftY = 2.0 # [m] y-coordinate of the lower left lens corner
LensUpperRightX = 4.0 # [m] x-coordinate of the upper right lens corner
LensUpperRightY = 3.0 # [m] y-coordinate of the upper right lens corner
[Vtk]
OutputLevel = 1
[Impet]
CFLFactor = 0.95
......@@ -3,11 +3,11 @@ DtInitial = 2e1 # [s]
TEnd = 1e2 # [s]
[Grid]
NumberOfCellsX = 48# [-] level 0 resolution in x-direction
NumberOfCellsY = 32# [-] level 0 resolution in y-direction
NumberOfCellsX = 48 # [-] level 0 resolution in x-direction
NumberOfCellsY = 32 # [-] level 0 resolution in y-direction
UpperRightX = 6# [m] dimension of the grid
UpperRightY = 4# [m] dimension of the grid
UpperRightX = 6 # [m] dimension of the grid
UpperRightY = 4 # [m] dimension of the grid
[SpatialParams]
LensLowerLeftX = 1.0 # [m] x-coordinate of the lower left lens corner
......@@ -15,3 +15,9 @@ LensLowerLeftY = 2.0 # [m] y-coordinate of the lower left lens corner
LensUpperRightX = 4.0 # [m] x-coordinate of the upper right lens corner
LensUpperRightY = 3.0 # [m] y-coordinate of the upper right lens corner
[Vtk]
OutputLevel = 1
[Impet]
CFLFactor = 0.95
......@@ -112,26 +112,16 @@ int start_(int argc,
int gridRefinement;
bool useInterfaceMeshCreator;
try
{
dgfFileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File);
dt = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, DtInitial);
tEnd = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, TEnd);
nElements[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, CellsX);
nElements[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, CellsY);
interfacePosY = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosY);
gradingFactorY = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorY);
gridRefinement = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, Refinement);
useInterfaceMeshCreator = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, UseInterfaceMeshCreator);
}
catch (Dumux::ParameterException &e) {
std::cerr << e << ". Abort!\n";
exit(1) ;
}
catch (...) {
std::cerr << "Unknown exception thrown!\n";
exit(1);
}
dgfFileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File);
dt = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, DtInitial);
tEnd = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, TEnd);
nElements[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, CellsX);
nElements[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, CellsY);
interfacePosY = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosY);
gradingFactorY = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorY);
gridRefinement = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, Refinement);
useInterfaceMeshCreator = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, UseInterfaceMeshCreator);
std::cout << "Starting with timestep size = " << dt << "s, simulation end = " << tEnd << "s\n";
if (useInterfaceMeshCreator)
......
......@@ -109,25 +109,15 @@ int start_(int argc,
Scalar interfacePosY, gradingFactorY;
bool useInterfaceMeshCreator;
try
{
dgfFileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File);
dt = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, DtInitial);
tEnd = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, TEnd);
nElements[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, CellsX);
nElements[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, CellsY);
interfacePosY = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosY);
gradingFactorY = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorY);
useInterfaceMeshCreator = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, UseInterfaceMeshCreator);
}
catch (Dumux::ParameterException &e) {
std::cerr << e << ". Abort!\n";
exit(1) ;
}
catch (...) {
std::cerr << "Unknown exception thrown!\n";
exit(1);
}
dgfFileName = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Grid, File);
dt = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, DtInitial);
tEnd = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, TimeManager, TEnd);
nElements[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, CellsX);
nElements[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Grid, CellsY);
interfacePosY = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosY);
gradingFactorY = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorY);
useInterfaceMeshCreator = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, UseInterfaceMeshCreator);
std::cout << "Starting with timestep size = " << dt << "s, simulation end = " << tEnd << "s\n";
if (useInterfaceMeshCreator)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment