PIPS-NLP
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Ma57Solver Class Reference

#include <Ma57Solver.h>

Inheritance diagram for Ma57Solver:
DoubleLinearSolver

Public Member Functions

 Ma57Solver (SparseSymMatrix *sgm, const int numOfNegEigVal_in=-1)
 
virtual ~Ma57Solver ()
 
virtual void diagonalChanged (int idiag, int extent)
 
virtual int matrixChanged ()
 
virtual void solve (OoqpVector &rhs)
 
virtual void solve (GenMatrix &rhs)
 
void setValTreatAsZero (const double tolTreatAsZero)
 
void setPivotTol (const double tolPivot)
 
- Public Member Functions inherited from DoubleLinearSolver
 DoubleLinearSolver ()
 
virtual void solveTrans (OoqpVector &x)
 
virtual void Lsolve (OoqpVector &x)
 
virtual void Dsolve (OoqpVector &x)
 
virtual void Ltsolve (OoqpVector &x)
 
virtual ~DoubleLinearSolver ()
 

Protected Member Functions

virtual void firstCall ()
 

Protected Attributes

int icntl [20]
 
int info [40]
 
double cntl [5]
 
double rinfo [20]
 
double kThresholdPivoting
 
double kTreatAsZero
 
double kPrecision
 
int * irowM
 
int * jcolM
 
double * M
 
int n
 
int nnz
 
int lkeep
 
int * keep
 
int lifact
 
int * ifact
 
int lfact
 
double * fact
 
double ipessimism
 
double rpessimism
 
SparseStorageHandle mStorage
 

Private Member Functions

 Ma57Solver ()
 
void SetUpMa57Solver (SparseSymMatrix *sgm)
 
void solve (int solveType, OoqpVector &rhs)
 
int * new_iworkn (int dim)
 
double * new_dworkn (int dim)
 

Private Attributes

int * iworkn
 
int niworkn
 
double * dworkn
 
int ndworkn
 

Additional Inherited Members

- Public Attributes inherited from DoubleLinearSolver
int negEigVal
 
int KryIter
 

Detailed Description

implements the linear solver class using the HSL MA57 solver

Constructor & Destructor Documentation

Ma57Solver::Ma57Solver ( )
inlineprivate
Ma57Solver::Ma57Solver ( SparseSymMatrix sgm,
const int  numOfNegEigVal_in = -1 
)
Ma57Solver::~Ma57Solver ( )
virtual

Member Function Documentation

void Ma57Solver::diagonalChanged ( int  idiag,
int  extent 
)
virtual

called if the diagonal elements of the matrix have changed. Triggers a refactorization of the matrix, if necessary.

Parameters
idiagindex of the first diagonal element that changed
extentthe number of diagonal element that changed.

Implements DoubleLinearSolver.

void Ma57Solver::firstCall ( )
protectedvirtual

called the very first time a matrix is factored. Allocates space for the factorization and performs ordering

int Ma57Solver::matrixChanged ( )
virtual

called if some elements of the matrix have changed. Triggers a refactorization of the matrix, if necessary.

Implements DoubleLinearSolver.

double * Ma57Solver::new_dworkn ( int  dim)
private
int * Ma57Solver::new_iworkn ( int  dim)
private
void Ma57Solver::setPivotTol ( const double  tolPivot)
inline

if pivot tolerence in MA57

void Ma57Solver::SetUpMa57Solver ( SparseSymMatrix sgm)
private
void Ma57Solver::setValTreatAsZero ( const double  tolTreatAsZero)
inline

if pivot < this val, treat it as Zero in MA57

void Ma57Solver::solve ( OoqpVector x)
virtual

solves a linear system.

Parameters
xon entry the right hand side of the system to be solved. On exit, the solution.

Implements DoubleLinearSolver.

void Ma57Solver::solve ( GenMatrix rhs)
virtual

Reimplemented from DoubleLinearSolver.

void Ma57Solver::solve ( int  solveType,
OoqpVector rhs 
)
private

SimpleVectorHandle work( new SimpleVector(n) );

Member Data Documentation

double Ma57Solver::cntl[5]
protected
double* Ma57Solver::dworkn
private
double* Ma57Solver::fact
protected
int Ma57Solver::icntl[20]
protected
int * Ma57Solver::ifact
protected
int Ma57Solver::info[40]
protected
double Ma57Solver::ipessimism
protected

amounts by which to increase allocated factorization space when inadequate space is detected. ipessimism is for array "iw", rpessimism is for the array "fact".

int* Ma57Solver::irowM
protected

index array for the factorization

int* Ma57Solver::iworkn
private
int * Ma57Solver::jcolM
protected
int * Ma57Solver::keep
protected
double Ma57Solver::kPrecision
protected

precision we demand from the linear system solver. If it isn't attained on the first solve, we use iterative refinement and possibly refactorization with a higher value of kThresholdPivoting.

double Ma57Solver::kThresholdPivoting
protected

the Threshold Pivoting parameter, stored as U in the ma27dd common block. Takes values in the range [0,1]. Larger values enforce greater stability in the factorization as they insist on larger pivots. Smaller values preserve sparsity at the cost of using smaller pivots.

double Ma57Solver::kTreatAsZero
protected

the "Treat As Zero" parameter, stored as pivtol in the common block ma27td. The factorization will not accept a pivot whose absolute value is less than this parameter as a 1x1 pivot or as the off-diagonal in a 2x2 pivot.

int Ma57Solver::lfact
protected
int Ma57Solver::lifact
protected

temporary storage for the factorization process

int Ma57Solver::lkeep
protected

temporary storage

double* Ma57Solver::M
protected

storage for the original matrix

SparseStorageHandle Ma57Solver::mStorage
protected

store as a sparse symmetric matrix

int Ma57Solver::n
protected

dimension of the whole matrix

int Ma57Solver::ndworkn
private
int Ma57Solver::niworkn
private
int Ma57Solver::nnz
protected

number of nonzeros in the matrix

double Ma57Solver::rinfo[20]
protected
double Ma57Solver::rpessimism
protected

The documentation for this class was generated from the following files: