chrono::ChSolverMKL< Matrix > Class Template Reference

Description

template<typename Matrix = ChCSR3Matrix>
class chrono::ChSolverMKL< Matrix >

Class that wraps the Intel MKL Pardiso parallel direct solver.

It can solve linear systems, but not VI and complementarity problems.

#include <ChSolverMKL.h>

Inheritance diagram for chrono::ChSolverMKL< Matrix >:
Collaboration diagram for chrono::ChSolverMKL< Matrix >:

Public Member Functions

ChMklEngineGetMklEngine ()
 Get a handle to the underlying MKL engine.
 
Matrix & GetMatrix ()
 Get a handle to the underlying matrix.
 
void SetSparsityPatternLock (bool val)
 Enable/disable locking the sparsity pattern (default: false). More...
 
void ForceSparsityPatternUpdate (bool val=true)
 Call an update of the sparsiy pattern on the underlying matrix. More...
 
void UsePermutationVector (bool val)
 Enable/disable use of permutation vector (default: false).
 
void LeverageRhsSparsity (bool val)
 Enable/disable leveraging sparsity in right-hand side vector (default: false).
 
void SetPreconditionedCGS (bool val, int L)
 
void SetMatrixNNZ (int nnz)
 Set the number of non-zero entries in the problem matrix.
 
void ResetTimers ()
 Reset timers for internal phases in Solve and Setup.
 
double GetTimeSolve_Assembly () const
 Get cumulative time for assembly operations in Solve phase.
 
double GetTimeSolve_SolverCall () const
 Get cumulative time for Pardiso calls in Solve phase.
 
double GetTimeSetup_Assembly () const
 Get cumulative time for assembly operations in Setup phase.
 
double GetTimeSetup_SolverCall () const
 Get cumulative time for Pardiso calls in Setup phase.
 
virtual bool SolveRequiresMatrix () const override
 Indicate whether or not the Solve() phase requires an up-to-date problem matrix. More...
 
virtual bool Setup (ChSystemDescriptor &sysd) override
 Perform the solver setup operations. More...
 
virtual double Solve (ChSystemDescriptor &sysd) override
 Solve using the MKL Pardiso sparse direct solver. More...
 
virtual void ArchiveOUT (ChArchiveOut &marchive) override
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive) override
 Method to allow de serialization of transient data from archives.
 
- Public Member Functions inherited from chrono::ChSolver
virtual Type GetType () const
 Return type of the solver. More...
 
void SetVerbose (bool mv)
 Set verbose output from solver.
 
bool GetVerbose () const
 

Additional Inherited Members

- Public Types inherited from chrono::ChSolver
enum  Type {
  SOR = 0, SYMMSOR, JACOBI, SOR_MULTITHREAD,
  PMINRES, BARZILAIBORWEIN, PCG, APGD,
  MINRES, SOLVER_SMC, CUSTOM
}
 Available types of solvers.
 
- Protected Attributes inherited from chrono::ChSolver
bool verbose
 

Member Function Documentation

template<typename Matrix = ChCSR3Matrix>
void chrono::ChSolverMKL< Matrix >::ForceSparsityPatternUpdate ( bool  val = true)

Call an update of the sparsiy pattern on the underlying matrix.

It is used to inform the solver (and the underlying matrices) that the sparsity pattern is changed. It is suggested to call this function just after the construction of the solver.

template<typename Matrix = ChCSR3Matrix>
void chrono::ChSolverMKL< Matrix >::SetSparsityPatternLock ( bool  val)

Enable/disable locking the sparsity pattern (default: false).

If val is set to true, then the sparsity pattern of the problem matrix is assumed to be unchanged from call to call.

template<typename Matrix = ChCSR3Matrix>
virtual bool chrono::ChSolverMKL< Matrix >::Setup ( ChSystemDescriptor sysd)
overridevirtual

Perform the solver setup operations.

For the MKL solver, this means assembling and factorizing the system matrix. Returns true if successful and false otherwise.

Reimplemented from chrono::ChSolver.

template<typename Matrix = ChCSR3Matrix>
virtual double chrono::ChSolverMKL< Matrix >::Solve ( ChSystemDescriptor sysd)
overridevirtual

Solve using the MKL Pardiso sparse direct solver.

It uses the matrix factorization obtained at the last call to Setup().

Implements chrono::ChSolver.

template<typename Matrix = ChCSR3Matrix>
virtual bool chrono::ChSolverMKL< Matrix >::SolveRequiresMatrix ( ) const
overridevirtual

Indicate whether or not the Solve() phase requires an up-to-date problem matrix.

As typical of direct solvers, the Pardiso solver only requires the matrix for its Setup() phase.

Implements chrono::ChSolver.