KASKADE 7 development version
Loading...
Searching...
No Matches
Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer > Class Template Reference

A class representing small KKT systems on a single subdomain. More...

#include <bddc.hh>

Public Types

using Scalar = Scalar_
 The scalar field type used in coefficients.
using TransferType = Transfer
using XEntry = Dune::FieldVector<Scalar,components>
using XVector = Dune::BlockVector<XEntry>
using Vector = Dune::BlockVector<Dune::FieldVector<Scalar,1>>
using TransmissionType = typename Transfer::TransmissionType
 A container type used for exchanging coefficients between subdomains.
using AMatrix = NumaBCRSMatrix<Dune::FieldMatrix<Scalar,components,components> >
using SMatrix = DynamicMatrix<Dune::FieldMatrix<Scalar,1,1>>
 A matrix type with scalar entries, used for the Schur complement matrix.

Public Member Functions

std::vector< int > neighbors () const
 Reports a list of its neighbor subdomains.
void updateSolution (Scalar alpha)
 Updates the solution approximation.
void getSolution (XVector &x) const
 Provides the current solution vector \( x \).
XVector getSolution () const
 Provides the current solution vector \( x \).
void set_solver_type (bool cg_solver)
 Set solver type.
void setCgUseOriginalResidual (bool enabled)
void setFlexibleCg (bool enabled)
 Configured by BDDCSolver before the first update; one previous residual.
void updateIteration (int cg_itr)
void getCorrection (XVector &dx) const
 Provides the current correction vector \( dx \).
void getRawCorrection (XVector &dx) const
void getResidual (XVector &rr) const
Vector const & getRestrictedResidual () const
Vector const & diagnosticSearchDirection () const
 Read-only views for optional CG diagnostics, before the solution update.
Vector const & diagnosticPreconditionedResidual () const
Vector const & diagnosticRawCorrection () const
 Snapshot of the local/coarse correction before interface communication.
Vector diagnosticProlongatedCorrection () const
 Current prolongated correction with the solver's inactive-DOF mask.
Vector diagnosticProlongationWeights () const
 Actual transfer averaging weights, including the inactive-interface mask.
Vector diagnosticExactProlongation (Vector const &averaged) const
 Diagnostic-only exact prolongation of the stored raw correction. Given the globally averaged raw interface values in local ordering, reproduce the interior harmonic extension on temporary vectors. This adds a Dirichlet solve; it never publishes a correction, changes feedback, or updates the solver state. Restriction and the coarse solve remain the ACTUAL (possibly quantized) ones. Call after prolongate, before update.
std::vector< bool > getActiveSubdomains ()
void setActiveSubdomains_sub (std::vector< bool > &activeSubdomains_)
Construction.
template<int cComponents>
 Subdomain (int id, AMatrix const &A, Interfaces const &interfaces, NumaBCRSMatrix< Dune::FieldMatrix< Scalar, cComponents, components > > const &C)
 Constructor.
template<class Interface>
 Subdomain (int id, AMatrix const &A, Interface const &interfaces, bool excludeCornersFromCompression=false)
 Constructor.
void imposeDC_inActiveInterface (Vector &Aq, Vector &q)
void imposeDCq (Vector &q)
void setRhs (XVector const &f)
 Provides a (new) right hand side for the linear equation system to be solved.
void resetForNewSystem ()
 Prepares a factorized subdomain for a new solver with the same operator.
void resetForNewRhs ()
 Clears the solution and iteration work vectors for another RHS.
void getInterfaceAveragingWeights (int s, XVector &rho) const
 Reports own interface averaging weights.
void setInterfaceAveragingWeights (int s, XVector const &rho)
 Accumulates interface weights of adjacent subdomains.
Restriction support.

These methods implement the "restriction" of the residual to the "coarse" space.

The restriction is defined as the transpose of the prolongation, i.e. \( \Pi^T = \pi^T E^T \) with averaging \( \pi \) and extension \( E \).

The extension operator \( E^T \) acts locally, realizing the dual harmonic extension

\[\begin{bmatrix} r_i \\ r_D \\ \bar r_D \end{bmatrix}_{\rm new} = \begin{bmatrix} I & \\ H^T & \\ -H^T & I \end{bmatrix} \begin{bmatrix} r_i \\ r_D \end{bmatrix} \]

