mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3717 from joakim-hove/enable-tracer
Suggestion: Remove enable switch for tracer support
This commit is contained in:
@@ -149,7 +149,7 @@ name(int tracerIdx) const
|
|||||||
|
|
||||||
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
template<class Grid,class GridView, class DofMapper, class Stencil, class Scalar>
|
||||||
void EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
void EclGenericTracerModel<Grid,GridView,DofMapper,Stencil,Scalar>::
|
||||||
doInit(bool enabled, bool rst, size_t numGridDof,
|
doInit(bool rst, size_t numGridDof,
|
||||||
size_t gasPhaseIdx, size_t oilPhaseIdx, size_t waterPhaseIdx)
|
size_t gasPhaseIdx, size_t oilPhaseIdx, size_t waterPhaseIdx)
|
||||||
{
|
{
|
||||||
const auto& tracers = eclState_.tracer();
|
const auto& tracers = eclState_.tracer();
|
||||||
@@ -157,16 +157,6 @@ doInit(bool enabled, bool rst, size_t numGridDof,
|
|||||||
if (tracers.size() == 0)
|
if (tracers.size() == 0)
|
||||||
return; // tracer treatment is supposed to be disabled
|
return; // tracer treatment is supposed to be disabled
|
||||||
|
|
||||||
if (!enabled) {
|
|
||||||
if (gridView_.comm().rank() == 0) {
|
|
||||||
OpmLog::warning("Keyword TRACERS has only experimental support, and is hence ignored.\n"
|
|
||||||
"The experimental tracer model can still be used, but must be set explicitly.\n"
|
|
||||||
"To use tracers, set the command line option: --enable-tracer-model=true"
|
|
||||||
"\n");
|
|
||||||
}
|
|
||||||
return; // Tracer transport must be enabled by the user
|
|
||||||
}
|
|
||||||
|
|
||||||
// retrieve the number of tracers from the deck
|
// retrieve the number of tracers from the deck
|
||||||
const size_t numTracers = tracers.size();
|
const size_t numTracers = tracers.size();
|
||||||
tracerConcentration_.resize(numTracers);
|
tracerConcentration_.resize(numTracers);
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ protected:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Initialize all internal data structures needed by the tracer module
|
* \brief Initialize all internal data structures needed by the tracer module
|
||||||
*/
|
*/
|
||||||
void doInit(bool enabled,
|
void doInit(bool rst,
|
||||||
bool rst,
|
|
||||||
size_t numGridDof,
|
size_t numGridDof,
|
||||||
size_t gasPhaseIdx,
|
size_t gasPhaseIdx,
|
||||||
size_t oilPhaseIdx,
|
size_t oilPhaseIdx,
|
||||||
|
|||||||
@@ -551,11 +551,6 @@ struct EnableThermalFluxBoundaries<TypeTag, TTag::EclBaseProblem> {
|
|||||||
static constexpr bool value = false;
|
static constexpr bool value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class TypeTag>
|
|
||||||
struct EnableTracerModel<TypeTag, TTag::EclBaseProblem> {
|
|
||||||
static constexpr bool value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
// By default, simulators derived from the EclBaseProblem are production simulators,
|
// By default, simulators derived from the EclBaseProblem are production simulators,
|
||||||
// i.e., experimental features must be explicitly enabled at compile time
|
// i.e., experimental features must be explicitly enabled at compile time
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
@@ -702,8 +697,6 @@ public:
|
|||||||
"Tell the output writer to use double precision. Useful for 'perfect' restarts");
|
"Tell the output writer to use double precision. Useful for 'perfect' restarts");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, unsigned, RestartWritingInterval,
|
EWOMS_REGISTER_PARAM(TypeTag, unsigned, RestartWritingInterval,
|
||||||
"The frequencies of which time steps are serialized to disk");
|
"The frequencies of which time steps are serialized to disk");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableTracerModel,
|
|
||||||
"Transport tracers found in the deck.");
|
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableDriftCompensation,
|
EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableDriftCompensation,
|
||||||
"Enable partial compensation of systematic mass losses via the source term of the next time step");
|
"Enable partial compensation of systematic mass losses via the source term of the next time step");
|
||||||
if constexpr (enableExperiments)
|
if constexpr (enableExperiments)
|
||||||
|
|||||||
@@ -120,8 +120,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void init(bool rst)
|
void init(bool rst)
|
||||||
{
|
{
|
||||||
bool enabled = EWOMS_GET_PARAM(TypeTag, bool, EnableTracerModel);
|
this->doInit(rst, simulator_.model().numGridDof(),
|
||||||
this->doInit(enabled, rst, simulator_.model().numGridDof(),
|
|
||||||
gasPhaseIdx, oilPhaseIdx, waterPhaseIdx);
|
gasPhaseIdx, oilPhaseIdx, waterPhaseIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user