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.
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType > Class Template Reference

#include <eigen_direct_solver.h>

Inheritance diagram for Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >:
Collaboration diagram for Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >:

Public Types

typedef DirectSolver< TSparseSpaceType, TDenseSpaceType, TReordererType > BaseType
 
typedef TSparseSpaceType::MatrixType SparseMatrixType
 
typedef TSparseSpaceType::VectorType VectorType
 
typedef TSparseSpaceType::DataType DataType
 
typedef TDenseSpaceType::MatrixType DenseMatrixType
 
typedef StandardLinearSolverFactory< TSparseSpaceType, TDenseSpaceType, EigenDirectSolverFactoryType
 
- Public Types inherited from Kratos::DirectSolver< typename SpaceType< typename TSolverType::Scalar >::Global, typename SpaceType< typename TSolverType::Scalar >::Local, Reorderer< typename SpaceType< typename TSolverType::Scalar >::Global, typename SpaceType< typename TSolverType::Scalar >::Local > >
typedef LinearSolver< typename SpaceType< typename TSolverType::Scalar >::Global, typename SpaceType< typename TSolverType::Scalar >::Local, Reorderer< typename SpaceType< typename TSolverType::Scalar >::Global, typename SpaceType< typename TSolverType::Scalar >::Local > > BaseType
 
typedef TSparseSpaceType::MatrixType SparseMatrixType
 
typedef TSparseSpaceType::VectorType VectorType
 
typedef TDenseSpaceType::MatrixType DenseMatrixType
 
- Public Types inherited from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >
typedef TSparseSpaceType::MatrixType SparseMatrixType
 
typedef TSparseSpaceType::MatrixPointerType SparseMatrixPointerType
 
typedef TSparseSpaceType::VectorType VectorType
 
typedef TSparseSpaceType::VectorPointerType VectorPointerType
 
typedef TDenseSpaceType::MatrixType DenseMatrixType
 
typedef TDenseSpaceType::VectorType DenseVectorType
 
typedef std::size_t SizeType
 
typedef TSparseSpaceType::IndexType IndexType
 The index type definition to be consistent. More...
 

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (EigenDirectSolver)
 
 EigenDirectSolver ()
 
 EigenDirectSolver (Parameters settings)
 
 ~EigenDirectSolver () override
 
void InitializeSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB) override
 
void PerformSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB) override
 
bool Solve (SparseMatrixType &rA, VectorType &rX, VectorType &rB) override
 
bool Solve (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB) override
 
void PrintInfo (std::ostream &rOStream) const override
 
void PrintData (std::ostream &rOStream) const override
 
- Public Member Functions inherited from Kratos::DirectSolver< typename SpaceType< typename TSolverType::Scalar >::Global, typename SpaceType< typename TSolverType::Scalar >::Local, Reorderer< typename SpaceType< typename TSolverType::Scalar >::Global, typename SpaceType< typename TSolverType::Scalar >::Local > >
 KRATOS_CLASS_POINTER_DEFINITION (DirectSolver)
 Counted pointer of DirectSolver. More...
 
 DirectSolver ()
 Default constructor. More...
 
 DirectSolver (Parameters settings)
 
 DirectSolver (const DirectSolver &Other)
 Copy constructor. More...
 
 ~DirectSolver () override
 Destructor. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >
 LinearSolver ()
 Default constructor. More...
 
 LinearSolver (TReordererType NewReorderer)
 Constructor with specific reorderer. More...
 
 LinearSolver (const LinearSolver &Other)
 Copy constructor. More...
 
virtual ~LinearSolver ()
 Destructor. More...
 
LinearSolveroperator= (const LinearSolver &Other)
 Assignment operator. More...
 