working on interior residual \( r_i \), interface residual \( r_D \), and averaged interface residual \( \bar r_D \). Here, \( H = A_{ii}^{-1} A_{iD} \) denotes the harmonic extension of interface values into the interior. This local operation is performed by the preRestrict() method.

The averaging (for a single degree of freedom shared by \( k \) subdomains) is

\[ \pi^T = \frac{1}{k} \begin{bmatrix} 1 & \dots & 1 \\ \vdots & \ddots & \vdots \\ 1 & \dots & 1 \end{bmatrix}, \]

therefore symmetric, and acts on the interface residual values \( r_D \) only. It involves communication between subdomains, exchanging their interface residual \( r_D \), which is realized by the getInterfaceResidual() and setInterfaceResidual() methods. Finally, restrict() must be called as a sentinel to denote the end of communication, and to perform the actual averaging.

void preRestrict ()
 First step of the restriction: Dirichlet solve.
void getInterfaceResidualUpdate (int s, TransmissionType &dres) const
 Gets interface residual that shall be shared with neighboring subdomain.
void setInterfaceResidualUpdate (int s, TransmissionType const &dres)
 Sets interface residual of the correction from neighboring subdomains.
Transfer & transfer ()
Transfer const & transfer () const
void restrict ()
 Performs the restriction of the residual vector.
Coarse solve support.

These methods implement the subdomain-local parts of the coarse space solver.

void getS (SMatrix &S) const
 Compute \( S \).
void getSchurResidual (Vector &lambda) const
 Provides the Schur residual.
void setCorrection (Vector const &c)
 Computes the correction vector \( [\delta x, \delta\lambda] \).
Prolongation support.

These methods implement the "prolongation" of "coarse" space corrections to the "fine" space.

The prolongation is defined as \( \Pi = E\pi \) with averaging \( \pi \) and extension \( E \). The averaging (for a single degree of freedom shared by \( k \) subdomains) is

\[ \pi = \frac{1}{k} \begin{bmatrix} 1 & \dots & 1 \\ \vdots & \ddots & \vdots \\ 1 & \dots & 1 \end{bmatrix} \]

and acts on the interface degrees of freedom \( x_D \) only. It involves communication between subdomains, exchanging their interface values \( x_D \), which is realized by the getInterfaceValues() and setInterfaceValues() methods.

The extension operator \( E \) acts locally, realizing the harmonic extension

\[\begin{bmatrix} x_i \\ x_D \end{bmatrix}_{\rm new} = \begin{bmatrix} I & H & - H \\ & & I \end{bmatrix} \begin{bmatrix} x_i \\ x_D \\ \bar x_D \end{bmatrix} \]

working on interior dofs \( x_i \), interface dofs \( x_D \), and averaged interface values \( \bar x_D \). Here, \( H = A_{ii}^{-1} A_{iD} \) denotes the harmonic extension of interface values into the interior. This local operation is performed by the prolongate() method.

void preProlongate ()
 Prepares the exchange of interface values.
void getInterfaceValues (int s, TransmissionType &values) const
 Gets boundary values that shall be shared with neighboring subdomain.
void setInterfaceValues (int s, TransmissionType const &values)
 Sets boundary values of the correction from neighboring subdomains.
void setActiveId (bool active)
Dune::FieldVector< double, 2 > prolongate ()
 Perform averaging on the shared interfaces, projecting the solution to the subspace of functions continuous across the interfaces.
Dune::FieldVector< double, 1 > updateSearchDirectionNorm ()
void updateSearchDirection (double beta)
 Update search direction q for cg solver.

Static Public Attributes

static const int components = m
 Number of (vectorial) components of \( u \).

Detailed Description

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
class Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >

A class representing small KKT systems on a single subdomain.

This is intended to work together with BDDCSolver and KKTSolver, and represents subdomains, providing subdomain-local storage and processing capabilities. This is the basis for distributed domain decomposition solvers.

A Subdomain object represents the system

\[ B = \begin{bmatrix} A & C^T \\ C \end{bmatrix}, \]

and provides in particular access to the "Schur complement"

