dune-pdelab  2.7-git
Public Member Functions | Static Public Attributes | List of all members
Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace > Class Template Reference

Turn a matrix-free Jacobi-type local preconditioner to a SOR one. More...

#include <dune/pdelab/backend/istl/matrixfree/blocksorpreconditioner.hh>

Inheritance diagram for Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >:
Inheritance graph

Public Types

Flags selective assembly
enum  { doSkipEntity }
 Whether to do selective assembly on the elements, i.e. whether or not skip_entity() should be called. More...
 
enum  { doSkipIntersection }
 Whether to do selective assembly on the intersections, i.e. whether or not skip_intersection() should be called. More...
 
Flags for the sparsity pattern
enum  { doPatternVolume }
 Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called. More...
 
enum  { doPatternVolumePostSkeleton }
 Whether to assemble the pattern on the elements after the skeleton has been handled, i.e. whether or not pattern_volume_post_skeleton() should be called. More...
 
enum  { doPatternSkeleton }
 Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called. More...
 
enum  { doPatternBoundary }
 Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called. More...
 
Flags for the non-constant part of the residual and the jacobian
enum  { doAlphaVolume }
 Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume(). More...
 
enum  { doAlphaVolumePostSkeleton }
 Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton(). More...
 
enum  { doAlphaSkeleton }
 Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton(). More...
 
enum  { doAlphaBoundary }
 Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary(). More...
 
Flags for the constant part of the residual
enum  { doLambdaVolume }
 Whether to call the local operator's lambda_volume(). More...
 
enum  { doLambdaVolumePostSkeleton }
 Whether to call the local operator's lambda_volume_post_skeleton(). More...
 
enum  { doLambdaSkeleton }
 Whether to call the local operator's lambda_skeleton(). More...
 
enum  { doLambdaBoundary }
 Whether to call the local operator's lambda_boundary(). More...
 
Special flags
enum  { doSkeletonTwoSided }
 Whether to visit the skeleton methods from both sides. More...
 
enum  { isLinear }
 Wheter the local operator describes a linear problem. More...
 

Public Member Functions

 BlockSORPreconditionerLocalOperator (JacobianLOP &jacobianlop, BlockOffDiagonalLOP &blockOffDiagonalLOP, const GridFunctionSpace &gridFunctionSpace, const double omega=1.0)
 
bool requireSetup ()
 
void setRequireSetup (bool v)
 
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void alpha_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const
 Prepare underlying diagonal block preconditioner. More...
 
template<typename IG , typename LFSU , typename X , typename LFSV , typename Y >
void alpha_skeleton (const IG &ig, const LFSU &lfsu_s, const X &x_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const LFSV &lfsv_n, Y &y_s, Y &y_n) const
 Provide this method, but it actually does not nothing. More...
 
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void alpha_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const
 Provide this method, but it actually does nothing. More...
 
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void jacobian_apply_volume (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const
 Linear operator application, volume terms. More...
 
template<typename EG , typename LFSU , typename X , typename Z , typename LFSV , typename Y >
void jacobian_apply_volume (const EG &eg, const LFSU &lfsu, const X &x, const Z &z, const LFSV &lfsv, Y &y) const
 linearized operator application, volume terms More...
 
template<typename IG , typename LFSU , typename Z , typename LFSV , typename Y >
void jacobian_apply_skeleton (const IG &ig, const LFSU &lfsu_s, const Z &z_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const Z &z_n, const LFSV &lfsv_n, Y &y_s, Y &y_n) const
 Gather off-block-diagonals in Gauss-Seidel process of linear operator. More...
 
template<typename IG , typename LFSU , typename X , typename Z , typename LFSV , typename Y >
void jacobian_apply_skeleton (const IG &ig, const LFSU &lfsu_s, const X &x_s, const Z &z_s, const LFSV &lfsv_s, const LFSU &lfsu_n, const X &x_n, const Z &z_n, const LFSV &lfsv_n, Y &y_s, Y &y_n) const
 Gather off-block-diagonals in Gauss-Seidel process of linearized operator. More...
 
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void jacobian_apply_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const LFSV &lfsv, Y &y) const
 Apply preconditioner after skeleton terms, linear version. More...
 
template<typename EG , typename LFSU , typename X , typename Z , typename LFSV , typename Y >
void jacobian_apply_volume_post_skeleton (const EG &eg, const LFSU &lfsu, const X &x, const Z &z, const LFSV &lfsv, Y &y) const
 apply preconditioner after skeleton terms, linearized version More...
 
template<typename LFSU , typename LFSV , typename LocalPattern >
void pattern_volume (const LFSU &lfsu, const LFSV &lfsv, LocalPattern &pattern) const
 

