KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType > Class Template Reference

#include <additive_schwarz_preconditioner.h>

Inheritance diagram for Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >:
Collaboration diagram for Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >:

Public Member Functions

Life Cycle
 AdditiveSchwarzPreconditioner ()
 Default constructor. More...
 
 AdditiveSchwarzPreconditioner (const AdditiveSchwarzPreconditioner &Other)=delete
 Copy constructor. More...
 
 ~AdditiveSchwarzPreconditioner () override
 Destructor. More...
 
Operators
AdditiveSchwarzPreconditioneroperator= (const AdditiveSchwarzPreconditioner &Other)=delete
 Assignment operator. More...
 
Get/Set functions
bool AdditionalPhysicalDataIsNeeded () override
 
void ProvideAdditionalData (SparseMatrixType &rA, VectorType &rX, VectorType &rB, DofsArrayType &rdof_set, ModelPart &r_model_part) override
 
Operations
VectorTypeApplyInverseRight (VectorType &rX) override
 
void Mult (SparseMatrixType &rA, VectorType &rX, VectorType &rY) override
 
VectorTypeApplyLeft (VectorType &rX) override
 
VectorTypeFinalize (VectorType &rX) override
 
Input and output
std::string Info () const override
 Return information about this object. More...
 
void PrintInfo (std::ostream &OStream) const override
 Print information about this object. More...
 
