ug4
ug::SchurComplementOperator< TAlgebra > Class Template Reference

#include <schur_complement_operator.h>

+ Inheritance diagram for ug::SchurComplementOperator< TAlgebra >:

Public Types

typedef TAlgebra algebra_type
 
typedef TAlgebra::matrix_type matrix_type
 
typedef TAlgebra::vector_type vector_type
 
- Public Types inherited from ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >
typedef TAlgebra::vector_type codomain_function_type
 Range space. More...
 
typedef TAlgebra::vector_type domain_function_type
 Domain space. More...
 
- Public Types inherited from ug::IOperator< X, Y >
typedef Y codomain_function_type
 Range space. More...
 
typedef X domain_function_type
 Domain space. More...
 

Public Member Functions

virtual void apply (vector_type &f, const vector_type &u)
 apply schur complement \( f_{\Gamma} = (A_{\Gamma, \Gamma} - A_{\Gamma, I} A_{I, I}^{-1} A_{I, \Gamma} )u_{\Gamma} \) More...
 
virtual void apply_sub (vector_type &f, const vector_type &u)
 
void compute_matrix (matrix_type &schur_matrix, double threshold=0.0)
 
void debug_compute_matrix ()
 
virtual void init ()
 initializes the solver for operator A More...
 
void init (const vector_type &u)
 implementation of the operator for the solution dependent initialization. More...
 
virtual const char * name () const
 name of solver More...
 
 SchurComplementOperator (SmartPtr< MatrixOperator< matrix_type, vector_type > > Alocal, SchurSlicingData::slice_desc_type_vector &sdv)
 constructor More...
 
virtual void set_debug (SmartPtr< IDebugWriter< algebra_type > > spDebugWriter)
 
void set_dirichlet_solver (SmartPtr< ILinearOperatorInverse< vector_type > > dirichletSolver)
 sets a Dirichlet solver More...
 
template<typename T >
void set_inner_debug (SmartPtr< T > op)
 
void set_matrix (SmartPtr< MatrixOperator< matrix_type, vector_type > > A)
 
template<typename T >
void set_skeleton_debug (SmartPtr< T > op)
 
const SchurSlicingDataslicing () const
 
matrix_typesub_matrix (int r, int c)
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > sub_operator (int r, int c)
 
size_t sub_size (schur_slice_desc_type type)
 
virtual ~SchurComplementOperator ()
 
- Public Member Functions inherited from ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >
virtual void prepare (TAlgebra::vector_type &u)
 default implementation for IOperator interface More...
 
virtual ~ILinearOperator ()
 virtual destructor More...
 
- Public Member Functions inherited from ug::IOperator< X, Y >
virtual void apply (Y &d, const X &u)=0
 computes the nonlinear mapping d := N(u) More...
 
virtual void prepare (X &u)=0
 prepares domain and codomain functions for application More...
 
virtual ~IOperator ()
 virtual destructor More...
 

Protected Member Functions

template<int dim>
void set_debug_dim ()
 

Protected Attributes

int m_applyCnt
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_op [2][2]
 
const SchurSlicingData m_slicing
 
SmartPtr< IDebugWriter< algebra_type > > m_spDebugWriter
 
SmartPtr< AlgebraDebugWriter< algebra_type > > m_spDebugWriterInner
 
SmartPtr< AlgebraDebugWriter< algebra_type > > m_spDebugWriterSkeleton
 
SmartPtr< ILinearOperatorInverse< vector_type > > m_spDirichletSolver
 
SmartPtr< MatrixOperator< matrix_type, vector_type > > m_spOperator
 

Member Typedef Documentation

◆ algebra_type

template<typename TAlgebra >
typedef TAlgebra ug::SchurComplementOperator< TAlgebra >::algebra_type

◆ matrix_type

template<typename TAlgebra >
typedef TAlgebra::matrix_type ug::SchurComplementOperator< TAlgebra >::matrix_type

◆ vector_type

template<typename TAlgebra >
typedef TAlgebra::vector_type ug::SchurComplementOperator< TAlgebra >::vector_type

Constructor & Destructor Documentation

◆ SchurComplementOperator()

◆ ~SchurComplementOperator()

template<typename TAlgebra >
virtual ug::SchurComplementOperator< TAlgebra >::~SchurComplementOperator ( )
inlinevirtual

Member Function Documentation

◆ apply()

template<typename TAlgebra >
void ug::SchurComplementOperator< TAlgebra >::apply ( vector_type f,
const vector_type u 
)
virtual

apply schur complement \( f_{\Gamma} = (A_{\Gamma, \Gamma} - A_{\Gamma, I} A_{I, I}^{-1} A_{I, \Gamma} )u_{\Gamma} \)

applies the Schur complement built from matrix operator set via 'set_matrix()' to 'u' and returns the result 'f := S times u'

Implements ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >.