\[S = \begin{bmatrix} 0 & I \end{bmatrix} \begin{bmatrix} A & C^T \\ C \end{bmatrix}^{-1} \begin{bmatrix} 0 \\ I \end{bmatrix}. \]

Since \( A \) is only positive semidefinite in general, the true Schur complement \( - C A^{-1} C^T \) cannot be formed, but is equal in case of invertible \( A \).

The subdomain holds \( A_i \), \( f_i \), and the constraints block \( C \). It also holds a local solution vector \( u_i \). For the overall picture, we refer to KKTSolver.

Template Parameters
mthe number of vectorial components in \( x \) (usually 1 for scalar systems, and 2 or 3 for vectorial ones)
Scalarthe field type \( K \), usually double
CoarseScalarthe field type \( K_c \) to be used for representing the coarse solver factorization, usually double, but could also be float
Transfera space transfer policy class
Todo
UMFPACK does not provide float factorization. Extract L and U factors and convert to float?

This is a reference implementation.

Definition at line 264 of file bddc.hh.

Member Typedef Documentation

◆ AMatrix

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
using Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::AMatrix = NumaBCRSMatrix<Dune::FieldMatrix<Scalar,components,components> >

Definition at line 288 of file bddc.hh.

◆ Scalar

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
using Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::Scalar = Scalar_

The scalar field type used in coefficients.

Definition at line 275 of file bddc.hh.

◆ SMatrix

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
using Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::SMatrix = DynamicMatrix<Dune::FieldMatrix<Scalar,1,1>>

A matrix type with scalar entries, used for the Schur complement matrix.

Definition at line 291 of file bddc.hh.

◆ TransferType

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
using Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::TransferType = Transfer

Definition at line 276 of file bddc.hh.

◆ TransmissionType

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
using Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::TransmissionType = typename Transfer::TransmissionType

A container type used for exchanging coefficients between subdomains.

Definition at line 285 of file bddc.hh.

◆ Vector

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
using Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::Vector = Dune::BlockVector<Dune::FieldVector<Scalar,1>>

Definition at line 280 of file bddc.hh.

◆ XEntry

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
using Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::XEntry = Dune::FieldVector<Scalar,components>

Definition at line 278 of file bddc.hh.

◆ XVector

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
using Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::XVector = Dune::BlockVector<XEntry>

Definition at line 279 of file bddc.hh.

Constructor & Destructor Documentation

◆ Subdomain() [1/2]

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
template<int cComponents>
Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::Subdomain ( int id,
AMatrix const & A,
Interfaces const & interfaces,
NumaBCRSMatrix< Dune::FieldMatrix< Scalar, cComponents, components > > const & C )

Constructor.

This initializes the solution approximation to zero, which implies an admissible state over all subdomains.

Parameters
idthe subdomain number
Athe subdomain-local stiffness matrix
interfacesa list of pairs (s,ids) of neighboring subdomain number and the degrees of freedom shared with this subdomain (in the given order)
Cthe constraint matrix

◆ Subdomain() [2/2]

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
template<class Interface>
Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::Subdomain ( int id,
AMatrix const & A,
Interface const & interfaces,
bool excludeCornersFromCompression = false )

Constructor.

This initializes the solution approximation to zero, which implies an admissible state over all subdomains.

Parameters
idthe subdomain number
Athe subdomain-local stiffness matrix
interfacesa list of pairs (s,ids) of neighboring subdomain number and the degrees of freedom shared with this subdomain (in the given order)

The BDDC coarse constraints are extracted from the provided interfaces.

Member Function Documentation

◆ diagnosticExactProlongation()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Vector Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::diagnosticExactProlongation ( Vector const & averaged) const

Diagnostic-only exact prolongation of the stored raw correction. Given the globally averaged raw interface values in local ordering, reproduce the interior harmonic extension on temporary vectors. This adds a Dirichlet solve; it never publishes a correction, changes feedback, or updates the solver state. Restriction and the coarse solve remain the ACTUAL (possibly quantized) ones. Call after prolongate, before update.

◆ diagnosticPreconditionedResidual()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Vector const & Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::diagnosticPreconditionedResidual ( ) const
inline

Definition at line 650 of file bddc.hh.

◆ diagnosticProlongatedCorrection()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Vector Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::diagnosticProlongatedCorrection ( ) const
inline

Current prolongated correction with the solver's inactive-DOF mask.

