mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 17:44:49 -06:00
move VtkDiffusionModule parameters to TypeTag-free parameter system
This commit is contained in:
parent
26114b7e06
commit
f97959c72c
@ -75,7 +75,6 @@ namespace TTag {
|
|||||||
//! The type tag for the black-oil problems
|
//! The type tag for the black-oil problems
|
||||||
struct BlackOilModel { using InheritsFrom = std::tuple<VtkComposition,
|
struct BlackOilModel { using InheritsFrom = std::tuple<VtkComposition,
|
||||||
VtkBlackOilEnergy,
|
VtkBlackOilEnergy,
|
||||||
VtkDiffusion,
|
|
||||||
VtkBlackOilPolymer,
|
VtkBlackOilPolymer,
|
||||||
VtkBlackOilSolvent,
|
VtkBlackOilSolvent,
|
||||||
VtkBlackOil,
|
VtkBlackOil,
|
||||||
|
@ -64,8 +64,7 @@ namespace Opm::Properties {
|
|||||||
|
|
||||||
namespace TTag {
|
namespace TTag {
|
||||||
//! The type tag for the isothermal single phase problems
|
//! The type tag for the isothermal single phase problems
|
||||||
struct FlashModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
struct FlashModel { using InheritsFrom = std::tuple<VtkEnergy,
|
||||||
VtkEnergy,
|
|
||||||
VtkComposition,
|
VtkComposition,
|
||||||
MultiPhaseBaseModel>; };
|
MultiPhaseBaseModel>; };
|
||||||
} // namespace TTag
|
} // namespace TTag
|
||||||
|
@ -28,49 +28,23 @@
|
|||||||
#ifndef EWOMS_VTK_DIFFUSION_MODULE_HH
|
#ifndef EWOMS_VTK_DIFFUSION_MODULE_HH
|
||||||
#define EWOMS_VTK_DIFFUSION_MODULE_HH
|
#define EWOMS_VTK_DIFFUSION_MODULE_HH
|
||||||
|
|
||||||
#include "vtkmultiwriter.hh"
|
|
||||||
#include "baseoutputmodule.hh"
|
|
||||||
|
|
||||||
#include <opm/material/densead/Evaluation.hpp>
|
#include <opm/material/densead/Evaluation.hpp>
|
||||||
#include <opm/material/densead/Math.hpp>
|
#include <opm/material/densead/Math.hpp>
|
||||||
|
|
||||||
#include <opm/models/discretization/common/fvbaseparameters.hh>
|
#include <opm/models/discretization/common/fvbaseparameters.hh>
|
||||||
|
|
||||||
|
#include <opm/models/io/baseoutputmodule.hh>
|
||||||
|
#include <opm/models/io/vtkmultiwriter.hh>
|
||||||
|
|
||||||
#include <opm/models/utils/propertysystem.hh>
|
#include <opm/models/utils/propertysystem.hh>
|
||||||
#include <opm/models/utils/parametersystem.hh>
|
#include <opm/models/utils/parametersystem.hh>
|
||||||
|
|
||||||
namespace Opm::Properties::TTag {
|
|
||||||
|
|
||||||
// create new type tag for the VTK output of the quantities for molecular
|
|
||||||
// diffusion
|
|
||||||
struct VtkDiffusion {};
|
|
||||||
|
|
||||||
} // namespace Opm::Properties::TTag
|
|
||||||
|
|
||||||
namespace Opm::Parameters {
|
namespace Opm::Parameters {
|
||||||
|
|
||||||
// create the property tags needed for the diffusion module
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
|
||||||
struct VtkWriteTortuosities { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
|
||||||
struct VtkWriteDiffusionCoefficients { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
|
||||||
struct VtkWriteEffectiveDiffusionCoefficients { using type = Properties::UndefinedProperty; };
|
|
||||||
|
|
||||||
// set default values for what quantities to output
|
// set default values for what quantities to output
|
||||||
template<class TypeTag>
|
struct VtkWriteTortuosities { static constexpr bool value = false; };
|
||||||
struct VtkWriteTortuosities<TypeTag, Properties::TTag::VtkDiffusion>
|
struct VtkWriteDiffusionCoefficients { static constexpr bool value = false; };
|
||||||
{ static constexpr bool value = false; };
|
struct VtkWriteEffectiveDiffusionCoefficients { static constexpr bool value = false; };
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct VtkWriteDiffusionCoefficients<TypeTag, Properties::TTag::VtkDiffusion>
|
|
||||||
{ static constexpr bool value = false; };
|
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct VtkWriteEffectiveDiffusionCoefficients<TypeTag, Properties::TTag::VtkDiffusion>
|
|
||||||
{ static constexpr bool value = false; };
|
|
||||||
|
|
||||||
} // namespace Opm::Parameters
|
} // namespace Opm::Parameters
|
||||||
|
|
||||||
@ -117,12 +91,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void registerParameters()
|
static void registerParameters()
|
||||||
{
|
{
|
||||||
Parameters::registerParam<TypeTag, Parameters::VtkWriteTortuosities>
|
Parameters::Register<Parameters::VtkWriteTortuosities>
|
||||||
("Include the tortuosity for each phase in the VTK output files");
|
("Include the tortuosity for each phase in the VTK output files");
|
||||||
Parameters::registerParam<TypeTag, Parameters::VtkWriteDiffusionCoefficients>
|
Parameters::Register<Parameters::VtkWriteDiffusionCoefficients>
|
||||||
("Include the molecular diffusion coefficients in "
|
("Include the molecular diffusion coefficients in "
|
||||||
"the VTK output files");
|
"the VTK output files");
|
||||||
Parameters::registerParam<TypeTag, Parameters::VtkWriteEffectiveDiffusionCoefficients>
|
Parameters::Register<Parameters::VtkWriteEffectiveDiffusionCoefficients>
|
||||||
("Include the effective molecular diffusion "
|
("Include the effective molecular diffusion "
|
||||||
"coefficients the medium in the VTK output files");
|
"coefficients the medium in the VTK output files");
|
||||||
}
|
}
|
||||||
@ -194,19 +168,19 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool tortuosityOutput_()
|
static bool tortuosityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWriteTortuosities>();
|
static bool val = Parameters::Get<Parameters::VtkWriteTortuosities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool diffusionCoefficientOutput_()
|
static bool diffusionCoefficientOutput_()
|
||||||
{
|
{
|
||||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWriteDiffusionCoefficients>();
|
static bool val = Parameters::Get<Parameters::VtkWriteDiffusionCoefficients>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool effectiveDiffusionCoefficientOutput_()
|
static bool effectiveDiffusionCoefficientOutput_()
|
||||||
{
|
{
|
||||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWriteEffectiveDiffusionCoefficients>();
|
static bool val = Parameters::Get<Parameters::VtkWriteEffectiveDiffusionCoefficients>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,8 +69,7 @@ namespace TTag {
|
|||||||
/*!
|
/*!
|
||||||
* \brief Define the type tag for the compositional NCP model.
|
* \brief Define the type tag for the compositional NCP model.
|
||||||
*/
|
*/
|
||||||
struct NcpModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
struct NcpModel { using InheritsFrom = std::tuple<VtkEnergy,
|
||||||
VtkEnergy,
|
|
||||||
VtkComposition,
|
VtkComposition,
|
||||||
MultiPhaseBaseModel>; };
|
MultiPhaseBaseModel>; };
|
||||||
} // namespace TTag
|
} // namespace TTag
|
||||||
|
@ -69,8 +69,7 @@ namespace Opm::Properties {
|
|||||||
|
|
||||||
namespace TTag {
|
namespace TTag {
|
||||||
//! The type tag for the isothermal single phase problems
|
//! The type tag for the isothermal single phase problems
|
||||||
struct FlashModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
struct FlashModel { using InheritsFrom = std::tuple<VtkEnergy,
|
||||||
VtkEnergy,
|
|
||||||
VtkComposition,
|
VtkComposition,
|
||||||
VtkPTFlash,
|
VtkPTFlash,
|
||||||
MultiPhaseBaseModel>; };
|
MultiPhaseBaseModel>; };
|
||||||
|
@ -69,8 +69,7 @@ namespace TTag {
|
|||||||
//! The type tag for the isothermal single phase problems
|
//! The type tag for the isothermal single phase problems
|
||||||
struct PvsModel
|
struct PvsModel
|
||||||
{
|
{
|
||||||
using InheritsFrom = std::tuple<VtkDiffusion,
|
using InheritsFrom = std::tuple<VtkEnergy,
|
||||||
VtkEnergy,
|
|
||||||
VtkComposition,
|
VtkComposition,
|
||||||
VtkPhasePresence,
|
VtkPhasePresence,
|
||||||
MultiPhaseBaseModel>; };
|
MultiPhaseBaseModel>; };
|
||||||
|
Loading…
Reference in New Issue
Block a user