Description

Wrapper class for the PardisoProject direct linear solver.

This solver is not appropriate for VI and complementarity problems.

Warning
{[WARNING for DEVELOPERS]: please consider that the solver does not handle C-like arrays so the matrices have to be set to one-indexed format manually. Appropriate instructions have been put to avoid passing back the matrix in one-indexed state when not possible}

#include <ChPardisoProjectEngine.h>

Public Types

enum  parproj_SYM { STRUCTURAL_SYMMETRIC = 1, SYMMETRIC_POSDEF = 2, SYMMETRIC_GENERAL = -2, UNSYMMETRIC = 11 }
 
enum  parproj_PHASE {
  END = -1, ANALYZE = 11, ANALYZE_FACTORIZE = 12, FACTORIZE = 22,
  SOLVE = 33, FACTORIZE_SOLVE = 23, COMPLETE = 13, SELECTED_INVERSION = -22
}
 

Public Member Functions

 ChPardisoProjectEngine (parproj_SYM symmetry)
 
void SetProblem (const ChSparseMatrix &Z, ChVectorRef rhs, ChVectorRef sol)
 Set the problem matrix and the right-hand side.
 
void SetMatrix (const ChSparseMatrix &Z, bool isZeroIndexed=true)
 Set the problem matrix.
 
void SetMatrix (int n, int *ia, int *ja, double *a, bool isZeroIndexed=true)
 
void SetMatrixSymmetry (parproj_SYM symmetry)
 Set a new value for symmetry. More...
 
void SetRhsVector (ChVectorRef b)
 Set the right-hand side vector. More...
 
void SetRhsVector (double *b)
 
void SetSolutionVector (ChVectorRef x)
 Set the solution vector. More...
 
void SetSolutionVector (double *x)
 
int PardisoProjectCall (parproj_PHASE job_call)
 Submit job to PardisoProject.
 
int CheckMatrix (bool print=true)
 Check if the input matrix is in the appropriate form.
 
int CheckRhsVectors (bool print=true)
 Check if the rhs vector is in the appropriate form.
 
int CheckMatrixStats (bool print=true)
 Check if the input matrix has appropriate properties.
 
int GetIPARM (int id) const
 Return the value of the i-th IPARM coefficient; consider that is in zero-indexed format.
 
void SetIPARM (int id, int val)
 Set the value of the i-th IPARM coefficient; consider that is in zero-indexed format.
 
double GetDPARM (int id) const
 Return the value of the i-th DPARM coefficient; consider that is in zero-indexed format.
 
void SetDPARM (int id, int val)
 Set the value of the i-th DPARM coefficient; consider that is in zero-indexed format.
 
int GetLastError ()
 Return the value of the error flag.
 
void SetZeroIndexedFormat ()
 Set the index of the underlying arrays to zero-indexed.
 
void SetOneIndexedFormat ()
 Set the index of the underlying arrays to one-indexed.
 
void SetSolverType (bool directsparse=true)
 Set the solver type. More...
 
void Reinit ()
 Reinitialize the solver (e.g. when a new symmetry option is set)
 
void SetMessageLevel (int msglvl)
 Set the message level verbosity (0: no messages, 1:print stats). (Default: 0)
 
void SetMaxNumericalFactorization (int maxfct)
 Set the maximum number of numerical factorizations.
 
void GetSchurComplement (ChSparseMatrix &Z, int nrows)
 Set the maximum number of numerical factorizations.
 

Protected Member Functions

void shiftMatrixIndices (int *ext_ia, int *ext_ja, double *ext_a, int ext_n, int val, bool isOneIndexed)
 Shift the matrix indeces of the internal matrix arrays of a value of val.
 
void shiftInternalMatrixIndices (int val)
 Shift the matrix indeces of a value of val.
 
bool getMatrixInternalArrays (ChSparseMatrix &sparseMat, int **ext_ia, int **ext_ja, double **ext_a)
 Get internal arrays of sparse matrix.
 

Member Enumeration Documentation

◆ parproj_SYM

Enumerator
STRUCTURAL_SYMMETRIC 

real and structurally symmetric, supernode pivoting

SYMMETRIC_POSDEF 

real and symmetric positive definite

SYMMETRIC_GENERAL 

real and symmetric indefinite, diagonal or Bunch-Kaufman pivoting

UNSYMMETRIC 

real and nonsymmetric, complete supernode pivoting

Member Function Documentation

◆ SetMatrixSymmetry()

void chrono::ChPardisoProjectEngine::SetMatrixSymmetry ( parproj_SYM  symmetry)

Set a new value for symmetry.

Warning
{This function triggers a Reinit()}

◆ SetRhsVector()

void chrono::ChPardisoProjectEngine::SetRhsVector ( ChVectorRef  b)

Set the right-hand side vector.

Note that it is the caller's responsibility to ensure that the size is appropriate.

◆ SetSolutionVector()

void chrono::ChPardisoProjectEngine::SetSolutionVector ( ChVectorRef  x)

Set the solution vector.

Note that it is the caller's responsibility to ensure that the size is appropriate.

◆ SetSolverType()

void chrono::ChPardisoProjectEngine::SetSolverType ( bool  directsparse = true)
inline

Set the solver type.

directsparse = true for direct sparse solver, false for multi-recursive iterative solver.

Warning
{This function triggers a Reinit()}

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_pardisoproject/ChPardisoProjectEngine.h
  • /builds/uwsbel/chrono/src/chrono_pardisoproject/ChPardisoProjectEngine.cpp