DistribGS< T > Class Template Reference

The distributive Gauss-Seidel method base class template. More...

#include <DistribGS.hpp>

Inheritance diagram for DistribGS< T >:

Inheritance graph
[legend]
Collaboration diagram for DistribGS< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void PrintParam ()
 Prints the name and the parameters of the preconditioner.
void PreProcess (SysPrecondCtxt &context, SysMatrix< T > &A)
 Save the reference to the system matrix, computes the diagonal coefficients and preprocesses the Q-preconditioners.
void Run (SysPrecondCtxt &context, GridVec< T > &r, GridVec< T > &c)
 Inverts the preconditioner's matrix.
void PostProcess (SysPrecondCtxt &context)
 Releases the memory, postprocesses the preconditioners.
 DistribGS (unsigned the_disp_type, LinPrecond< T > &the_sub_precond, T the_p_damp=1, bool do_scale=true)
 Constructor which sets the display type.

Detailed Description

template<typename T>
class DistribGS< T >

The distributive Gauss-Seidel method base class template.

Q G
G^T 0

(typically arrising in the staggered-grids discretization of Navier-Stokes equations). The lower right block must be zero.

The distributor is

I G
0 - G^T G

and the preconditioner -

P 0
G R

where $P$ is preconditioner for $Q$ and $R$ is the diagonal part of $G^{T} G$ multiplied by a damping factor.

The templates depend on a type T. This type should satisfy the conditions listed in small_matrix.hpp for small matrices.

Date:
Jan. 21, 2005 - created


Constructor & Destructor Documentation

template<typename T>
DistribGS< T >::DistribGS ( unsigned  the_disp_type,
LinPrecond< T > &  the_sub_precond,
the_p_damp = 1,
bool  do_scale = true 
) [inline]

Constructor which sets the display type.

Parameters:
[in] the_disp_type The display type
[in] the_sub_precond Preconditioner for the diagonal blocks
[in] the_p_damp The damping factor for R
[in] do_scale Whether or not to scale the distributor


Member Function Documentation

template<typename T>
void DistribGS< T >::PrintParam (  )  [inline, virtual]

Prints the name and the parameters of the preconditioner.

Implements SysPrecond< T >.

template<typename T>
void DistribGS< T >::PreProcess ( SysPrecondCtxt context,
SysMatrix< T > &  A 
) [inline, virtual]

Save the reference to the system matrix, computes the diagonal coefficients and preprocesses the Q-preconditioners.

Parameters:
[in] context The context to initialize, context[0]: sys_A, context[1]: pointer to 'context'
[in] A The system matrix

Implements SysPrecond< T >.

template<typename T>
void DistribGS< T >::Run ( SysPrecondCtxt context,
GridVec< T > &  r,
GridVec< T > &  c 
) [inline, virtual]

Inverts the preconditioner's matrix.

Parameters:
[in] context The context for the preconditioner
[in] r The residual
[in] c The correction

Implements SysPrecond< T >.

template<typename T>
void DistribGS< T >::PostProcess ( SysPrecondCtxt context  )  [inline, virtual]

Releases the memory, postprocesses the preconditioners.

Parameters:
[in] context The context to release

Implements SysPrecond< T >.


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 12:34:10 2007 for SG2 by  doxygen 1.5.2