Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Ma27SolverBase Class Reference
[LinearSolvers]

#include <Ma27Solver.h>

Inheritance diagram for Ma27SolverBase:

DoubleLinearSolver Ma27Solver List of all members.

Public Methods

 Ma27SolverBase (int n, int nnz)
double thresholdPivoting ()
double treatAsZero ()
virtual void copyMatrixElements (double fact[], int lfact)=0
virtual void getIndices (int irowM[], int jcolM[])=0
virtual void diagonalChanged (int idiag, int extent)
virtual void matrixChanged ()
virtual void basicSolve (double drhs[], int n)
virtual void solve (OoqpVector &rhs)=0
virtual ~Ma27SolverBase ()

Protected Methods

int ierror ()
virtual void firstCall ()

Protected Attributes

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

Detailed Description

implements the linear solver class using the HSL MA27 solver


Constructor & Destructor Documentation

Ma27SolverBase::Ma27SolverBase int    n,
int    nnz
 

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

virtual Ma27SolverBase::~Ma27SolverBase   [virtual]
 

destructor


Member Function Documentation

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

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

Parameters:
drhs  on input contains the right-hand side; on output contains the solution
n  dimension 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.

virtual 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:
idiag  index of the first diagonal element that changed
extent  the number of diagonal element that changed.

Implements DoubleLinearSolver.

virtual void Ma27SolverBase::firstCall   [protected, virtual]
 

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:
irowM  array of nnz elements indicating row index (in range 1..n) of the corresponding matrix element
jcolM  array of nnz elements indicating col index (in range 1..n) of the corresponding matrix element

Implemented in Ma27Solver.

int Ma27SolverBase::ierror   [inline, protected]
 

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

virtual void Ma27SolverBase::matrixChanged   [virtual]
 

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

Implements DoubleLinearSolver.

virtual void Ma27SolverBase::solve OoqpVector   rhs [pure virtual]
 

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

Parameters:
drhs  on input contains the right-hand side; on output contains the solution
n  dimension 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::fact [protected]
 

nonzero element of the factors

int* Ma27SolverBase::ikeep [protected]
 

pivot sequence and temporary storage information

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]
 

pivot sequence and temporary storage information

int * Ma27SolverBase::iw1 [protected]
 

pivot sequence and temporary storage information

int * Ma27SolverBase::iw2 [protected]
 

pivot sequence and temporary storage information

int * Ma27SolverBase::jcolM [protected]
 

index array for the factorization

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]
 

pivot sequence and temporary storage information

int Ma27SolverBase::maxfrt [protected]
 

pivot sequence and temporary storage information

int Ma27SolverBase::n [protected]
 

dimension of the whole matrix

int Ma27SolverBase::nnz [protected]
 

number of nonzeros in the matrix

int Ma27SolverBase::nsteps [protected]
 

pivot sequence and temporary storage information

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]
 

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

double* Ma27SolverBase::w [protected]
 

temporary storage for the factorization


The documentation for this class was generated from the following file:
Generated on Mon May 24 17:40:46 2004 for OOQP by doxygen1.2.18