References IF_DEBUG, pcl::ProcRank(), ug::PST_ADDITIVE, ug::PST_CONSISTENT, SCHUR_PROFILE_BEGIN, ug::SchurDebug, ug::SD_INNER, ug::SD_SKELETON, UG_CATCH_THROW, UG_DLOG, UG_LOG, UG_LOG_ALL_PROCS, ug::UG_LOG_Vector(), and UG_THROW.

◆ apply_sub()

template<typename TAlgebra >
void ug::SchurComplementOperator< TAlgebra >::apply_sub ( vector_type f,
const vector_type u 
)
virtual

applies the Schur complement built from matrix operator set via 'set_matrix()' to 'u' and returns the result 'f := f - S times u'

Implements ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >.

References SCHUR_PROFILE_BEGIN, ug::SchurDebug, and UG_DLOG.

◆ compute_matrix()

◆ debug_compute_matrix()

template<typename TAlgebra >
void ug::SchurComplementOperator< TAlgebra >::debug_compute_matrix

◆ init() [1/2]

template<typename TAlgebra >
void ug::SchurComplementOperator< TAlgebra >::init
virtual

◆ init() [2/2]

template<typename TAlgebra >
void ug::SchurComplementOperator< TAlgebra >::init ( const vector_type u)
inlinevirtual

implementation of the operator for the solution dependent initialization.

Implements ug::ILinearOperator< TAlgebra::vector_type, TAlgebra::vector_type >.

References ug::SchurComplementOperator< TAlgebra >::init().

Referenced by ug::SchurComplementOperator< TAlgebra >::init().

◆ name()

template<typename TAlgebra >
virtual const char* ug::SchurComplementOperator< TAlgebra >::name ( ) const
inlinevirtual

name of solver

◆ set_debug()

template<typename TAlgebra >
void ug::SchurComplementOperator< TAlgebra >::set_debug ( SmartPtr< IDebugWriter< algebra_type > >  spDebugWriter)
virtual

References UG_LOG.

◆ set_debug_dim()

template<typename TAlgebra >
template<int dim>
void ug::SchurComplementOperator< TAlgebra >::set_debug_dim
protected

◆ set_dirichlet_solver()

template<typename TAlgebra >
void ug::SchurComplementOperator< TAlgebra >::set_dirichlet_solver ( SmartPtr< ILinearOperatorInverse< vector_type > >  dirichletSolver)
inline

◆ set_inner_debug()

template<typename TAlgebra >
template<typename T >
void ug::SchurComplementOperator< TAlgebra >::set_inner_debug ( SmartPtr< T >  op)
inline

◆ set_matrix()

template<typename TAlgebra >
void ug::SchurComplementOperator< TAlgebra >::set_matrix ( SmartPtr< MatrixOperator< matrix_type, vector_type > >  A)
inline

◆ set_skeleton_debug()

template<typename TAlgebra >
template<typename T >
void ug::SchurComplementOperator< TAlgebra >::set_skeleton_debug ( SmartPtr< T >  op)
inline

◆ slicing()

template<typename TAlgebra >
const SchurSlicingData& ug::SchurComplementOperator< TAlgebra >::slicing ( ) const
inline

◆ sub_matrix()

template<typename TAlgebra >
matrix_type& ug::SchurComplementOperator< TAlgebra >::sub_matrix ( int  r,
int  c 
)
inline

◆ sub_operator()

template<typename TAlgebra >
SmartPtr<MatrixOperator<matrix_type, vector_type> > ug::SchurComplementOperator< TAlgebra >::sub_operator ( int  r,
int  c 
)
inline

◆ sub_size()

template<typename TAlgebra >
size_t ug::SchurComplementOperator< TAlgebra >::sub_size ( schur_slice_desc_type  type)
inline

Member Data Documentation

◆ m_applyCnt

template<typename TAlgebra >
int ug::SchurComplementOperator< TAlgebra >::m_applyCnt
protected

◆ m_op

◆ m_slicing

◆ m_spDebugWriter

template<typename TAlgebra >
SmartPtr<IDebugWriter<algebra_type> > ug::SchurComplementOperator< TAlgebra >::m_spDebugWriter
protected

◆ m_spDebugWriterInner

template<typename TAlgebra >
SmartPtr<AlgebraDebugWriter<algebra_type> > ug::SchurComplementOperator< TAlgebra >::m_spDebugWriterInner
protected

◆ m_spDebugWriterSkeleton

template<typename TAlgebra >
SmartPtr<AlgebraDebugWriter<algebra_type> > ug::SchurComplementOperator< TAlgebra >::m_spDebugWriterSkeleton
protected

◆ m_spDirichletSolver

template<typename TAlgebra >
SmartPtr<ILinearOperatorInverse<vector_type> > ug::SchurComplementOperator< TAlgebra >::m_spDirichletSolver
protected

◆ m_spOperator

template<typename TAlgebra >
SmartPtr<MatrixOperator<matrix_type,vector_type> > ug::SchurComplementOperator< TAlgebra >::m_spOperator
protected

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