Definition at line 656 of file bddc.hh.

◆ diagnosticProlongationWeights()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Vector Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::diagnosticProlongationWeights ( ) const
inline

Actual transfer averaging weights, including the inactive-interface mask.

Definition at line 664 of file bddc.hh.

◆ diagnosticRawCorrection()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Vector const & Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::diagnosticRawCorrection ( ) const
inline

Snapshot of the local/coarse correction before interface communication.

Definition at line 653 of file bddc.hh.

◆ diagnosticSearchDirection()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Vector const & Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::diagnosticSearchDirection ( ) const
inline

Read-only views for optional CG diagnostics, before the solution update.

Definition at line 649 of file bddc.hh.

◆ getActiveSubdomains()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
std::vector< bool > Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getActiveSubdomains ( )
inline

Definition at line 683 of file bddc.hh.

◆ getCorrection()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getCorrection ( XVector & dx) const

Provides the current correction vector \( dx \).

Parameters
[out]dxon exit, contains the current correction

◆ getInterfaceAveragingWeights()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getInterfaceAveragingWeights ( int s,
XVector & rho ) const
inline

Reports own interface averaging weights.

Parameters
snumber of adjacent subdomain
rhoweights on interface nodes (resized if needed)

Definition at line 368 of file bddc.hh.

◆ getInterfaceResidualUpdate()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getInterfaceResidualUpdate ( int s,
TransmissionType & dres ) const
inline

Gets interface residual that shall be shared with neighboring subdomain.

Parameters
sthe number of the neighboring subdomain
[out]resthe residual vector

Definition at line 441 of file bddc.hh.

◆ getInterfaceValues()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getInterfaceValues ( int s,
TransmissionType & values ) const
inline

Gets boundary values that shall be shared with neighboring subdomain.

Parameters
sthe number of the neighboring subdomain
[out]valuesa vector to be filled with the interface values (will be resized as needed)

Definition at line 559 of file bddc.hh.

◆ getRawCorrection()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getRawCorrection ( XVector & dx) const

◆ getResidual()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getResidual ( XVector & rr) const

◆ getRestrictedResidual()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Vector const & Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getRestrictedResidual ( ) const
inline

Definition at line 646 of file bddc.hh.

◆ getS()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getS ( SMatrix & S) const

Compute \( S \).

This computes

\[S = \begin{bmatrix} 0 & I \end{bmatrix} \begin{bmatrix} A & C^T \\ C \end{bmatrix}^{-1} \begin{bmatrix} 0 \\ I \end{bmatrix} \]

◆ getSchurResidual()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getSchurResidual ( Vector & lambda) const

Provides the Schur residual.

This solves the system

\[ \begin{bmatrix} A & C^T \\ C \end{bmatrix} \begin{bmatrix} x+\delta x \\ \lambda +\delta\lambda \end{bmatrix} = \begin{bmatrix} f\\ 0 \end{bmatrix} \]

and returns the solution component \( \delta\lambda \) in the provided vector lambda. The vectors \( x \) and \( \lambda \) are maintained internally as solution approximation.

Parameters
[out]lambda

◆ getSolution() [1/2]

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
XVector Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getSolution ( ) const

Provides the current solution vector \( x \).

Returns
the current solution approximation

Note that the result is returned by value, which may be less efficient than providing a result vector to be filled.

◆ getSolution() [2/2]

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::getSolution ( XVector & x) const

Provides the current solution vector \( x \).

Parameters
[out]xon exit, contains the current solution approximation

◆ imposeDC_inActiveInterface()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::imposeDC_inActiveInterface ( Vector & Aq,
Vector & q )

◆ imposeDCq()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::imposeDCq ( Vector & q)

◆ neighbors()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
std::vector< int > Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::neighbors ( ) const

Reports a list of its neighbor subdomains.

◆ preProlongate()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::preProlongate ( )
inline

Prepares the exchange of interface values.

Has to be called before getInterfaceValues() or setInterfaceValues().

Definition at line 549 of file bddc.hh.

◆ preRestrict()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::preRestrict ( )

First step of the restriction: Dirichlet solve.

This computes the transpose of the prolongation, i.e., with a suitable sorting of interior and bounday degrees of freedom, the

◆ prolongate()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Dune::FieldVector< double, 2 > Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::prolongate ( )

Perform averaging on the shared interfaces, projecting the solution to the subspace of functions continuous across the interfaces.

Returns
a pair \( (\delta x ^T r, \delta x^T A \delta x) \) for the correction \( \delta x \) and the residual \( r \).

◆ resetForNewRhs()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::resetForNewRhs ( )

Clears the solution and iteration work vectors for another RHS.

Matrix factors, coarse basis, averaging weights and cumulative transfer statistics are retained. Used by BDDCSolver::restartRhs() when its domain and coarse solver remain alive. Published residual updates start from zero.

◆ resetForNewSystem()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::resetForNewSystem ( )

Prepares a factorized subdomain for a new solver with the same operator.

Starts from a zero solution and clears residuals, CG work vectors and transfer history. Matrix factors and interface topology are retained. Call before constructing a new BDDCSolver, which exchanges averaging weights and sets the solver type and iteration counter. Then provide the new RHS with setRhs(). This gives the same initial correction as a newly constructed subdomain. Do not call on a subdomain while its BDDCSolver is still alive.

◆ restrict()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::restrict ( )

Performs the restriction of the residual vector.

◆ set_solver_type()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::set_solver_type ( bool cg_solver)

Set solver type.

◆ setActiveId()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setActiveId ( bool active)
inline

Definition at line 574 of file bddc.hh.

◆ setActiveSubdomains_sub()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setActiveSubdomains_sub ( std::vector< bool > & activeSubdomains_)
inline

Definition at line 688 of file bddc.hh.

◆ setCgUseOriginalResidual()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setCgUseOriginalResidual ( bool enabled)
inline

Experimental CG rho = sum_i r_i^T z_i using the stored local residual. Disabled by default; does not alter transfers or add a global reduction.

Definition at line 625 of file bddc.hh.

◆ setCorrection()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setCorrection ( Vector const & c)

Computes the correction vector \( [\delta x, \delta\lambda] \).

◆ setFlexibleCg()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setFlexibleCg ( bool enabled)
inline

Configured by BDDCSolver before the first update; one previous residual.

Definition at line 627 of file bddc.hh.

◆ setInterfaceAveragingWeights()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setInterfaceAveragingWeights ( int s,
XVector const & rho )
inline

Accumulates interface weights of adjacent subdomains.

Parameters
snumber of adjacent subdomain
rhointerface node weights of neighboring subdomain

Definition at line 378 of file bddc.hh.

◆ setInterfaceResidualUpdate()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setInterfaceResidualUpdate ( int s,
TransmissionType const & dres )
inline

Sets interface residual of the correction from neighboring subdomains.

Parameters
sthe number of the neighboring subdomain

Definition at line 451 of file bddc.hh.

◆ setInterfaceValues()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setInterfaceValues ( int s,
TransmissionType const & values )
inline

Sets boundary values of the correction from neighboring subdomains.

Parameters
sthe number of the neighboring subdomain
[in]valuesa vector containing the provied interface values

Definition at line 569 of file bddc.hh.

◆ setRhs()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::setRhs ( XVector const & f)

Provides a (new) right hand side for the linear equation system to be solved.

Parameters
frhs

◆ transfer() [1/2]

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Transfer & Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::transfer ( )
inline

Definition at line 458 of file bddc.hh.

◆ transfer() [2/2]

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Transfer const & Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::transfer ( ) const
inline

Definition at line 464 of file bddc.hh.

◆ updateIteration()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::updateIteration ( int cg_itr)

◆ updateSearchDirection()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::updateSearchDirection ( double beta)

Update search direction q for cg solver.

◆ updateSearchDirectionNorm()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
Dune::FieldVector< double, 1 > Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::updateSearchDirectionNorm ( )

◆ updateSolution()

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
void Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::updateSolution ( Scalar alpha)

Updates the solution approximation.

Member Data Documentation

◆ components

template<int m, class Scalar_ = double, class CoarseScalar = Scalar_, class Transfer = SpaceTransfer<m,Scalar_>>
const int Kaskade::BDDC::Subdomain< m, Scalar_, CoarseScalar, Transfer >::components = m
static

Number of (vectorial) components of \( u \).

Definition at line 270 of file bddc.hh.


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