[WIP][implicit] implement check for plausible values
Implement a generic version of the checkPlausibility
function for
the ImplicitModel
. Use four vectors of length numEq
which
describe the allowed ranges for the primary variables:
-
MinPlausibleValues
: minimum plausible value of each primary variable -
MaxPlausibleValues
: maximum ... -
MinPlausibleValuesThresholds
: thresholds for the minimum values -
MaxPlausibleValuesThresholds
: ... maximum ...
The vectors can be specified as properties Implicit...
by means of a
macro SET_NUMEQARRAY_PROP
, for example,
SET_NUMEQARRAY_PROP(TwoP, ImplicitMaxPlausibleValues, std::numeric_limits<Scalar>::max(), 1);
Alternatively, they can be specified run-time in the parameter file,
[Implicit]
MaxPlausibleValues = 1e9 1
By default, set the range to [std::numeric_limits<Scalar>::lowest()
,
std::numeric_limits<Scalar>::max()
] in implicit/propertydefaults.hh
.
Set model-specific values for 1p, 1p2c, 2p, 2p2c, 2pdfm, 3p, 3p3c.
Check the plausibility of the result at the end of the complete Newton method instead of after every Newton iteration. This allows unplausible values for not-yet-converged solutions. If one would like to have plausible values after every Newton step, the infrastructure can be used to implement a generic chop of the primary variables in the future.
Create a new class PrintableArray
to store the aforementioned vectors.
This uses a std::array
for storage and offers constexpr
constructors
for an initializer_list
and a single parameter. Moreover, it can be
used together with <<
which is necessary when printing the parameter
list in start.hh
.
Fixes #134 (closed).