mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-23 09:46:24 -06:00
Merge pull request #443 from totto82/disableTracer
Add parameter for (dis)enable the tracer model
This commit is contained in:
commit
39571de366
@ -302,6 +302,8 @@ SET_BOOL_PROP(EclBaseProblem, EnableEnergy, false);
|
|||||||
// disable thermal flux boundaries by default
|
// disable thermal flux boundaries by default
|
||||||
SET_BOOL_PROP(EclBaseProblem, EnableThermalFluxBoundaries, false);
|
SET_BOOL_PROP(EclBaseProblem, EnableThermalFluxBoundaries, false);
|
||||||
|
|
||||||
|
SET_BOOL_PROP(EclBaseProblem, EnableTracerModel, false);
|
||||||
|
|
||||||
END_PROPERTIES
|
END_PROPERTIES
|
||||||
|
|
||||||
namespace Ewoms {
|
namespace Ewoms {
|
||||||
@ -400,6 +402,8 @@ 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.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -35,6 +35,11 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
BEGIN_PROPERTIES
|
||||||
|
|
||||||
|
NEW_PROP_TAG(EnableTracerModel);
|
||||||
|
|
||||||
|
END_PROPERTIES
|
||||||
|
|
||||||
namespace Ewoms {
|
namespace Ewoms {
|
||||||
|
|
||||||
@ -75,6 +80,7 @@ public:
|
|||||||
: simulator_(simulator)
|
: simulator_(simulator)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Initialize all internal data structures needed by the tracer module
|
* \brief Initialize all internal data structures needed by the tracer module
|
||||||
*/
|
*/
|
||||||
@ -85,6 +91,13 @@ public:
|
|||||||
if (!deck.hasKeyword("TRACERS"))
|
if (!deck.hasKeyword("TRACERS"))
|
||||||
return; // tracer treatment is supposed to be disabled
|
return; // tracer treatment is supposed to be disabled
|
||||||
|
|
||||||
|
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableTracerModel))
|
||||||
|
{
|
||||||
|
std::cout << "Warning: Tracer model is disabled but the deck contatins the TRACERS keyword \n";
|
||||||
|
std::cout << "The tracer model must be activated by the enable-tracer-model=true "<< std::endl;
|
||||||
|
return; // Tracer transport must be enabled by the user
|
||||||
|
}
|
||||||
|
|
||||||
if (!deck.hasKeyword("TRACER")){
|
if (!deck.hasKeyword("TRACER")){
|
||||||
throw std::runtime_error("the deck does not contain the TRACER keyword");
|
throw std::runtime_error("the deck does not contain the TRACER keyword");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user