Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

NonLinEqSolverUDC Class Reference

user dependent code for nonlinear systems. More...

#include <NonLinEqSolverUDC.h>

List of all members.

Public Methods

 NonLinEqSolverUDC ()
virtual ~NonLinEqSolverUDC ()
virtual void makeAndSolveLinearSystem ()
virtual void makeResidual ()
virtual real normOfResidual (Norm_type norm=L2)
virtual String comment ()
virtual void beforeSolveInContinuationMethod (real lambda, int nouteriter)
virtual void mgMakeAndSolveLinearSystem (SpaceId grid_level, LinEqVector &b, LinEqVector &x)
virtual void makeResidual (SpaceId grid_level, LinEqVector &b, LinEqVector &x, LinEqVector &r)
virtual void evalDiffEq (LinEqVector &u)


Detailed Description

user dependent code for nonlinear systems.

NAME: NonLinEqSolverUDC - user dependent code for nonlinear systems

DESCRIPTION:

The class equips solvers in the "NonLinEqSolver" hierarchy with user dependent code. This user dependent code typically contains the problem dependent information on the nonlinear systems of algebraic equations to be solved. We refer to class "NonLinEqSolver" for documentation of the functions in class "NonLinEqSolverUDC".


Constructor & Destructor Documentation

NonLinEqSolverUDC::NonLinEqSolverUDC ( ) [inline]
 

No initialization is necessary for the base class.

NonLinEqSolverUDC::~NonLinEqSolverUDC ( ) [inline, virtual]
 


Member Function Documentation

void NonLinEqSolverUDC::beforeSolveInContinuationMethod ( real lambda,
int nouteriter ) [virtual]
 

before each "solve" call in the continuation method in "NonLinEqSolver" (the "continuationSolve" function), this function is called. The user must implement a version of it in his problem class. The argument "lambda" reflects the current value of the parameter in the continuation method. This parameter is always in the interval [0,1], where 0 corresponds to an easy problem and 1 corresponds to the desired problem to solve. A set of "lambda" values are given on the "prm(NonLInEqSolver)" menu. In "continuationSolve", "lambda" may take on other values than those in the user given set if divergence occurs. "continutationSolve" will in such cases try a smaller "lambda" value before proceeding. In the "beforeSolveInContinuationMethod" function, the user will normally use the "lambda" value to scale physical parameters in the problem such that the internal variables are initialized before the ordinary nonlinear solver is called. The integer argument to this function reflects the number of iterations in the continuation method, just for reference. The two arguments are also always availble from the "NonLinEqSolverState" object that can be accessed form the "getCurrentState" function in "NonLinEqSolver".

String NonLinEqSolverUDC::comment ( ) [virtual]
 

can be used to give a comment in the output from nonlinear solvers. For example, when solving time dependent PDE's one can let "comment" return the current point of time, or the current equation that is solved (in case of a system of PDE's).

void NonLinEqSolverUDC::evalDiffEq ( LinEqVector & u ) [virtual]
 

void NonLinEqSolverUDC::makeAndSolveLinearSystem ( ) [virtual]
 

solves the linear subproblem in a nonlinear iterative algorithm.

void NonLinEqSolverUDC::makeResidual ( SpaceId grid_level,
LinEqVector & b,
LinEqVector & x,
LinEqVector & r ) [virtual]
 

See documentation of one of the overloaded functions.

void NonLinEqSolverUDC::makeResidual ( ) [virtual]
 

computes the residual of the nonlinear equations, based on the most recently available approximation to the nonlinear solution.

void NonLinEqSolverUDC::mgMakeAndSolveLinearSystem ( SpaceId grid_level,
LinEqVector & b,
LinEqVector & x ) [virtual]
 

is a version of "makeAndSolveLinearSystem" tailored to multilevel methods (multigrid, domain decomposition). The function will not be useful unless the Diffpack Multilevel Toolbox is installed.

real NonLinEqSolverUDC::normOfResidual ( Norm_type norm = L2 ) [virtual]
 

returns the norm of the residual vector. For Newton methods this is usually very easy since the residual is the right hand side of the linear system (in FEM codes using "LinEqAdmFE", one simply returns "lineq.b().norm(norm)"). However, in other solution methods one usually needs to compute the residual. Be aware of the possibility of coding the "normOfResidual" for a Newton method and later choose another solver (both the convergence criterion noumber 2 and the output will be wrong).


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.