Base class for all iterative solvers.

#include <ChIterativeSolverParallel.h>

Inheritance diagram for chrono::ChIterativeSolverParallel:
Collaboration diagram for chrono::ChIterativeSolverParallel:

Public Member Functions

virtual double Solve (ChSystemDescriptor &sysd)
 Each child class must define its own solve method.
virtual void RunTimeStep ()=0
 Similarly, the run timestep function needs to be defined.
virtual void ComputeImpulses ()=0
 This function computes the new velocities based on the lagrange multipliers.
void ComputeInvMassMatrix ()
 Compute the inverse mass matrix and the term v+M_inv*hf.
void ComputeMassMatrix ()
 Compute mass matrix.
void PerformStabilization ()
 Solves just the bilaterals so that they can be warm started.
real GetResidual ()
- Public Member Functions inherited from chrono::ChIterativeSolver
 ChIterativeSolver (int mmax_iters=50, bool mwarm_start=false, double mtolerance=0.0, double momega=1.0, double mshlambda=1.0)
virtual bool SolveRequiresMatrix () const override
 Indicate whether ot not the Solve() phase requires an up-to-date problem matrix. More...
void SetMaxIterations (int mval)
 Set the maximum number of iterations. More...
int GetMaxIterations () const
 Get the current value for the maximum allowed number of iterations.
int GetTotalIterations () const
 Get the number of total iterations taken by the solver.
void SetOmega (double mval)
 Set the overrelaxation factor. More...
double GetOmega () const
 Return the current value of the overrelaxation factor.
virtual void SetSharpnessLambda (double mval)
 Set the sharpness factor. More...
virtual double GetSharpnessLambda () const
 Return the current value of the sharpness factor.
void SetWarmStart (bool mval)
 Enable/disable 'warm start'. More...
bool GetWarmStart () const
 Return a flag indicating whether or not warm start is enabled.
void SetTolerance (double mval)
 Set the tolerance for stopping criterion. More...
double GetTolerance () const
 Return the current value of the solver tolerance.
void SetRecordViolation (bool mval)
 Enable/disable recording of the constraint violation history. More...
bool GetRecordViolation () const
 Return a flag indicating whether or not constraint violations are recorded.
const std::vector< double > & GetViolationHistory () const
 Access the vector of constraint violation history. More...
const std::vector< double > & GetDeltalambdaHistory () const
 Access the vector with history of maximum change in Lagrange multipliers Note that collection of constraint violations must be enabled through SetRecordViolation. More...
- Public Member Functions inherited from chrono::ChSolver
virtual Type GetType () const
 Return type of the solver. More...
virtual bool Setup (ChSystemDescriptor &sysd)
 This function does the setup operations for the solver. More...
void SetVerbose (bool mv)
 Set verbose output from solver.
bool GetVerbose () const

Public Attributes


Protected Member Functions

 ChIterativeSolverParallel (ChParallelDataManager *dc)
- Protected Member Functions inherited from chrono::ChIterativeSolver
void AtIterationEnd (double mmaxviolation, double mdeltalambda, unsigned int iternum)
 This method MUST be called by all iterative methods INSIDE their iteration loops (at the end). 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.

Protected Attributes

ChShurProductBilateral ShurProductBilateral
ChShurProductFEM ShurProductFEM
ChProjectNone ProjectNone
- Protected Attributes inherited from chrono::ChIterativeSolver
int max_iterations
 maximum allowed iterations
int tot_iterations
 total number of iterations performed by the solver
bool warm_start
 indicate whether or not to use warm starting
double tolerance
 tolerance for termination criteria
double omega
 over-relaxation factor
double shlambda
 sharpness factor
bool record_violation_history
std::vector< double > violation_history
std::vector< double > dlambda_history
- Protected Attributes inherited from chrono::ChSolver
bool verbose

Additional Inherited Members

- Public Types inherited from chrono::ChSolver
enum  Type {
 Available types of solvers.