3.2.4.4. Relative Norm Unbalance¶
This command is used to construct a convergence test which uses the norms of the right hand side of the matrix equation, i.e. \(b\) vector in \(Ax=b\), to determine if convergence has been reached. It uses the ratio of the current norm to the first norm, i.e. :math:`frac{sqrt({b_i}^T{b_i})}{sqrt({b_1}^T{b_1})}. What the righthandside of the matrix equation is depends on integrator and constraint handler chosen. Usually, though not always, it is equal to the unbalanced forces in the system. The command to create a RelativeNormUnbalance test is the following:
 test RelativeNormUnbalance $tol $iter <$pFlag> <$nType>
Argument 
Type 
Description 

$tol 
float 
the tolerance criteria used to check for convergence 
$iter 
integer 
the max number of iterations to check before returning failure condition 
$pFlag 
integer 

$nType 
integer 
type of norm (optional: default is 2 (0 = maxnorm 1 = 1norm 2 = 2norm …)) 
Note
The convergence test compares the current norm of the unbalance with the norm of the first step to determine if convergence has been achieved. As a consequence it will always take at least two steps to achieve convergence.
If numerically the solution has a very small unbalance at the first step, this may mean that the test may never indicate success even though the solution had indeed converged to a solution. This is because machine precision and numerical roundoff limit how small the unbalance can become.
Example:
The following examples demonstrate the command to create a RelativeNormUnbalance test which allows 10 iterations till failure with a 2norm in the \(b\) vector, i.e. \(\sqrt(b^T b)\) of 1.0e2.
Tcl Code
test RelativeNormUnbalance 1.0e2 10 2
Python Code
test('RelativeNormUnbalance', 1.0e2, 10, 2)
Code Developed by: fmk