Description

Base class for sparse direct linear solvers with complex coefficients.

Sparse linear direct solvers A*x=b for complex A,b,x.

These solvers are mostly meant to work in problems of finding eigenpairs, where one might need to compute the shift-and-invert operator during Arnoldi or Krylov-Schur iterations, that might have complex shifts.

#include <ChDirectSolverLScomplex.h>

Inheritance diagram for chrono::ChDirectSolverLScomplex:

Public Member Functions

Eigen::SparseMatrix< std::complex< double >, Eigen::ColMajor > & A ()
 Get shortcut handle to underlying A matrix, for A*x=b.
 
ChVectorDynamic< std::complex< double > > & x ()
 Get shortcut handle to underlying x solution vector, for A*x=b.
 
virtual bool Setup ()
 Perform the solver setup operations (factorization) Returns true if successful and false otherwise.
 
virtual double Solve (const ChVectorDynamic< std::complex< double >> &b)
 Solve linear system.
 

Public Attributes

bool verbose = false
 

Protected Member Functions

virtual bool FactorizeMatrix ()=0
 Factorize the current sparse matrix and return true if successful.
 
virtual bool SolveSystem (const ChVectorDynamic< std::complex< double >> &b)=0
 Solve the linear system using the current factorization and right-hand side vector. More...
 
virtual void PrintErrorMessage ()=0
 Display an error message corresponding to the last failure. More...
 

Protected Attributes

Eigen::SparseMatrix< std::complex< double >, Eigen::ColMajor > m_mat
 problem matrix
 
int m_dim
 problem size
 
ChVectorDynamic< std::complex< double > > m_sol
 solution vector
 

Member Function Documentation

◆ PrintErrorMessage()

virtual void chrono::ChDirectSolverLScomplex::PrintErrorMessage ( )
protectedpure virtual

Display an error message corresponding to the last failure.

This function is only called if Factorize or Solve returned false.

◆ SolveSystem()

virtual bool chrono::ChDirectSolverLScomplex::SolveSystem ( const ChVectorDynamic< std::complex< double >> &  b)
protectedpure virtual

Solve the linear system using the current factorization and right-hand side vector.

Load the solution vector (already of appropriate size) and return true if succesful.


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