![]() |
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.
|
Wrapper for Trilinos-Amesos2 Direct Solvers. More...
#include <amesos2_solver.h>
Public Member Functions | |
Life Cycle | |
Amesos2Solver (Parameters settings) | |
Constructor with Parameters. More... | |
Amesos2Solver (const std::string &SolverName, Teuchos::ParameterList &rParameterList) | |
Constructor with solver-name and Teuchos::ParameterList. More... | |
Amesos2Solver (const Amesos2Solver &Other)=delete | |
Copy constructor. More... | |
~Amesos2Solver () override=default | |
Destructor. More... | |
Operators | |
Amesos2Solver & | operator= (const Amesos2Solver &Other)=delete |
Assignment operator. More... | |
Operations | |
bool | Solve (SparseMatrixType &rA, VectorType &rX, VectorType &rB) override |
bool | Solve (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB) override |
Input and output | |
void | PrintInfo (std::ostream &rOStream) const override |
Print information about this object. More... | |
![]() | |
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... | |
LinearSolver & | operator= (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... | |
Static Public Member Functions | |
Inquiry | |
static bool | HasSolver (const std::string &rAmesosSolverName) |
Type Definitions | |
typedef TSparseSpaceType::MatrixType | SparseMatrixType |
typedef TSparseSpaceType::VectorType | VectorType |
typedef TDenseSpaceType::MatrixType | DenseMatrixType |
KRATOS_CLASS_POINTER_DEFINITION (Amesos2Solver) | |
Pointer definition of Amesos2Solver. More... | |
Additional Inherited Members | |
![]() | |
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... | |
Wrapper for Trilinos-Amesos2 Direct Solvers.
Amesos2 is the Direct Sparse Solver Package in Trilinos. The goal of Amesos2 is to make AX=B as easy as it sounds, at least for direct methods. Amesos2 provides clean and consistent interfaces to several third party libraries. https://github.com/trilinos/Trilinos/tree/master/packages/amesos2
typedef TDenseSpaceType::MatrixType Kratos::Amesos2Solver< TSparseSpaceType, TDenseSpaceType, TReordererType >::DenseMatrixType |
typedef TSparseSpaceType::MatrixType Kratos::Amesos2Solver< TSparseSpaceType, TDenseSpaceType, TReordererType >::SparseMatrixType |
typedef TSparseSpaceType::VectorType Kratos::Amesos2Solver< TSparseSpaceType, TDenseSpaceType, TReordererType >::VectorType |
|
inline |
Constructor with Parameters.
|
inline |
Constructor with solver-name and Teuchos::ParameterList.
|
delete |
Copy constructor.
|
overridedefault |
Destructor.
|
inlinestatic |
Check if a specific solver is available Check "Amesos2_Factory.hpp" to see which solvers are available
rAmesosSolverName. | Name of the solver |
Kratos::Amesos2Solver< TSparseSpaceType, TDenseSpaceType, TReordererType >::KRATOS_CLASS_POINTER_DEFINITION | ( | Amesos2Solver< TSparseSpaceType, TDenseSpaceType, TReordererType > | ) |
Pointer definition of Amesos2Solver.
|
delete |
Assignment operator.
|
inlineoverridevirtual |
Print information about this object.
Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.
|
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.
rA. | System matrix |
rX. | Solution vector. |
rB. | Right hand side vector. |
Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.
|
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.
rA. | System matrix |
rX. | Solution vector. |
rB. | Right hand side vector. |
Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.