mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add parameter to also write the "mini steps" instead of just the "report steps"
This commit is contained in:
parent
6f09c94d60
commit
7d7aa7385e
@ -66,6 +66,10 @@ NEW_TYPE_TAG(EclBaseProblem, INHERITS_FROM(EclGridManager));
|
|||||||
// The temperature inside the reservoir
|
// The temperature inside the reservoir
|
||||||
NEW_PROP_TAG(Temperature);
|
NEW_PROP_TAG(Temperature);
|
||||||
|
|
||||||
|
// Write all solutions for visualization, not just the ones for the
|
||||||
|
// report steps...
|
||||||
|
NEW_PROP_TAG(EnableWriteAllSolutions);
|
||||||
|
|
||||||
// Set the problem property
|
// Set the problem property
|
||||||
SET_TYPE_PROP(EclBaseProblem, Problem, Ewoms::EclProblem<TypeTag>);
|
SET_TYPE_PROP(EclBaseProblem, Problem, Ewoms::EclProblem<TypeTag>);
|
||||||
|
|
||||||
@ -108,6 +112,9 @@ SET_BOOL_PROP(EclBaseProblem, EnableLinearizationRecycling, true);
|
|||||||
// Re-assemble the linearization only for the cells which have changed?
|
// Re-assemble the linearization only for the cells which have changed?
|
||||||
SET_BOOL_PROP(EclBaseProblem, EnablePartialRelinearization, true);
|
SET_BOOL_PROP(EclBaseProblem, EnablePartialRelinearization, true);
|
||||||
|
|
||||||
|
// only write the solutions for the report steps to disk
|
||||||
|
SET_BOOL_PROP(EclBaseProblem, EnableWriteAllSolutions, false);
|
||||||
|
|
||||||
// set the defaults for some problem specific properties
|
// set the defaults for some problem specific properties
|
||||||
SET_SCALAR_PROP(EclBaseProblem, Temperature, 293.15);
|
SET_SCALAR_PROP(EclBaseProblem, Temperature, 293.15);
|
||||||
|
|
||||||
@ -189,6 +196,8 @@ public:
|
|||||||
|
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature,
|
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature,
|
||||||
"The temperature [K] in the reservoir");
|
"The temperature [K] in the reservoir");
|
||||||
|
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableWriteAllSolutions,
|
||||||
|
"Write all solutions to disk instead of only the ones for the report steps");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -221,6 +230,12 @@ public:
|
|||||||
// we want the episode index to be the same as the report step
|
// we want the episode index to be the same as the report step
|
||||||
// index to make things simpler...
|
// index to make things simpler...
|
||||||
simulator.setEpisodeIndex(0);
|
simulator.setEpisodeIndex(0);
|
||||||
|
|
||||||
|
// the user-specified initial time step can be shorter than
|
||||||
|
// the one given in the deck, but it can't be longer.
|
||||||
|
Scalar dt = simulator.timeStepSize();
|
||||||
|
if (dt > simulator.episodeLength())
|
||||||
|
simulator.setTimeStepSize(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -247,6 +262,9 @@ public:
|
|||||||
// always write the initial solution
|
// always write the initial solution
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (EWOMS_GET_PARAM(TypeTag, bool, EnableWriteAllSolutions))
|
||||||
|
return true;
|
||||||
|
|
||||||
return this->simulator().episodeWillBeOver();
|
return this->simulator().episodeWillBeOver();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user