Commit b5604a68 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[newton] improve terminology

The terminology for the Newton method is improved according to FS#238.
In particular, what has been referred to as "relative error" is now
termed "maximum relative shift", while "absolute error" has been renamed
to "residual reduction". This is particularly important, if
corresponding parameters or properties are set. See the CHANGELOG for
details.

Reviewed by gruenich.



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14132 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 33f511f2
Differences Between DuMuX 2.6 and DuMuX 2.7
===================================================
* IMPROVEMENTS and ENHANCEMENTS:
- The terminology for the Newton method has been improved according to FS#238.
In particular, what has been referred to as "relative error" is now termed
"maximum relative shift", while "absolute error" has been renamed to
"residual reduction". This is particularly important, if corresponding
parameters or properties are set, see below.
* IMMEDIATE INTERFACE CHANGES not allowing/requiring a deprecation period:
- Before, the "heatCapacity" function in the spatial parameters and volume
variables of the implicit nonisothermal models was a misnomer, since it
returned an effective quantity, namely,
heatCapacity*density*(1 - porosity) in [J/(K m^3)].
Except for mpnc, which resulted in an additional inconsistency.
Corresponding to the decision documented in FS#216, the function has been
renamed to "solidHeatCapacity" and returns always the "true" (non-effective)
heat capacity in [J/(kg K)]. This requires an additional function
......@@ -17,12 +23,34 @@ Differences Between DuMuX 2.6 and DuMuX 2.7
rather than to append is motivated by consistency with components and fluid
systems, where "gas" and "liquid" are always prepended to the corresponding
function names.
Therefore, it might be necessary to adapt your thermal solid parameters in
the spatialparams file such that they offer functions "solidHeatCapacity",
"solidDensity" and "solidThermalConductivity". See
test/implicit/2p2c/injectionspatialparams.hh for an example.
- Due to the change in the Newton terminology (see above), there exist two
backward-compatibility breakages:
. If a model re-implements the function "relativeErrorDof", it has to be
renamed to "relativeShiftAtDof". See dumux/implicit/implicitmodel.hh for
an example.
. If a NewtonController re-implements the function "newtonUpdateRelError",
it has to be renamed to "newtonUpdateShift". See
dumux/nonlinear/newtoncontroller.hh for an example.
* Deprecated PROPERTY and PARAMETER NAMES, to be removed after 2.7: BEWARE: The
compiler will not print any warning if a deprecated property or parameter name
is used. However, a run-time warning should appear in the summary lines after
the corresponding run.
- Corresponding to the improved Newton terminology, the following properties
(prepended with "Newton") and parameters (in the group "Newton") are
renamed:
AbsTolerance -> ResidualReduction
EnableAbsoluteCriterion -> EnableResidualCriterion
RelTolerance -> MaxRelativeShift
EnableRelativeCriterion -> EnableShiftCriterion
SatisfyAbsAndRel -> SatisfyResidualAndShiftCriterion
* Deprecated CLASSES/FILES, to be removed after 2.7:
- CellData2P2Cmultiphysics, replaced by CellData2P2CMultiPhysics
......@@ -33,11 +61,35 @@ Differences Between DuMuX 2.6 and DuMuX 2.7
"solid/fluidThermalConductivity" instead. See also the immediate interface
changes above.
- In dumux/implicit/common/implicitmodel.hh and
dumux/geomechanics/el2p/elp2basemodel.hh:
"relativeErrorDof" -> "relativeShiftAtDof"
- In dumux/nonlinear/newtoncontroller.hh:
"setRelTolerance" -> "setMaxRelativeShift"
"setAbsTolerance" -> "setResidualReduction"
"newtonUpdateRelError" -> "newtonUpdateShift"
- The 1p2c volume variables no longer use the method tortuosity() from
spatial params class, the value is now calculated within the effective
diffusivity model. Thus the method is deprecated in the spacial params
classes FVSpatialParamsOneP and ImplicitSpatialParamsOneP.
* Deprecated protected MEMBER VARIABLES, to be removed after 2.7: BEWARE: Older
compilers will not print any warning if a deprecated protected member variable
is used.
- In dumux/nonlinear/newtoncontroller.hh:
"error_" -> "shift_"
"lastError_" -> "lastShift_"
"tolerance_" -> "shiftTolerance_"
"absoluteError_" -> "reduction_"
"lastAbsoluteError_" -> "lastReduction_"
"initialAbsoluteError_" -> "initialResidual_"
"absoluteTolerance_" -> "reductionTolerance_"
"enableRelativeCriterion_" -> "enableShiftCriterion_"
"enableAbsoluteCriterion_" -> "enableResidualCriterion_"
"satisfyAbsAndRel_" -> "satisfyResidualAndShiftCriterion_"
* DELETED classes/files, property names, constants/enums,
member functions, which have been deprecated in DuMuX 2.6:
Everything listed as deprecated below has been removed.
......
......@@ -405,16 +405,13 @@ public:
{ return localJacobian().localResidual(); }
/*!
* \brief Returns the relative error between two vectors of
* \brief Returns the maximum relative shift between two vectors of
* primary variables.
*
* \param dofIdxGlobal The global index of the control volume's
* associated degree of freedom
* \param priVars1 The first vector of primary variables
* \param priVars2 The second vector of primary variables
*/
Scalar relativeErrorDof(const int dofIdxGlobal,
const PrimaryVariables &priVars1,
Scalar relativeShiftAtDof(const PrimaryVariables &priVars1,
const PrimaryVariables &priVars2)
{
Scalar result = 0.0;
......@@ -427,6 +424,14 @@ public:
return result;
}
Scalar relativeErrorDof(const int dofIdxGlobal,
const PrimaryVariables &priVars1,
const PrimaryVariables &priVars2)
DUNE_DEPRECATED_MSG("use relativeShiftAtDof(priVars1, priVars2) instead")
{
return relativeShiftAtDof(priVars1, priVars2);
}
/*!
* \brief Try to progress the model to the next timestep.
*
......
......@@ -284,8 +284,7 @@ public:
// we need to add the distance the solution was moved for
// this vertex
Scalar dist = model_().relativeErrorDof(i,
currentPriVars,
Scalar dist = model_().relativeShiftAtDof(currentPriVars,
nextPriVars);
delta_[i] += std::abs(dist);
}
......
......@@ -415,16 +415,13 @@ public:
{ return localJacobian().localResidual(); }
/*!
* \brief Returns the relative error between two vectors of
* \brief Returns the maximum relative shift between two vectors of
* primary variables.
*
* \param dofIdxGlobal The global index of the control volume's
* associated degree of freedom
* \param priVars1 The first vector of primary variables
* \param priVars2 The second vector of primary variables
*/
Scalar relativeErrorDof(const int dofIdxGlobal,
const PrimaryVariables &priVars1,
Scalar relativeShiftAtDof(const PrimaryVariables &priVars1,
const PrimaryVariables &priVars2)
{
Scalar result = 0.0;
......@@ -437,6 +434,14 @@ public:
return result;
}
Scalar relativeErrorDof(const int dofIdxGlobal,
const PrimaryVariables &priVars1,
const PrimaryVariables &priVars2)
DUNE_DEPRECATED_MSG("use relativeShiftAtDof(priVars1, priVars2) instead")
{
return relativeShiftAtDof(priVars1, priVars2);
}
/*!
* \brief Try to progress the model to the next timestep.
*
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment