Diffpack Documentation

(Functionality not available, requires installation of an additional Diffpack Toolbox)


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

NonLinMGtools Class Reference

#include <NonLinMGtools.h>

Inheritance diagram for NonLinMGtools::

MLSolverUDC HandleId List of all members.

Public Methods

 NonLinMGtools ()
 NonLinMGtools (NonLinEqSolverUDC &udc_, const char *description_="NonLinMGtools")
 NonLinMGtools (NonLinEqSolverUDC &udc_, GridCollector &gridcoll_, const char *descrition_="NonLinMGtools")
 NonLinMGtools (NonLinEqSolverUDC &udc_, FieldCollector &fieldcoll_, const char *description="NonLinMGtools")
virtual ~NonLinMGtools ()
void attach (Proj &proj, int space)
void attach (DegFreeFE &dof_, int space)
void attach (MLSolver_prm &dd_prm)
void attachFEM (FEM &fem_)
void attachNonLinEqSolverUDC (NonLinEqSolverUDC &udc_)
void attachNonLinMLSolution (LinEqVector &lv)
MLSolvergetMLSolver ()
ProjgetProj (int i)
DegFreeFEgetDof (int i)
GridFEgetGrid (int i)
MLSolver_prmgetMLSolver_prm ()
LinEqAdmFEgetLinEqAdmFE (int i)
NonLinEqSolvergetNonLinMLSolver ()
NonLinEqSolvergetNonLinEqSolver (int i)
int getCurrentGridLevel ()
LinEqVectorgetNonLinSolution ()
LinEqVectorgetNonLinSmootherSolution (int i)
LinEqVectorgetLinSmootherSolution (int i)
LinEqVectorgetLinRhs (int i)
FieldFEgetField (int i)
void init ()
void initStructure ()
void initFieldCollector (MenuSystem &menu)
virtual SpaceId getNoOfSpaces () const
virtual bool solveSubSystem (LinEqVector &b, LinEqVector &x, SpaceId space, StartVectorMode start, MLSolverMode mode=SUBSPACE)
virtual void residual (LinEqVector &b, LinEqVector &x, LinEqVector &r, SpaceId space)
virtual bool transfer (const LinEqVector &fv, SpaceId fi, LinEqVector &tv, SpaceId ti, bool add_to_t=false, MLTransferMode=TRANSFER)
virtual void matVec (const LinEqVector &f, LinEqVector &x, SpaceId space)
virtual int getWorkTransfer (SpaceId fi, SpaceId ti, const PrecondWork work_tp) const
virtual real getStorageTransfer (SpaceId fi, SpaceId ti) const
virtual int getWorkSolve (SpaceId space, const PrecondWork work_tp) const
virtual real getStorageSolve (SpaceId space) const
virtual String comment ()
virtual void print (Os os, int level=1)
virtual void scan (MenuSystem &menu)
void define (MenuSystem &menu, int level=MAIN)
bool ok (int level=1)

Static Public Methods

void defineStatic (MenuSystem &menu, int level=MAIN)
void setGridTypeStatic (GRIDTYPE grid_type_)
void useFieldCollector (bool use_field_collector_, int no_fields_on_each_grid_)

Public Attributes

Handle(GridCollectorgridcoll
Handle(FieldCollectorfieldcoll
VecSimplest(Handle(FieldFE)) field

Protected Attributes

NonLinEqSolverUDCudc
FEMfem
int no_of_grids
String description
int current_grid_level
int ndpn
bool structure_inited
bool use_lineq_mat
bool coarsesolver
int pre_smooth
int post_smooth
VecSimplest(Handle(Proj)) proj
VecSimplest(Handle(DegFreeFE)) dof
VecSimplest(Handle(NonLinEqSolver_prm)) nlsolver_prm
VecSimplest(Handle(NonLinEqSolver)) nlsolver
VecSimplest(Handle(LinEqAdmFE)) lineq
VecSimplest(Handle(LinEqVector)) nonlin_solution
VecSimplest(Handle(LinEqVector)) linear_solution
VecSimplest(Handle(LinEqVector)) linear_rhs
Handle(NonLinEqSolvermlnlsolver
Handle(NonLinEqSolver_prmmlnlsolver_prm
Handle(LinEqVectorddnonlin_solution
Handle(LinEqVectorddlinear_solution
Handle(MLSolvermlsolver
Handle(MLSolver_prmmlsolver_prm
Handle(Proj_prmproj_prm

Static Protected Attributes

bool usefieldcollector

Constructor & Destructor Documentation

NonLinMGtools::NonLinMGtools ( ) [inline]
 

NonLinMGtools::NonLinMGtools ( NonLinEqSolverUDC & udc_,
const char * description_ = "NonLinMGtools" )
 

NonLinMGtools::NonLinMGtools ( NonLinEqSolverUDC & udc_,
GridCollector & gridcoll_,
const char * descrition_ = "NonLinMGtools" )
 

NonLinMGtools::NonLinMGtools ( NonLinEqSolverUDC & udc_,
FieldCollector & fieldcoll_,
const char * description = "NonLinMGtools" )
 

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


Member Function Documentation

void NonLinMGtools::attach ( MLSolver_prm & dd_prm )
 

void NonLinMGtools::attach ( DegFreeFE & dof_,
int space )
 

void NonLinMGtools::attach ( Proj & proj,
int space )
 

void NonLinMGtools::attachFEM ( FEM & fem_ ) [inline]
 

void NonLinMGtools::attachNonLinEqSolverUDC ( NonLinEqSolverUDC & udc_ ) [inline]
 

void NonLinMGtools::attachNonLinMLSolution ( LinEqVector & lv )
 

String NonLinMGtools::comment ( ) [virtual]
 

Reimplemented from MLSolverUDC.

void NonLinMGtools::define ( MenuSystem & menu,
int level = MAIN )
 

void NonLinMGtools::defineStatic ( MenuSystem & menu,
int level = MAIN ) [static]
 

int NonLinMGtools::getCurrentGridLevel ( ) [inline]
 

DegFreeFE & NonLinMGtools::getDof ( int i ) [inline]
 

FieldFE & NonLinMGtools::getField ( int i ) [inline]
 

GridFE & NonLinMGtools::getGrid ( int i ) [inline]
 

LinEqAdmFE & NonLinMGtools::getLinEqAdmFE ( int i ) [inline]
 

LinEqVector & NonLinMGtools::getLinRhs ( int i ) [inline]
 

LinEqVector & NonLinMGtools::getLinSmootherSolution ( int i ) [inline]
 

MLSolver & NonLinMGtools::getMLSolver ( ) [inline]
 

MLSolver_prm & NonLinMGtools::getMLSolver_prm ( )
 

SpaceId NonLinMGtools::getNoOfSpaces ( ) const [virtual]
 

should return the number of different spaces and sub-spaces involved. For multigrid this is the number of grids. For domain decomposition methods this is the number of all sub-domains plus one for the global domain plus the number of coarse spaces involved (if there are some). The spaces are identified by numbers form 1 to "getNoOfSpaces". This Id is of type "SpaceId".

Reimplemented from MLSolverUDC.

NonLinEqSolver & NonLinMGtools::getNonLinEqSolver ( int i ) [inline]
 

NonLinEqSolver & NonLinMGtools::getNonLinMLSolver ( ) [inline]
 

LinEqVector & NonLinMGtools::getNonLinSmootherSolution ( int i ) [inline]
 

LinEqVector & NonLinMGtools::getNonLinSolution ( ) [inline]
 

Proj & NonLinMGtools::getProj ( int i ) [inline]
 

real NonLinMGtools::getStorageSolve ( SpaceId space ) const [virtual]
 

Reimplemented from MLSolverUDC.

real NonLinMGtools::getStorageTransfer ( SpaceId fi,
SpaceId ti ) const [virtual]
 

Reimplemented from MLSolverUDC.

int NonLinMGtools::getWorkSolve ( SpaceId space,
const PrecondWork work_tp ) const [virtual]
 

Reimplemented from MLSolverUDC.

int NonLinMGtools::getWorkTransfer ( SpaceId fi,
SpaceId ti,
const PrecondWork work_tp ) const [virtual]
 

Reimplemented from MLSolverUDC.

void NonLinMGtools::init ( )
 

void NonLinMGtools::initFieldCollector ( MenuSystem & menu )
 

void NonLinMGtools::initStructure ( )
 

void NonLinMGtools::matVec ( const LinEqVector & f,
LinEqVector & x,
SpaceId space ) [virtual]
 

Reimplemented from MLSolverUDC.

bool NonLinMGtools::ok ( int level = 1 ) [virtual]
 

Reimplemented from MLSolverUDC.

void NonLinMGtools::print ( Os os,
int level = 1 ) [virtual]
 

void NonLinMGtools::residual ( LinEqVector & b,
LinEqVector & x,
LinEqVector & r,
SpaceId space ) [virtual]
 

compute the residual. Can be implemented by "LinEqAdmFE" or "LinEqSystem". See also "solveSubSystem".

Reimplemented from MLSolverUDC.

void NonLinMGtools::scan ( MenuSystem & menu ) [virtual]
 

void NonLinMGtools::setGridTypeStatic ( GRIDTYPE grid_type_ ) [static]
 

bool NonLinMGtools::solveSubSystem ( LinEqVector & b,
LinEqVector & x,
SpaceId space,
StartVectorMode start,
MLSolverMode mode = SUBSPACE ) [virtual]
 

(approximate) solution of the subspace problem, set up the linear or nonlinear system of equations and solve it. Can be implemented using "LinEqAdmFE", "LinEqSystem" or "NonLinEqSolver". The system may has been assembled previously or may be assembled now (less efficient). This function is called several times for each space with different right hand sides. Note: For domain decomposition methods also boundary conditions may change for each call.

Take care of the "StartVectorMode" flag in the case of iterative solvers. Direct solvers can also be used. Direct solvers are not appropriate for every space, but only for small sub-spaces. The "MLSolverMode" flag indicates, whether the solver is called in the forward loop or in the backward loop. In the multigrid context the names pre-smoothing and post-smoothing are common. Some "MLSolver" algorithms only use the default forward loop (e.g. the additive versions) and the flag can be ignored. If both loops are present and the total algorithm should be symmetric, the sub-domain solvers in the forward loop or in the backward loop have to be adjoint. If you want to implement different forward (pre) and backward (post) solvers, use the flag to branch.

The return value indicates, whether the solution was actually computed and the solution is valid. For a multigrid without pre-smoother for example, a call of the pre-smoother would just return "false" without touching the solution vector.

Reimplemented from MLSolverUDC.

bool NonLinMGtools::transfer ( const LinEqVector & fv,
SpaceId fi,
LinEqVector & tv,
SpaceId ti,
bool add_to_t = false,
MLTransferMode = TRANSFER ) [virtual]
 

usually a projection of a vector from one space to another space. Can be implemented by class "Proj" or inherited classes. Arguments are the identifiers of source and destination spaces and a flag indicating, whether the result should be written or added. This flag can be passed to the "apply" function of "Proj". Often the transfer i to j is adjoint to the transfer j to i. It is then useful to set up only one "Proj" from i to j and to use the "TRANSPOSED" flag for the adjoint transfer from j to i. Note: For multigrid "Proj" has to be set up from coarse to fine, not reverse.

The return value indicates, whether a transfer was actually formed. For a domain decomposition algorithm and a transfer between non intersecting domains a value "false" may be returned. In combination with the flag for adding the solution, the destination vector would not be touched. This can enable the "MLSolver" algorithm to discard further calls of this transfer operator (not implemented now).

Reimplemented from MLSolverUDC.

void NonLinMGtools::useFieldCollector ( bool use_field_collector_,
int no_fields_on_each_grid_ ) [static]
 


Member Data Documentation

bool NonLinMGtools::coarsesolver [protected]
 

int NonLinMGtools::current_grid_level [protected]
 

Handle(LinEqVector) NonLinMGtools::ddlinear_solution [protected]
 

Handle(LinEqVector) NonLinMGtools::ddnonlin_solution [protected]
 

String NonLinMGtools::description [protected]
 

VecSimplest(Handle(DegFreeFE)) NonLinMGtools::dof [protected]
 

FEM * NonLinMGtools::fem [protected]
 

VecSimplest(Handle(FieldFE)) NonLinMGtools::field
 

Handle(FieldCollector) NonLinMGtools::fieldcoll
 

Handle(GridCollector) NonLinMGtools::gridcoll
 

VecSimplest(Handle(LinEqVector)) NonLinMGtools::linear_rhs [protected]
 

VecSimplest(Handle(LinEqVector)) NonLinMGtools::linear_solution [protected]
 

VecSimplest(Handle(LinEqAdmFE)) NonLinMGtools::lineq [protected]
 

Handle(NonLinEqSolver) NonLinMGtools::mlnlsolver [protected]
 

Handle(NonLinEqSolver_prm) NonLinMGtools::mlnlsolver_prm [protected]
 

Handle(MLSolver) NonLinMGtools::mlsolver [protected]
 

Handle(MLSolver_prm) NonLinMGtools::mlsolver_prm [protected]
 

int NonLinMGtools::ndpn [protected]
 

VecSimplest(Handle(NonLinEqSolver)) NonLinMGtools::nlsolver [protected]
 

VecSimplest(Handle(NonLinEqSolver_prm)) NonLinMGtools::nlsolver_prm [protected]
 

int NonLinMGtools::no_of_grids [protected]
 

VecSimplest(Handle(LinEqVector)) NonLinMGtools::nonlin_solution [protected]
 

int NonLinMGtools::post_smooth [protected]
 

int NonLinMGtools::pre_smooth [protected]
 

VecSimplest(Handle(Proj)) NonLinMGtools::proj [protected]
 

Handle(Proj_prm) NonLinMGtools::proj_prm [protected]
 

bool NonLinMGtools::structure_inited [protected]
 

NonLinEqSolverUDC * NonLinMGtools::udc [protected]
 

bool NonLinMGtools::use_lineq_mat [protected]
 

bool NonLinMGtools::usefieldcollector [static, protected]
 


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