mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 17:24:46 -06:00
move VtkPrimaryVars parameters to TypeTag-free parameter system
This commit is contained in:
parent
185b4d90d5
commit
bd582e8150
@ -36,7 +36,6 @@ namespace Opm::Properties {
|
|||||||
|
|
||||||
namespace TTag {
|
namespace TTag {
|
||||||
struct FvBaseNewtonMethod;
|
struct FvBaseNewtonMethod;
|
||||||
struct VtkPrimaryVars;
|
|
||||||
struct FiniteDifferenceLocalLinearizer;
|
struct FiniteDifferenceLocalLinearizer;
|
||||||
struct ParallelBiCGStabLinearSolver;
|
struct ParallelBiCGStabLinearSolver;
|
||||||
}
|
}
|
||||||
@ -45,7 +44,7 @@ namespace TTag {
|
|||||||
|
|
||||||
//! The type tag for models based on the finite volume schemes
|
//! The type tag for models based on the finite volume schemes
|
||||||
struct FvBaseDiscretization
|
struct FvBaseDiscretization
|
||||||
{ using InheritsFrom = std::tuple<VtkPrimaryVars, FvBaseNewtonMethod, ImplicitModel>; };
|
{ using InheritsFrom = std::tuple<FvBaseNewtonMethod, ImplicitModel>; };
|
||||||
|
|
||||||
} // namespace TTag
|
} // namespace TTag
|
||||||
|
|
||||||
|
@ -35,36 +35,11 @@
|
|||||||
#include <opm/models/utils/parametersystem.hh>
|
#include <opm/models/utils/parametersystem.hh>
|
||||||
#include <opm/models/utils/propertysystem.hh>
|
#include <opm/models/utils/propertysystem.hh>
|
||||||
|
|
||||||
namespace Opm::Properties::TTag {
|
|
||||||
|
|
||||||
// create new type tag for the VTK primary variables output
|
|
||||||
struct VtkPrimaryVars {};
|
|
||||||
|
|
||||||
} // namespace Opm::Properties::TTag
|
|
||||||
|
|
||||||
namespace Opm::Parameters {
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
// create the property tags needed for the primary variables module
|
struct VtkWritePrimaryVars { static constexpr bool value = false; };
|
||||||
template<class TypeTag, class MyTypeTag>
|
struct VtkWriteProcessRank { static constexpr bool value = false; };
|
||||||
struct VtkWritePrimaryVars { using type = Properties::UndefinedProperty; };
|
struct VtkWriteDofIndex { static constexpr bool value = false; };
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
|
||||||
struct VtkWriteProcessRank { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
|
||||||
struct VtkWriteDofIndex { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct VtkWritePrimaryVars<TypeTag, Properties::TTag::VtkPrimaryVars>
|
|
||||||
{ static constexpr bool value = false; };
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct VtkWriteProcessRank<TypeTag, Properties::TTag::VtkPrimaryVars>
|
|
||||||
{ static constexpr bool value = false; };
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct VtkWriteDofIndex<TypeTag, Properties::TTag::VtkPrimaryVars>
|
|
||||||
{ static constexpr bool value = false; };
|
|
||||||
|
|
||||||
} // namespace Opm::Properties
|
} // namespace Opm::Properties
|
||||||
|
|
||||||
@ -102,11 +77,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void registerParameters()
|
static void registerParameters()
|
||||||
{
|
{
|
||||||
Parameters::registerParam<TypeTag, Parameters::VtkWritePrimaryVars>
|
Parameters::Register<Parameters::VtkWritePrimaryVars>
|
||||||
("Include the primary variables into the VTK output files");
|
("Include the primary variables into the VTK output files");
|
||||||
Parameters::registerParam<TypeTag, Parameters::VtkWriteProcessRank>
|
Parameters::Register<Parameters::VtkWriteProcessRank>
|
||||||
("Include the MPI process rank into the VTK output files");
|
("Include the MPI process rank into the VTK output files");
|
||||||
Parameters::registerParam<TypeTag, Parameters::VtkWriteDofIndex>
|
Parameters::Register<Parameters::VtkWriteDofIndex>
|
||||||
("Include the index of the degrees of freedom into the VTK output files");
|
("Include the index of the degrees of freedom into the VTK output files");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,17 +153,17 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool primaryVarsOutput_()
|
static bool primaryVarsOutput_()
|
||||||
{
|
{
|
||||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWritePrimaryVars>();
|
static bool val = Parameters::Get<Parameters::VtkWritePrimaryVars>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
static bool processRankOutput_()
|
static bool processRankOutput_()
|
||||||
{
|
{
|
||||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWriteProcessRank>();
|
static bool val = Parameters::Get<Parameters::VtkWriteProcessRank>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
static bool dofIndexOutput_()
|
static bool dofIndexOutput_()
|
||||||
{
|
{
|
||||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWriteDofIndex>();
|
static bool val = Parameters::Get<Parameters::VtkWriteDofIndex>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user