virtual void Initialize (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual void FinalizeSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual void Clear ()
 
virtual void Solve (SparseMatrixType &K, SparseMatrixType &M, DenseVectorType &Eigenvalues, DenseMatrixType &Eigenvectors)
 
virtual bool AdditionalPhysicalDataIsNeeded ()
 
virtual void ProvideAdditionalData (SparseMatrixType &rA, VectorType &rX, VectorType &rB, typename ModelPart::DofsArrayType &rDoFSet, ModelPart &rModelPart)
 
virtual TReordererType::Pointer GetReorderer ()
 
virtual void SetReorderer (typename TReordererType::Pointer pNewReorderer)
 
virtual void SetTolerance (double NewTolerance)
 This method allows to set the tolerance in the linear solver. More...
 
virtual double GetTolerance ()
 This method allows to get the tolerance in the linear solver. More...
 
virtual IndexType GetIterationsNumber ()
 
virtual bool IsConsistent (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 This method checks if the dimensions of the system of equations are consistent. More...
 
virtual bool IsConsistent (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB)
 This method checks if the dimensions of the system of equations are consistent (dense matrix for RHS and unknowns version) More...
 
virtual bool IsNotConsistent (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 This method checks if the dimensions of the system of equations are not consistent. More...
 
virtual bool IsNotConsistent (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB)
 This method checks if the dimensions of the system of equations are not consistent. More...
 
virtual std::string Info () const
 Turn back information as a string. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (LinearSolver)
 Pointer definition of LinearSolver. More...
 

Static Public Member Functions

static StandardLinearSolverFactory< TSparseSpaceType, TDenseSpaceType, EigenDirectSolverFactory ()
 

Member Typedef Documentation

◆ BaseType

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef DirectSolver<TSparseSpaceType, TDenseSpaceType, TReordererType> Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::BaseType

◆ DataType

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TSparseSpaceType::DataType Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::DataType

◆ DenseMatrixType

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TDenseSpaceType::MatrixType Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::DenseMatrixType

◆ FactoryType

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef StandardLinearSolverFactory<TSparseSpaceType, TDenseSpaceType, EigenDirectSolver> Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::FactoryType

◆ SparseMatrixType

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TSparseSpaceType::MatrixType Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::SparseMatrixType

◆ VectorType

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TSparseSpaceType::VectorType Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::VectorType

Constructor & Destructor Documentation

◆ EigenDirectSolver() [1/2]

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::EigenDirectSolver ( )
inline

◆ EigenDirectSolver() [2/2]

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::EigenDirectSolver ( Parameters  settings)
inline

◆ ~EigenDirectSolver()

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::~EigenDirectSolver ( )
inlineoverride

Member Function Documentation

◆ Factory()

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
static StandardLinearSolverFactory<TSparseSpaceType, TDenseSpaceType, EigenDirectSolver> Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::Factory ( )
inlinestatic

◆ InitializeSolutionStep()

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::InitializeSolutionStep ( SparseMatrixType rA,
VectorType rX,
VectorType rB 
)
inlineoverridevirtual

This function is designed to be called every time the coefficients change in the system that is, normally at the beginning of each solve. For example if we are implementing a direct solver, this is the place to do the factorization so that then the backward substitution can be performed effectively more than once

Parameters
rASystem matrix
rXSolution vector
rBRight hand side vector

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::KRATOS_CLASS_POINTER_DEFINITION ( EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >  )

◆ PerformSolutionStep()

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::PerformSolutionStep ( SparseMatrixType rA,
VectorType rX,
VectorType rB 
)
inlineoverridevirtual

This function actually performs the solution work, eventually taking advantage of what was done before in the Initialize and InitializeSolutionStep functions.

Parameters
rASystem matrix
rXSolution vector
rBRight hand side vector

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >.

◆ PrintData()

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

◆ PrintInfo()

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

Print information about this object.

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >.

◆ Solve() [1/2]

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
bool Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::Solve ( SparseMatrixType rA,
DenseMatrixType rX,
DenseMatrixType rB 
)
inlineoverridevirtual

Solves the linear system Ax=b

Parameters
rASystem matrix
rXSolution matrix
rBRight hand side matrix
Returns
true if solution found, otherwise false

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >.

◆ Solve() [2/2]

template<class TSolverType , class TSparseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Global, class TDenseSpaceType = typename SpaceType<typename TSolverType::Scalar>::Local, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
bool Kratos::EigenDirectSolver< TSolverType, TSparseSpaceType, TDenseSpaceType, TReordererType >::Solve ( SparseMatrixType rA,
VectorType rX,
VectorType rB 
)
inlineoverridevirtual

Solves the linear system Ax=b

Parameters
rASystem matrix
rXSolution vector
rBRight hand side vector
Returns
true if solution found, otherwise false

Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >.


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