changed: move the GridFile parameter to Opm::Parameters

This commit is contained in:
Arne Morten Kvarving 2024-07-01 10:20:05 +02:00
parent ff46b91ff0
commit ef55cf2489
13 changed files with 61 additions and 51 deletions

View File

@ -206,10 +206,6 @@ struct Temperature<TypeTag, TTag::Co2InjectionBaseProblem>
template<class TypeTag>
struct SimulationName<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr auto value = "co2injection"; };
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::Co2InjectionBaseProblem> { static constexpr auto value = "data/co2injection.dgf"; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -222,6 +218,11 @@ struct EndTime<TypeTag, Properties::TTag::Co2InjectionBaseProblem>
static constexpr type value = 1e4;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::Co2InjectionBaseProblem>
{ static constexpr auto value = "data/co2injection.dgf"; };
// The default for the initial time step size of the simulation
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::Co2InjectionBaseProblem>

View File

@ -116,10 +116,6 @@ public:
using type = Opm::SomertonThermalConductionLaw<FluidSystem, Scalar>;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::CuvetteBaseProblem> { static constexpr auto value = "./data/cuvette_11x4.dgf"; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -132,6 +128,11 @@ struct EndTime<TypeTag, Properties::TTag::CuvetteBaseProblem>
static constexpr type value = 180;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::CuvetteBaseProblem>
{ static constexpr auto value = "./data/cuvette_11x4.dgf"; };
// The default for the initial time step size of the simulation
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::CuvetteBaseProblem>

View File

@ -160,10 +160,6 @@ struct EnableGravity<TypeTag, TTag::FractureProblem> { static constexpr bool val
template<class TypeTag>
struct EnableConstraints<TypeTag, TTag::FractureProblem> { static constexpr bool value = true; };
// Set the default value for the file name of the grid
template<class TypeTag>
struct GridFile<TypeTag, TTag::FractureProblem> { static constexpr auto value = "data/fracture.art.dgf"; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -176,6 +172,11 @@ struct EndTime<TypeTag, Properties::TTag::FractureProblem>
static constexpr type value = 3e3;
};
// Set the default value for the file name of the grid
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::FractureProblem>
{ static constexpr auto value = "data/fracture.art.dgf"; };
// Set the default value for the initial time step size
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::FractureProblem>

View File

@ -145,10 +145,6 @@ struct PermeabilityLens<TypeTag, TTag::GroundWaterBaseProblem>
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::GroundWaterBaseProblem> { static constexpr bool value = true; };
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::GroundWaterBaseProblem> { static constexpr auto value = "./data/groundwater_2d.dgf"; };
// Use the conjugated gradient linear solver with the default preconditioner (i.e.,
// ILU-0) from dune-istl
template<class TypeTag>
@ -170,6 +166,11 @@ struct EndTime<TypeTag, Properties::TTag::GroundWaterBaseProblem>
static constexpr type value = 1;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::GroundWaterBaseProblem>
{ static constexpr auto value = "./data/groundwater_2d.dgf"; };
// The default for the initial time step size of the simulation
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::GroundWaterBaseProblem>

View File

@ -96,11 +96,6 @@ public:
using type = Opm::ThreePhaseParkerVanGenuchten<Traits>;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::InfiltrationBaseProblem>
{ static constexpr auto value = "./data/infiltration_50x3.dgf"; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -113,6 +108,11 @@ struct EndTime<TypeTag, Properties::TTag::InfiltrationBaseProblem>
static constexpr type value = 6e3;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::InfiltrationBaseProblem>
{ static constexpr auto value = "./data/infiltration_50x3.dgf"; };
// The default for the initial time step size of the simulation
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::InfiltrationBaseProblem>

View File

@ -115,10 +115,6 @@ struct SolidEnergyLaw<TypeTag, TTag::ObstacleBaseProblem>
template<class TypeTag>
struct EnableGravity<TypeTag, TTag::ObstacleBaseProblem> { static constexpr bool value = true; };
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::ObstacleBaseProblem> { static constexpr auto value = "./data/obstacle_24x16.dgf"; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -131,6 +127,11 @@ struct EndTime<TypeTag, Properties::TTag::ObstacleBaseProblem>
static constexpr type value = 1e4;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::ObstacleBaseProblem>
{ static constexpr auto value = "./data/obstacle_24x16.dgf"; };
// The default for the initial time step size of the simulation
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::ObstacleBaseProblem>

View File

@ -80,10 +80,6 @@ struct EnableGravity<TypeTag, TTag::OutflowBaseProblem> { static constexpr bool
template<class TypeTag>
struct VtkWriteMassFractions<TypeTag, TTag::OutflowBaseProblem> { static constexpr bool value = true; };
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::OutflowBaseProblem> { static constexpr auto value = "./data/outflow.dgf"; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -96,6 +92,11 @@ struct EndTime<TypeTag, Properties::TTag::OutflowBaseProblem>
static constexpr type value = 100;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::OutflowBaseProblem>
{ static constexpr auto value = "./data/outflow.dgf"; };
// The default for the initial time step size of the simulation
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::OutflowBaseProblem>

View File

@ -149,10 +149,6 @@ public:
using type = Opm::BlackOilFluidSystem<Scalar>;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::ReservoirBaseProblem> { static constexpr auto value = "data/reservoir.dgf"; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -168,6 +164,11 @@ struct EndTime<TypeTag, Properties::TTag::ReservoirBaseProblem>
static constexpr type value = 1000.0*24*60*60;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::ReservoirBaseProblem>
{ static constexpr auto value = "data/reservoir.dgf"; };
// The default for the initial time step size of the simulation [s]
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::ReservoirBaseProblem>

View File

@ -107,10 +107,6 @@ struct EnableGravity<TypeTag, TTag::RichardsLensProblem> { static constexpr bool
template<class TypeTag>
struct NumericDifferenceMethod<TypeTag, TTag::RichardsLensProblem> { static constexpr int value = 0; };
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::RichardsLensProblem> { static constexpr auto value = "./data/richardslens_24x16.dgf"; };
} // namespace Opm::Properties
namespace Opm::Parameters {
@ -123,6 +119,11 @@ struct EndTime<TypeTag, Properties::TTag::RichardsLensProblem>
static constexpr type value = 3000;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::RichardsLensProblem>
{ static constexpr auto value = "./data/richardslens_24x16.dgf"; };
// The default for the initial time step size of the simulation
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::RichardsLensProblem>

View File

@ -123,10 +123,6 @@ struct EnableGravity<TypeTag, TTag::WaterAirBaseProblem> { static constexpr bool
template<class TypeTag>
struct NumericDifferenceMethod<TypeTag, TTag::WaterAirBaseProblem> { static constexpr int value = +1; };
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, TTag::WaterAirBaseProblem> { static constexpr auto value = "./data/waterair.dgf"; };
// Use the restarted GMRES linear solver with the ILU-2 preconditioner from dune-istl
template<class TypeTag>
struct LinearSolverSplice<TypeTag, TTag::WaterAirBaseProblem>
@ -154,6 +150,11 @@ struct EndTime<TypeTag, Properties::TTag::WaterAirBaseProblem>
static constexpr type value = 1.0 * 365 * 24 * 60 * 60;
};
// The default DGF file to load
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::WaterAirBaseProblem>
{ static constexpr auto value = "./data/waterair.dgf"; };
// The default for the initial time step size of the simulation
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::WaterAirBaseProblem>

View File

@ -62,7 +62,7 @@ public:
*/
static void registerParameters()
{
Parameters::registerParam<TypeTag,Properties::GridFile>
Parameters::registerParam<TypeTag, Parameters::GridFile>
("The file name of the DGF file to load");
Parameters::registerParam<TypeTag, Parameters::GridGlobalRefinements>
("The number of global refinements of the grid "
@ -75,7 +75,7 @@ public:
DgfVanguard(Simulator& simulator)
: ParentType(simulator)
{
const std::string dgfFileName = Parameters::get<TypeTag, Properties::GridFile>();
const std::string dgfFileName = Parameters::get<TypeTag, Parameters::GridFile>();
unsigned numRefinments = Parameters::get<TypeTag, Parameters::GridGlobalRefinements>();
{

View File

@ -56,6 +56,10 @@ struct DomainSizeZ { using type = Properties::UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct EndTime { using type = Properties::UndefinedProperty; };
//! name of the grid file
template<class TypeTag, class MyTypeTag>
struct GridFile { using type = Properties::UndefinedProperty; };
//! Property which tells the Vanguard how often the grid should be refined
//! after creation.
template<class TypeTag, class MyTypeTag>

View File

@ -105,10 +105,6 @@ template<class TypeTag, class MyTypeTag>
struct GridPart { using type = UndefinedProperty; };
#endif
//! name of the grid file
template<class TypeTag, class MyTypeTag>
struct GridFile { using type = UndefinedProperty; };
//! level of the grid view
template<class TypeTag, class MyTypeTag>
struct GridViewLevel { using type = UndefinedProperty; };
@ -151,10 +147,6 @@ struct ParameterTree<TypeTag, TTag::NumericModel>
template<class TypeTag>
struct ModelParameterGroup<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
//! Set a value for the GridFile property
template<class TypeTag>
struct GridFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
#if HAVE_DUNE_FEM
template<class TypeTag>
struct GridPart<TypeTag, TTag::NumericModel>
@ -189,6 +181,11 @@ struct EndTime<TypeTag, Properties::TTag::NumericModel>
static constexpr type value = -1e35;
};
//! Set a value for the GridFile property
template<class TypeTag>
struct GridFile<TypeTag, Properties::TTag::NumericModel>
{ static constexpr auto value = ""; };
//! Set the number of refinement levels of the grid to 0. This does not belong
//! here, strictly speaking.
template<class TypeTag>