Static Public Attributes

static constexpr bool doPatternVolume = true
 
static constexpr bool doPatternSkeleton = true
 
static constexpr bool doPatternVolumePostSkeleton = true
 
static constexpr bool doAlphaVolume = true
 
static constexpr bool doAlphaSkeleton = true
 
static constexpr bool doAlphaVolumePostSkeleton = true
 
static constexpr bool doSkeletonTwoSided = true
 
static constexpr bool isLinear = JacobianLOP::isLinear
 

Detailed Description

template<typename JacobianLOP, typename BlockOffDiagonalLOP, typename GridFunctionSpace>
class Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >

Turn a matrix-free Jacobi-type local preconditioner to a SOR one.

This preconditioner assumes that we have a discretization that leads to a block structure, e.g. DG methods. It can be used to do a matrix-free block-SOR preconditioner step.

Given a linear system of equations Ax=b, a preconditioner step solves Wv=d for a given vector d and an approximation $W \approx A$.

Using the block decomposition $A=D+L+U$ block-SOR can be implemented in the following way (approximately solving Av=d).

for element T_i, i=1,...,m do: (1) a_i = d_i - \sum_{j<i} A_{ij} v_j^{(k)} - \sum_{j>i} A_{ij} v_j^{(k-1)} (2) Solve D_i b_i = a_i (3) Update v_i^{(k)} = (1-\omega) v_i^{(k-1)} + \omega b_i

Here d_i, a_i, ... denote a local vector from the global block vector and A_{ij} is the block (i,j) of the global block matrix A.

See the artice "Matrix-free multigrid block-preconditioners for higher order discontinuous Galerkin discretisations" by P. Bastian, E. Mueller, S. Muething and M. Piatkowski.

Template Parameters
JacobianLOPType of the Jacobi preconditioner local operator
BlockOffDiagonalLOPType of the local operator for assembling the block off diagonal
GridFunctionSpaceThe type of grid function space.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Whether to do selective assembly on the elements, i.e. whether or not skip_entity() should be called.

Enumerator
doSkipEntity 

◆ anonymous enum

anonymous enum
inherited

Whether to do selective assembly on the intersections, i.e. whether or not skip_intersection() should be called.

Enumerator
doSkipIntersection 

◆ anonymous enum

anonymous enum
inherited

Whether to assemble the pattern on the elements, i.e. whether or not pattern_volume() should be called.

Enumerator
doPatternVolume 

◆ anonymous enum

anonymous enum
inherited

Whether to assemble the pattern on the elements after the skeleton has been handled, i.e. whether or not pattern_volume_post_skeleton() should be called.

Enumerator
doPatternVolumePostSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to assemble the pattern on the interior intersections, i.e. whether or not pattern_skeleton() should be called.

Enumerator
doPatternSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to assemble the pattern on the boundary intersections, i.e. whether or not pattern_boundary() should be called.

Enumerator
doPatternBoundary 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's alpha_volume(), jacobian_apply_volume() and jacobian_volume().

Enumerator
doAlphaVolume 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's alpha_volume_post_skeleton(), jacobian_apply_volume_post_skeleton() and jacobian_volume_post_skeleton().

Enumerator
doAlphaVolumePostSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's alpha_skeleton(), jacobian_apply_skeleton() and jacobian_skeleton().

Enumerator
doAlphaSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's alpha_boundary(), jacobian_apply_boundary() and jacobian_boundary().

Enumerator
doAlphaBoundary 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's lambda_volume().

Enumerator
doLambdaVolume 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's lambda_volume_post_skeleton().

Enumerator
doLambdaVolumePostSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's lambda_skeleton().

Enumerator
doLambdaSkeleton 

◆ anonymous enum

anonymous enum
inherited

Whether to call the local operator's lambda_boundary().

Enumerator
doLambdaBoundary 

◆ anonymous enum

anonymous enum
inherited

Whether to visit the skeleton methods from both sides.

Enumerator
doSkeletonTwoSided 

◆ anonymous enum

anonymous enum
inherited

Wheter the local operator describes a linear problem.

Enumerator
isLinear 

Constructor & Destructor Documentation

◆ BlockSORPreconditionerLocalOperator()

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::BlockSORPreconditionerLocalOperator ( JacobianLOP &  jacobianlop,
BlockOffDiagonalLOP &  blockOffDiagonalLOP,
const GridFunctionSpace gridFunctionSpace,
const double  omega = 1.0 
)
inline

Member Function Documentation

