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::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType > Class Template Reference

Wrapper for Trilinos-Aztec Iterative Solvers. More...

#include <aztec_solver.h>

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

Public Member Functions

Life Cycle
 AztecSolver (Parameters settings)
 Constructor with Parameters. More...
 
 AztecSolver (Teuchos::ParameterList &aztec_parameter_list, std::string IFPreconditionerType, Teuchos::ParameterList &preconditioner_parameter_list, double tol, int nit_max, int overlap_level)
 
 AztecSolver (const AztecSolver &Other)=delete
 Copy constructor. More...
 
 ~AztecSolver () override=default
 Destructor. More...
 
Operators
AztecSolveroperator= (const AztecSolver &Other)=delete
 Assignment operator. More...
 
Operations
void SetScalingType (AztecScalingType scaling_type)
 
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
 Print information about this object. More...
 
- Public Member Functions inherited from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >
 LinearSolver ()
 Default constructor. More...
 
 LinearSolver (Reorderer< TSparseSpaceType, TDenseSpaceType > 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 InitializeSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB)
 
virtual void PerformSolutionStep (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...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (LinearSolver)
 Pointer definition of LinearSolver. More...
 

Type Definitions

typedef TSparseSpaceType::MatrixType SparseMatrixType
 
typedef TSparseSpaceType::VectorType VectorType
 
typedef TDenseSpaceType::MatrixType DenseMatrixType
 
 KRATOS_CLASS_POINTER_DEFINITION (AztecSolver)
 Pointer definition of AztecSolver. More...
 

Additional Inherited Members

- Public Types inherited from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >
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...
 

Detailed Description

template<class TSparseSpaceType, class TDenseSpaceType, class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
class Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >

Wrapper for Trilinos-Aztec Iterative Solvers.

AztecOO provides an object-oriented interface the the well-known Aztec solver library. Furthermore, it allows flexible construction of matrix and vector arguments via Epetra matrix and vector classes. Finally, AztecOO provide additional functionality not found in Aztec and any future enhancements to the Aztec package will be available only through the AztecOO interfaces. https://trilinos.org/packages/aztecoo/

Member Typedef Documentation

◆ DenseMatrixType

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TDenseSpaceType::MatrixType Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::DenseMatrixType

◆ SparseMatrixType

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TSparseSpaceType::MatrixType Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::SparseMatrixType

◆ VectorType

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
typedef TSparseSpaceType::VectorType Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::VectorType

Constructor & Destructor Documentation

◆ AztecSolver() [1/3]

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::AztecSolver ( Parameters  settings)
inline

Constructor with Parameters.

◆ AztecSolver() [2/3]

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::AztecSolver ( Teuchos::ParameterList &  aztec_parameter_list,
std::string  IFPreconditionerType,
Teuchos::ParameterList &  preconditioner_parameter_list,
double  tol,
int  nit_max,
int  overlap_level 
)
inline

◆ AztecSolver() [3/3]

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::AztecSolver ( const AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType > &  Other)
delete

Copy constructor.

◆ ~AztecSolver()

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::~AztecSolver ( )
overridedefault

Destructor.

Member Function Documentation

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::KRATOS_CLASS_POINTER_DEFINITION ( AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >  )

Pointer definition of AztecSolver.

◆ operator=()

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

Assignment operator.

◆ PrintInfo()

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

◆ SetScalingType()

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
void Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::SetScalingType ( AztecScalingType  scaling_type)
inline

◆ Solve() [1/2]

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
bool Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::Solve ( SparseMatrixType rA,
DenseMatrixType rX,
DenseMatrixType rB 
)
inlineoverridevirtual

Multi solve method for solving a set of linear systems with same coefficient matrix. Solves the linear system Ax=b and puts the result on SystemVector& rX. rX is also th initial guess for iterative methods.

Parameters
rA.System matrix
rX.Solution vector.
rB.Right hand side vector.

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

◆ Solve() [2/2]

template<class TSparseSpaceType , class TDenseSpaceType , class TReordererType = Reorderer<TSparseSpaceType, TDenseSpaceType>>
bool Kratos::AztecSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::Solve ( SparseMatrixType rA,
VectorType rX,
VectorType rB 
)
inlineoverridevirtual

Normal solve method. Solves the linear system Ax=b and puts the result on SystemVector& rX. rX is also th initial guess for iterative methods.

Parameters
rA.System matrix
rX.Solution vector.
rB.Right hand side vector.

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


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