PIPS-NLP
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Ma27SolverBase Class Referenceabstract

#include <Ma27Solver.h>

Inheritance diagram for Ma27SolverBase:
DoubleLinearSolver Ma27Solver

Public Member Functions

 Ma27SolverBase (int n, int nnz)
 
double thresholdPivoting ()
 
void setThresholdPivoting (double piv)
 
double treatAsZero ()
 
void setTreatAsZero (double tol)
 
virtual void copyMatrixElements (double fact[], int lfact)=0
 
virtual void getIndices (int irowM[], int jcolM[])=0
 
virtual void diagonalChanged (int idiag, int extent)
 
virtual int matrixChanged ()
 
virtual void basicSolve (double drhs[], int n)
 
virtual void solve (OoqpVector &rhs)=0
 
virtual ~Ma27SolverBase ()
 
- Public Member Functions inherited from DoubleLinearSolver
 DoubleLinearSolver ()
 
virtual void solveTrans (OoqpVector &x)
 
virtual void solve (GenMatrix &rhs)
 
virtual void Lsolve (OoqpVector &x)
 
virtual void Dsolve (OoqpVector &x)
 
virtual void Ltsolve (OoqpVector &x)
 
virtual ~DoubleLinearSolver ()
 

Protected Member Functions

 Ma27SolverBase ()
 
int ierror ()
 
int minimumRealWorkspace ()
 
int minimumIntWorkspace ()
 
int ma27ErrFlg ()
 
virtual void firstCall ()
 

Protected Attributes

int icntl [30]
 
int info [20]
 
double cntl [5]
 
double precision
 
int * irowM
 
int * jcolM
 
double * fact
 
int n
 
int nnz
 
int la
 
int * ikeep
 
int * iw
 
int liw
 
int * iw1
 
int * iw2
 
int nsteps
 
int maxfrt
 
double * w
 
double ipessimism
 
double rpessimism
 

Additional Inherited Members

- Public Attributes inherited from DoubleLinearSolver
int negEigVal
 
int KryIter
 

Detailed Description

implements the linear solver class using the HSL MA27 solver

Constructor & Destructor Documentation

Ma27SolverBase::Ma27SolverBase ( )
inlineprotected
Ma27SolverBase::Ma27SolverBase ( int  n,
int  nnz 
)

base class constructor. Allocates values for kTreatAsZero, kThresholdPivoting, kThresholdPivotingMax, kThresholdPivotingFactor, kPrecision, ipessimism,rpessimism

Ma27SolverBase::~Ma27SolverBase ( )
virtual

destructor

Member Function Documentation

void Ma27SolverBase::basicSolve ( double  drhs[],
int  n 
)
virtual

version of the main solve routine that takes argument as an array of doubles

Parameters
drhson input contains the right-hand side; on output contains the solution
ndimension of the system
virtual void Ma27SolverBase::copyMatrixElements ( double  fact[],
int  lfact 
)
pure virtual

copy elements from matrix into the fact data structure, in preparation for factorization (or refactorization).

Implemented in Ma27Solver.

void Ma27SolverBase::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 Ma27SolverBase::firstCall ( )
protectedvirtual

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

virtual void Ma27SolverBase::getIndices ( int  irowM[],
int  jcolM[] 
)
pure virtual

change format for row/column index matrices, in preparation for call to MA27 FORTRAN routines

Parameters
irowMarray of nnz elements indicating row index (in range 1..n) of the corresponding matrix element
jcolMarray of nnz elements indicating col index (in range 1..n) of the corresponding matrix element

Implemented in Ma27Solver.

int Ma27SolverBase::ierror ( )
inlineprotected

ierror, used by ma27 to send context-specific supplimental info to the user

int Ma27SolverBase::ma27ErrFlg ( )
inlineprotected
int Ma27SolverBase::matrixChanged ( )
virtual

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

Implements DoubleLinearSolver.

int Ma27SolverBase::minimumIntWorkspace ( )
inlineprotected
int Ma27SolverBase::minimumRealWorkspace ( )
inlineprotected
void Ma27SolverBase::setThresholdPivoting ( double  piv)
inline
void Ma27SolverBase::setTreatAsZero ( double  tol)
inline
virtual void Ma27SolverBase::solve ( OoqpVector rhs)
pure virtual

version of the main solve routine that takes argument as an OoqpVector

Parameters
drhson input contains the right-hand side; on output contains the solution
ndimension of the system

Implements DoubleLinearSolver.

Implemented in Ma27Solver.

double Ma27SolverBase::thresholdPivoting ( )
inline

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 Ma27SolverBase::treatAsZero ( )
inline

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.

Member Data Documentation

double Ma27SolverBase::cntl[5]
protected
double* Ma27SolverBase::fact
protected

nonzero element of the factors

int Ma27SolverBase::icntl[30]
protected
int* Ma27SolverBase::ikeep
protected

pivot sequence and temporary storage information

int Ma27SolverBase::info[20]
protected
double Ma27SolverBase::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* Ma27SolverBase::irowM
protected

index array for the factorization

int * Ma27SolverBase::iw
protected
int * Ma27SolverBase::iw1
protected
int * Ma27SolverBase::iw2
protected
int * Ma27SolverBase::jcolM
protected
int Ma27SolverBase::la
protected

length of the array containing factors; may be increased during the numerical factorization if the estimate obtained during the symbolic factorization proves to be inadequate.

int Ma27SolverBase::liw
protected
int Ma27SolverBase::maxfrt
protected
int Ma27SolverBase::n
protected

dimension of the whole matrix

int Ma27SolverBase::nnz
protected

number of nonzeros in the matrix

int Ma27SolverBase::nsteps
protected
double Ma27SolverBase::precision
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 Ma27SolverBase::rpessimism
protected
double* Ma27SolverBase::w
protected

temporary storage for the factorization


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