Dual time convergence assessment: norm calculation
As of now (Sep. 12), the ConvergenceMeasure
expression checks the maximum of what comes out of the FieldNorm
expression, iterating over each variable. The norm currently uses RES/VALUE. We should improve this in the following ways.
-
Swap the naming of Norm and Measure. If we add the L2 or L1 norms, as it is now these new norms would go in as new measures! (VALUE_NEW - VALUE_OLD)/VALUE_NEW is the measure; max, min, sum, etc. are the norm. -
Add new convergence measure: the relative delta, (VALUE_NEW - VALUE_OLD)/VALUE_NEW. -
Remove the current RES/VALUE convergence measure. I dislike this measure because it is computed as either RES_OLD/VALUE_NEW or RES_OLD/VALUE_OLD, which aren't in sync with the current iterate. We could restructure to do the next execute_tree() before computing the current measure to get RES_NEW/VALUE_NEW, but this wastes an execute_tree() on the iteration where we converge and can't use the last execute_tree(). -
Implement three vector norms: L1 (sum of absolute values), L2 (square of sum of squares), and Linfty (maximum absolute value). -
Allow for VALUE = zero by adding a small increment (e.g. 1e-8) to the denominator. Look at std::numeric_limits for information. -
Specify a list of variables for which convergence is measured (ignoring all other variables).