Package esys :: Package escript :: Module pdetools :: Class HomogeneousSaddlePointProblem
[hide private]
[frames] | no frames]

Class HomogeneousSaddlePointProblem

object --+
         |
        HomogeneousSaddlePointProblem
Known Subclasses:

This class provides a framework for solving linear homogeneous saddle point problems of the form:

*Av+B^*p=f*
*Bv     =0*

for the unknowns v and p and given operators A and B and given right hand side f. B^* is the adjoint operator of B. A may depend weakly on v and p.

Instance Methods [hide private]
equal to the type of p
Bv(self, v, tol)
Returns Bv with accuracy tol (overwrite)
 
__Aprod_GMRES(self, p)
 
__Aprod_PCG(self, dp)
 
__Msolve_PCG(self, r)
 
__init__(self, **kwargs)
initializes the saddle point problem
 
__inner_GMRES(self, p0, p1)
 
__inner_PCG(self, p, r)
 
_solve(self, v, p, max_iter=20, verbose=False, usePCG=True, iter_restart=20, max_correction_steps=10)
see _solve method.
float
getAbsoluteTolerance(self)
Returns the absolute tolerance.
 
getDV(self, p, v, tol)
return a correction to the value for a given v and a given p with accuracy tol (overwrite)
float
getTolerance(self)
Returns the relative tolerance.
float
inner_p(self, p0, p1)
Returns inner product of p0 and p1 (overwrite).
float
inner_pBv(self, p, Bv)
Returns inner product of element p and Bv (overwrite).
equal to the type of p
norm_Bv(self, Bv)
Returns the norm of Bv (overwrite).
float
norm_p(self, p)
calculates the norm of p
non-negative float
norm_v(self, v)
Returns the norm of v (overwrite).
 
resetControlParameters(self, K_p=1.0, K_v=1.0, rtol_max=0.01, rtol_min=1e-07, chi_max=0.5, reduction_factor=0.3, theta=0.1)
sets a control parameter
 
setAbsoluteTolerance(self, tolerance=0.0)
Sets the absolute tolerance.
 
setControlParameter(self, K_p=None, K_v=None, rtol_max=None, rtol_min=None, chi_max=None, reduction_factor=None, theta=None)
sets a control parameter
 
setTolerance(self, tolerance=0.0001)
Sets the relative tolerance for (v,p).
tuple of Data objects
solve(self, v, p, max_iter=20, verbose=False, usePCG=True, iter_restart=20, max_correction_steps=10)
Solves the saddle point problem using initial guesses v and p.
 
solve_AinvBt(self, dp, tol)
Solves A dv=B^*dp with accuracy tol
equal to the type of p
solve_prec(self, Bv, tol)
Provides a preconditioner for (BA^{-1}B^ * ) applied to Bv with accuracy tol

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

Bv(self, v, tol)

 
Returns Bv with accuracy tol (overwrite)
Returns: equal to the type of p

Note: boundary conditions on p should be zero!

__init__(self, **kwargs)
(Constructor)

 
initializes the saddle point problem
Overrides: object.__init__

getAbsoluteTolerance(self)

 
Returns the absolute tolerance.
Returns: float
absolute tolerance

getDV(self, p, v, tol)

 
return a correction to the value for a given v and a given p with accuracy tol (overwrite)
Parameters:
  • p - pressure
  • v - pressure
Returns:
dv given as dv= A^{-1} (f-A v-B^*p)

Note: Only A may depend on v and p

getTolerance(self)

 
Returns the relative tolerance.
Returns: float
relative tolerance

inner_p(self, p0, p1)

 
Returns inner product of p0 and p1 (overwrite).
Parameters:
  • p0 - a pressure
  • p1 - a pressure
Returns: float
inner product of p0 and p1

inner_pBv(self, p, Bv)

 
Returns inner product of element p and Bv (overwrite).
Parameters:
  • p - a pressure increment
  • Bv - a residual
Returns: float
inner product of element p and Bv

Note: used if PCG is applied.

norm_Bv(self, Bv)

 
Returns the norm of Bv (overwrite).
Returns: equal to the type of p

Note: boundary conditions on p should be zero!

norm_p(self, p)

 
calculates the norm of p
Parameters:
  • p - a pressure
Returns: float
the norm of p using the inner product for pressure

norm_v(self, v)

 
Returns the norm of v (overwrite).
Parameters:
  • v - a velovity
Returns: non-negative float
norm of v

resetControlParameters(self, K_p=1.0, K_v=1.0, rtol_max=0.01, rtol_min=1e-07, chi_max=0.5, reduction_factor=0.3, theta=0.1)

 
sets a control parameter
Parameters:
  • K_p (float) - initial value for constant to adjust pressure tolerance
  • K_v (float) - initial value for constant to adjust velocity tolerance
  • rtol_max (float) - maximuim relative tolerance used to calculate presssure and velocity increment.
  • chi_max (float) - maximum tolerable converegence rate.
  • reduction_factor (float) - reduction factor for adjustment factors.

setAbsoluteTolerance(self, tolerance=0.0)

 
Sets the absolute tolerance.
Parameters:
  • tolerance (non-negative float) - tolerance to be used

setControlParameter(self, K_p=None, K_v=None, rtol_max=None, rtol_min=None, chi_max=None, reduction_factor=None, theta=None)

 
sets a control parameter
Parameters:
  • K_p (float) - initial value for constant to adjust pressure tolerance
  • K_v (float) - initial value for constant to adjust velocity tolerance
  • rtol_max (float) - maximuim relative tolerance used to calculate presssure and velocity increment.
  • chi_max (float) - maximum tolerable converegence rate.
  • reduction_factor (float)

setTolerance(self, tolerance=0.0001)

 
Sets the relative tolerance for (v,p).
Parameters:
  • tolerance (non-negative float) - tolerance to be used

solve(self, v, p, max_iter=20, verbose=False, usePCG=True, iter_restart=20, max_correction_steps=10)

 
Solves the saddle point problem using initial guesses v and p.
Parameters:
  • v (Data) - initial guess for velocity
  • p (Data) - initial guess for pressure
  • usePCG (bool) - indicates the usage of the PCG rather than GMRES scheme.
  • max_iter (int) - maximum number of iteration steps per correction attempt
  • verbose (bool) - if True, shows information on the progress of the saddlepoint problem solver.
  • iter_restart (int) - restart the iteration after iter_restart steps (only used if useUzaw=False)
Returns: tuple of Data objects

Note: typically this method is overwritten by a subclass. It provides a wrapper for the _solve method.

solve_AinvBt(self, dp, tol)

 
Solves A dv=B^*dp with accuracy tol
Parameters:
  • dp - a pressure increment
Returns:
the solution of A dv=B^*dp

Note: boundary conditions on dv should be zero! A is the operator used in getDV and must not be altered.

solve_prec(self, Bv, tol)

 
Provides a preconditioner for (BA^{-1}B^ * ) applied to Bv with accuracy tol
Returns: equal to the type of p

Note: boundary conditions on p should be zero!