void PrintData (std::ostream &OStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::Preconditioner< TSparseSpaceType, TDenseSpaceType >
 Preconditioner ()
 Default constructor. More...
 
 Preconditioner (const Preconditioner &Other)
 Copy constructor. More...
 
virtual ~Preconditioner ()
 Destructor. More...
 
Preconditioneroperator= (const Preconditioner &Other)
 Assignment operator. More...
 
virtual void Initialize (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual void Initialize (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB)
 
virtual void InitializeSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual void FinalizeSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual void Clear ()
 
virtual void TransposeMult (SparseMatrixType &rA, VectorType &rX, VectorType &rY)
 
virtual VectorTypeApplyRight (VectorType &rX)
 
virtual VectorTypeApplyTransposeLeft (VectorType &rX)
 
virtual VectorTypeApplyTransposeRight (VectorType &rX)
 
 KRATOS_CLASS_POINTER_DEFINITION (Preconditioner)
 Pointer definition of Preconditioner. More...
 

Protected Attributes

Protected member Variables
SparseMatrixPointerType mpS
 
bool mMatrixIsInitializedFlag = false
 

Type Definitions

typedef std::size_t SizeType
 
typedef std::size_t IndexType
 
typedef Preconditioner< TSparseSpaceType, TDenseSpaceType > BaseType
 
typedef TSparseSpaceType::MatrixType SparseMatrixType
 
typedef TSparseSpaceType::MatrixPointerType SparseMatrixPointerType
 
typedef TSparseSpaceType::VectorType VectorType
 
typedef TDenseSpaceType::MatrixType DenseMatrixType
 
typedef ModelPart::DofsArrayType DofsArrayType
 
 KRATOS_CLASS_POINTER_DEFINITION (AdditiveSchwarzPreconditioner)
 Counted pointer of AdditiveSchwarzPreconditioner. More...
 

Additional Inherited Members

- Public Types inherited from Kratos::Preconditioner< TSparseSpaceType, TDenseSpaceType >
typedef TSparseSpaceType::MatrixType SparseMatrixType
 
typedef TSparseSpaceType::VectorType VectorType
 
typedef TDenseSpaceType::MatrixType DenseMatrixType
 

Detailed Description

template<class TSparseSpaceType, class TDenseSpaceType>
class Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >

Todo:
Use dense solver for computation of inverse/ pseudo inverse. Check values for relaxation parameter. Only apply additive schwarz preconditioner for trimmed elements (badly conditioned elements). Apply Jacobi preconditioning for non-trimmed elements. Migrate preconditioner into Kratos Core.

Member Typedef Documentation

◆ BaseType

template<class TSparseSpaceType , class TDenseSpaceType >
typedef Preconditioner<TSparseSpaceType, TDenseSpaceType> Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::BaseType

◆ DenseMatrixType

template<class TSparseSpaceType , class TDenseSpaceType >
typedef TDenseSpaceType::MatrixType Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::DenseMatrixType

◆ DofsArrayType

template<class TSparseSpaceType , class TDenseSpaceType >
typedef ModelPart::DofsArrayType Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::DofsArrayType

◆ IndexType

template<class TSparseSpaceType , class TDenseSpaceType >
typedef std::size_t Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::IndexType

◆ SizeType

template<class TSparseSpaceType , class TDenseSpaceType >
typedef std::size_t Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::SizeType

◆ SparseMatrixPointerType

template<class TSparseSpaceType , class TDenseSpaceType >
typedef TSparseSpaceType::MatrixPointerType Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::SparseMatrixPointerType

◆ SparseMatrixType

template<class TSparseSpaceType , class TDenseSpaceType >
typedef TSparseSpaceType::MatrixType Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::SparseMatrixType

◆ VectorType

template<class TSparseSpaceType , class TDenseSpaceType >
typedef TSparseSpaceType::VectorType Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::VectorType

Constructor & Destructor Documentation

◆ AdditiveSchwarzPreconditioner() [1/2]

template<class TSparseSpaceType , class TDenseSpaceType >
Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::AdditiveSchwarzPreconditioner ( )
inline

Default constructor.

◆ AdditiveSchwarzPreconditioner() [2/2]

template<class TSparseSpaceType , class TDenseSpaceType >
Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::AdditiveSchwarzPreconditioner ( const AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType > &  Other)
delete

Copy constructor.

◆ ~AdditiveSchwarzPreconditioner()

template<class TSparseSpaceType , class TDenseSpaceType >
Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::~AdditiveSchwarzPreconditioner ( )
inlineoverride

Destructor.

Member Function Documentation

◆ AdditionalPhysicalDataIsNeeded()

template<class TSparseSpaceType , class TDenseSpaceType >
bool Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::AdditionalPhysicalDataIsNeeded ( )
inlineoverridevirtual

Some preconditioners may require a minimum degree of knowledge of the structure of the matrix. To make an example when solving a mixed u-p problem, it is important to identify the row associated to v and p. another example is the automatic prescription of rotation null-space for smoothed-aggregation preconditioners which require knowledge on the spatial position of the nodes associated to a given dof. This function tells if the solver requires such data

Reimplemented from Kratos::Preconditioner< TSparseSpaceType, TDenseSpaceType >.

◆ ApplyInverseRight()

template<class TSparseSpaceType , class TDenseSpaceType >
VectorType& Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::ApplyInverseRight ( VectorType rX)
inlineoverridevirtual

◆ ApplyLeft()

template<class TSparseSpaceType , class TDenseSpaceType >
VectorType& Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::ApplyLeft ( VectorType rX)
inlineoverridevirtual

◆ Finalize()

template<class TSparseSpaceType , class TDenseSpaceType >
VectorType& Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::Finalize ( VectorType rX)
inlineoverridevirtual

◆ Info()

template<class TSparseSpaceType , class TDenseSpaceType >
std::string Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::Info ( ) const
inlineoverridevirtual

Return information about this object.

Reimplemented from Kratos::Preconditioner< TSparseSpaceType, TDenseSpaceType >.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TSparseSpaceType , class TDenseSpaceType >
Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::KRATOS_CLASS_POINTER_DEFINITION ( AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >  )

Counted pointer of AdditiveSchwarzPreconditioner.

◆ Mult()

template<class TSparseSpaceType , class TDenseSpaceType >
void Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::Mult ( SparseMatrixType rA,
VectorType rX,
VectorType rY 
)
inlineoverridevirtual

◆ operator=()

template<class TSparseSpaceType , class TDenseSpaceType >
AdditiveSchwarzPreconditioner& Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::operator= ( const AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType > &  Other)
delete

Assignment operator.

◆ PrintData()

template<class TSparseSpaceType , class TDenseSpaceType >
void Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

Print object's data.

Reimplemented from Kratos::Preconditioner< TSparseSpaceType, TDenseSpaceType >.

◆ PrintInfo()

template<class TSparseSpaceType , class TDenseSpaceType >
void Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::PrintInfo ( std::ostream &  OStream) const
inlineoverridevirtual

Print information about this object.

Reimplemented from Kratos::Preconditioner< TSparseSpaceType, TDenseSpaceType >.

◆ ProvideAdditionalData()

template<class TSparseSpaceType , class TDenseSpaceType >
void Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::ProvideAdditionalData ( SparseMatrixType rA,
VectorType rX,
VectorType rB,
DofsArrayType rdof_set,
ModelPart r_model_part 
)
inlineoverridevirtual

Some preconditioners may require a minimum degree of knowledge of the structure of the matrix. To make an example when solving a mixed u-p problem, it is important to identify the row associated to v and p. another example is the automatic prescription of rotation null-space for smoothed-aggregation preconditioners which require knowledge on the spatial position of the nodes associated to a given dof. This function is the place to eventually provide such data

Reimplemented from Kratos::Preconditioner< TSparseSpaceType, TDenseSpaceType >.

Member Data Documentation

◆ mMatrixIsInitializedFlag

template<class TSparseSpaceType , class TDenseSpaceType >
bool Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::mMatrixIsInitializedFlag = false
protected

◆ mpS

template<class TSparseSpaceType , class TDenseSpaceType >
SparseMatrixPointerType Kratos::AdditiveSchwarzPreconditioner< TSparseSpaceType, TDenseSpaceType >::mpS
protected

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