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.
|
#include <skyline_lu_custom_scalar_solver.h>
Public Types | |
typedef TSparseSpaceType::MatrixType | SparseMatrixType |
typedef TSparseSpaceType::VectorType | VectorType |
typedef TDenseSpaceType::MatrixType | DenseMatrixType |
typedef TSparseSpaceType::DataType | DataType |
typedef amgcl::backend::builtin< DataType >::matrix | BuiltinMatrixType |
typedef amgcl::solver::skyline_lu< DataType > | SolverType |
Public Types inherited from Kratos::DirectSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > > | |
typedef LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > > | BaseType |
typedef TSparseSpaceType::MatrixType | SparseMatrixType |
typedef TSparseSpaceType::VectorType | VectorType |
typedef TDenseSpaceType::MatrixType | DenseMatrixType |
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... | |
Public Member Functions | |
KRATOS_CLASS_POINTER_DEFINITION (SkylineLUCustomScalarSolver) | |
SkylineLUCustomScalarSolver () | |
SkylineLUCustomScalarSolver (Parameters &rParam) | |
~SkylineLUCustomScalarSolver () 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 |
void | FinalizeSolutionStep (SparseMatrixType &rA, VectorType &rX, VectorType &rB) override |
void | Clear () override |
void | PrintInfo (std::ostream &rOStream) const override |
Print information about this object. More... | |
Public Member Functions inherited from Kratos::DirectSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > > | |
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, 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... | |
LinearSolver & | operator= (const LinearSolver &Other) |
Assignment operator. More... | |
virtual void | Initialize (SparseMatrixType &rA, VectorType &rX, VectorType &rB) |
virtual bool | Solve (SparseMatrixType &rA, DenseMatrixType &rX, DenseMatrixType &rB) |
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... | |
typedef amgcl::backend::builtin<DataType>::matrix Kratos::SkylineLUCustomScalarSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::BuiltinMatrixType |
typedef TSparseSpaceType::DataType Kratos::SkylineLUCustomScalarSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::DataType |
typedef TDenseSpaceType::MatrixType Kratos::SkylineLUCustomScalarSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::DenseMatrixType |
typedef amgcl::solver::skyline_lu<DataType> Kratos::SkylineLUCustomScalarSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::SolverType |
typedef TSparseSpaceType::MatrixType Kratos::SkylineLUCustomScalarSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::SparseMatrixType |
typedef TSparseSpaceType::VectorType Kratos::SkylineLUCustomScalarSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::VectorType |
|
inline |
|
inline |
|
inlineoverride |
|
inlineoverridevirtual |
This function is designed to clean up all internal data in the solver. Clear is designed to leave the solver object as if newly created. After a clear a new Initialize is needed
Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.
|
inlineoverridevirtual |
This function is designed to be called at the end of the solve step. for example this is the place to remove any data that we do not want to save for later
rA. | System matrix |
rX. | Solution vector. it's also the initial guess for iterative linear solvers. |
rB. | Right hand side vector. |
Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.
|
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
rA. | System matrix |
rX. | Solution vector. it's also the initial guess for iterative linear solvers. |
rB. | Right hand side vector. |
Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.
Kratos::SkylineLUCustomScalarSolver< TSparseSpaceType, TDenseSpaceType, TReordererType >::KRATOS_CLASS_POINTER_DEFINITION | ( | SkylineLUCustomScalarSolver< TSparseSpaceType, TDenseSpaceType, TReordererType > | ) |
|
inlineoverridevirtual |
This function actually performs the solution work, eventually taking advantage of what was done before in the Initialize and InitializeSolutionStep functions.
rA. | System matrix |
rX. | Solution vector. it's also the initial guess for iterative linear solvers. |
rB. | Right hand side vector. |
Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.
|
inlineoverridevirtual |
Print information about this object.
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. rVectorx is also th initial guess for iterative methods.
rA. | System matrix |
rX. | Solution vector. it's also the initial guess for iterative linear solvers. |
rB. | Right hand side vector. |
Reimplemented from Kratos::LinearSolver< TSparseSpaceType, TDenseSpaceType, Reorderer< TSparseSpaceType, TDenseSpaceType > >.