◆ alpha_skeleton()

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename IG , typename LFSU , typename X , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::alpha_skeleton ( const IG &  ig,
const LFSU &  lfsu_s,
const X &  x_s,
const LFSV &  lfsv_s,
const LFSU &  lfsu_n,
const X &  x_n,
const LFSV &  lfsv_n,
Y &  y_s,
Y &  y_n 
) const
inline

Provide this method, but it actually does not nothing.

◆ alpha_volume()

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::alpha_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
Y &  y 
) const
inline

Prepare underlying diagonal block preconditioner.

◆ alpha_volume_post_skeleton()

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::alpha_volume_post_skeleton ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
Y &  y 
) const
inline

Provide this method, but it actually does nothing.

◆ jacobian_apply_skeleton() [1/2]

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename IG , typename LFSU , typename X , typename Z , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::jacobian_apply_skeleton ( const IG &  ig,
const LFSU &  lfsu_s,
const X &  x_s,
const Z &  z_s,
const LFSV &  lfsv_s,
const LFSU &  lfsu_n,
const X &  x_n,
const Z &  z_n,
const LFSV &  lfsv_n,
Y &  y_s,
Y &  y_n 
) const
inline

Gather off-block-diagonals in Gauss-Seidel process of linearized operator.

◆ jacobian_apply_skeleton() [2/2]

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename IG , typename LFSU , typename Z , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::jacobian_apply_skeleton ( const IG &  ig,
const LFSU &  lfsu_s,
const Z &  z_s,
const LFSV &  lfsv_s,
const LFSU &  lfsu_n,
const Z &  z_n,
const LFSV &  lfsv_n,
Y &  y_s,
Y &  y_n 
) const
inline

Gather off-block-diagonals in Gauss-Seidel process of linear operator.

◆ jacobian_apply_volume() [1/2]

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::jacobian_apply_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
Y &  y 
) const
inline

Linear operator application, volume terms.

◆ jacobian_apply_volume() [2/2]

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename EG , typename LFSU , typename X , typename Z , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::jacobian_apply_volume ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const Z &  z,
const LFSV &  lfsv,
Y &  y 
) const
inline

linearized operator application, volume terms

◆ jacobian_apply_volume_post_skeleton() [1/2]

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename EG , typename LFSU , typename X , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::jacobian_apply_volume_post_skeleton ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const LFSV &  lfsv,
Y &  y 
) const
inline

Apply preconditioner after skeleton terms, linear version.

◆ jacobian_apply_volume_post_skeleton() [2/2]

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
template<typename EG , typename LFSU , typename X , typename Z , typename LFSV , typename Y >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::jacobian_apply_volume_post_skeleton ( const EG &  eg,
const LFSU &  lfsu,
const X &  x,
const Z &  z,
const LFSV &  lfsv,
Y &  y 
) const
inline

apply preconditioner after skeleton terms, linearized version

◆ pattern_volume()

template<typename LFSU , typename LFSV , typename LocalPattern >
void Dune::PDELab::FullVolumePattern::pattern_volume ( const LFSU &  lfsu,
const LFSV &  lfsv,
LocalPattern &  pattern 
) const
inlineinherited

◆ requireSetup()

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::requireSetup ( )
inline

We use a Jacobi preconditioner that requires a setup. The setup will be done in the alpha-volume method and later be used during the apply methods.

◆ setRequireSetup()

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
void Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::setRequireSetup ( bool  v)
inline

Member Data Documentation

◆ doAlphaSkeleton

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
constexpr bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::doAlphaSkeleton = true
staticconstexpr

◆ doAlphaVolume

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
constexpr bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::doAlphaVolume = true
staticconstexpr

◆ doAlphaVolumePostSkeleton

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
constexpr bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::doAlphaVolumePostSkeleton = true
staticconstexpr

◆ doPatternSkeleton

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
constexpr bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::doPatternSkeleton = true
staticconstexpr

◆ doPatternVolume

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
constexpr bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::doPatternVolume = true
staticconstexpr

◆ doPatternVolumePostSkeleton

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
constexpr bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::doPatternVolumePostSkeleton = true
staticconstexpr

◆ doSkeletonTwoSided

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
constexpr bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::doSkeletonTwoSided = true
staticconstexpr

◆ isLinear

template<typename JacobianLOP , typename BlockOffDiagonalLOP , typename GridFunctionSpace >
constexpr bool Dune::PDELab::BlockSORPreconditionerLocalOperator< JacobianLOP, BlockOffDiagonalLOP, GridFunctionSpace >::isLinear = JacobianLOP::isLinear
staticconstexpr

The documentation for this class was generated from the following file: