chrono::ChSolverMumps Class Reference

Description

Class that leverages the MUMPS library in order to solve Chrono problems.

It can solve linear systems. It cannot solve VI and complementarity problems.

#include <ChSolverMumps.h>

Inheritance diagram for chrono::ChSolverMumps:
Collaboration diagram for chrono::ChSolverMumps:

Public Member Functions

void ResetTimers ()
 Reset timers for internal phases in Solve and Setup.
 
void SetSparsityPatternLock (bool val)
 Enable/disable locking of the sparsity pattern (default: false). More...
 
void ForceSparsityPatternUpdate (bool val=true)
 Call an update of the sparsity pattern on the underlying matrix. More...
 
void SetNullPivotDetection (bool val, double threshold=0)
 
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.
 
int GetNumSetupCalls () const
 Return the number of calls to the solver's Setup function.
 
int GetNumSolveCalls () const
 Return the number of calls to the solver's Setup function.
 
bool Setup (ChSystemDescriptor &sysd) override
 This function does the setup operations for the solver. More...
 
double Solve (ChSystemDescriptor &sysd) override
 Solve using MUMPS. More...
 
bool SolveRequiresMatrix () const override
 Indicate whether or not the Solve() phase requires an up-to-date problem matrix. More...
 
ChMumpsEngineGetMumpsEngine ()
 
- 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
 
virtual void ArchiveOUT (ChArchiveOut &marchive)
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 Method to allow de-serialization of transient data from archives.
 

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

void chrono::ChSolverMumps::ForceSparsityPatternUpdate ( bool  val = true)

Call an update of the sparsity 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.

void chrono::ChSolverMumps::SetSparsityPatternLock ( bool  val)

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

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

bool chrono::ChSolverMumps::Setup ( ChSystemDescriptor sysd)
overridevirtual

This function does the setup operations for the solver.

The purpose of this function is to prepare the solver for subsequent calls to the solve function. This function is called only as frequently it is determined that it is appropriate to perform the setup phase.

Reimplemented from chrono::ChSolver.

double chrono::ChSolverMumps::Solve ( ChSystemDescriptor sysd)
overridevirtual

Solve using MUMPS.

sysd is the system description with constraints and variables.

Parameters
sysdsystem description with constraints and variables

Implements chrono::ChSolver.

bool chrono::ChSolverMumps::SolveRequiresMatrix ( ) const
overridevirtual

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

Typically, direct solvers only need the matrix for the Setup() phase. However, iterative solvers likely require the matrix to perform the necessary matrix-vector operations.

Implements chrono::ChSolver.