mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 01:07:24 -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
|
||||
struct BlackOilModel { using InheritsFrom = std::tuple<VtkComposition,
|
||||
VtkBlackOilEnergy,
|
||||
VtkDiffusion,
|
||||
VtkBlackOilPolymer,
|
||||
VtkBlackOilSolvent,
|
||||
VtkBlackOil,
|
||||
|
@ -64,8 +64,7 @@ namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
//! The type tag for the isothermal single phase problems
|
||||
struct FlashModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
struct FlashModel { using InheritsFrom = std::tuple<VtkEnergy,
|
||||
VtkComposition,
|
||||
MultiPhaseBaseModel>; };
|
||||
} // namespace TTag
|
||||
|
@ -28,49 +28,23 @@
|
||||
#ifndef 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/Math.hpp>
|
||||
|
||||
#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/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 {
|
||||
|
||||
// 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
|
||||
template<class TypeTag>
|
||||
struct VtkWriteTortuosities<TypeTag, Properties::TTag::VtkDiffusion>
|
||||
{ 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; };
|
||||
struct VtkWriteTortuosities { static constexpr bool value = false; };
|
||||
struct VtkWriteDiffusionCoefficients { static constexpr bool value = false; };
|
||||
struct VtkWriteEffectiveDiffusionCoefficients { static constexpr bool value = false; };
|
||||
|
||||
} // namespace Opm::Parameters
|
||||
|
||||
@ -117,12 +91,12 @@ public:
|
||||
*/
|
||||
static void registerParameters()
|
||||
{
|
||||
Parameters::registerParam<TypeTag, Parameters::VtkWriteTortuosities>
|
||||
Parameters::Register<Parameters::VtkWriteTortuosities>
|
||||
("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 "
|
||||
"the VTK output files");
|
||||
Parameters::registerParam<TypeTag, Parameters::VtkWriteEffectiveDiffusionCoefficients>
|
||||
Parameters::Register<Parameters::VtkWriteEffectiveDiffusionCoefficients>
|
||||
("Include the effective molecular diffusion "
|
||||
"coefficients the medium in the VTK output files");
|
||||
}
|
||||
@ -194,19 +168,19 @@ public:
|
||||
private:
|
||||
static bool tortuosityOutput_()
|
||||
{
|
||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWriteTortuosities>();
|
||||
static bool val = Parameters::Get<Parameters::VtkWriteTortuosities>();
|
||||
return val;
|
||||
}
|
||||
|
||||
static bool diffusionCoefficientOutput_()
|
||||
{
|
||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWriteDiffusionCoefficients>();
|
||||
static bool val = Parameters::Get<Parameters::VtkWriteDiffusionCoefficients>();
|
||||
return val;
|
||||
}
|
||||
|
||||
static bool effectiveDiffusionCoefficientOutput_()
|
||||
{
|
||||
static bool val = Parameters::get<TypeTag, Parameters::VtkWriteEffectiveDiffusionCoefficients>();
|
||||
static bool val = Parameters::Get<Parameters::VtkWriteEffectiveDiffusionCoefficients>();
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -69,8 +69,7 @@ namespace TTag {
|
||||
/*!
|
||||
* \brief Define the type tag for the compositional NCP model.
|
||||
*/
|
||||
struct NcpModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
struct NcpModel { using InheritsFrom = std::tuple<VtkEnergy,
|
||||
VtkComposition,
|
||||
MultiPhaseBaseModel>; };
|
||||
} // namespace TTag
|
||||
|
@ -69,8 +69,7 @@ namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
//! The type tag for the isothermal single phase problems
|
||||
struct FlashModel { using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
struct FlashModel { using InheritsFrom = std::tuple<VtkEnergy,
|
||||
VtkComposition,
|
||||
VtkPTFlash,
|
||||
MultiPhaseBaseModel>; };
|
||||
|
@ -69,8 +69,7 @@ namespace TTag {
|
||||
//! The type tag for the isothermal single phase problems
|
||||
struct PvsModel
|
||||
{
|
||||
using InheritsFrom = std::tuple<VtkDiffusion,
|
||||
VtkEnergy,
|
||||
using InheritsFrom = std::tuple<VtkEnergy,
|
||||
VtkComposition,
|
||||
VtkPhasePresence,
|
||||
MultiPhaseBaseModel>; };
|
||||
|
Loading…
Reference in New Issue
Block a user