Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::Ma77SolverInterface Class Reference

#include <IpMa77SolverInterface.hpp>

+ Inheritance diagram for Ipopt::Ma77SolverInterface:

Public Member Functions

 Ma77SolverInterface (SmartPtr< LibraryLoader > hslloader_)
 
 ~Ma77SolverInterface ()
 
bool InitializeImpl (const OptionsList &options, const std::string &prefix)
 Implementation of the initialization method that has to be overloaded by for each derived class.
 
Methods for requesting solution of the linear system.
ESymSolverStatus InitializeStructure (Index dim, Index nonzeros, const Index *ia, const Index *ja)
 Method for initializing internal structures.
 
NumberGetValuesArrayPtr ()
 Method returning an internal array into which the nonzero elements (in the same order as ja) will be stored by the calling routine before a call to MultiSolve with a new_matrix=true (or after a return of MultiSolve with SYMSOLV_CALL_AGAIN).
 
ESymSolverStatus MultiSolve (bool new_matrix, const Index *ia, const Index *ja, Index nrhs, Number *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)
 Solve operation for multiple right hand sides.
 
Index NumberOfNegEVals () const
 Number of negative eigenvalues detected during last factorization.
 
bool IncreaseQuality ()
 Request to increase quality of solution for next solve.
 
bool ProvidesInertia () const
 Query whether inertia is computed by linear solver.
 
EMatrixFormat MatrixFormat () const
 Query of requested matrix type that the linear solver understands.
 
Methods related to the detection of linearly dependent

rows in a matrix

bool ProvidesDegeneracyDetection () const
 Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.
 
ESymSolverStatus DetermineDependentRows (const Index *, const Index *, std::list< Index > &)
 This method determines the list of row indices of the linearly dependent rows.
 
- Public Member Functions inherited from Ipopt::SparseSymLinearSolverInterface
 SparseSymLinearSolverInterface ()
 
virtual ~SparseSymLinearSolverInterface ()
 
- Public Member Functions inherited from Ipopt::AlgorithmStrategyObject
bool Initialize (const Journalist &jnlst, IpoptNLP &ip_nlp, IpoptData &ip_data, IpoptCalculatedQuantities &ip_cq, const OptionsList &options, const std::string &prefix)
 This method is called every time the algorithm starts again - it is used to reset any internal state.
 
bool ReducedInitialize (const Journalist &jnlst, const OptionsList &options, const std::string &prefix)
 Reduced version of the Initialize method, which does not require special Ipopt information.
 
 AlgorithmStrategyObject ()
 Default Constructor.
 
virtual ~AlgorithmStrategyObject ()
 Destructor.
 
- Public Member Functions inherited from Ipopt::ReferencedObject
 ReferencedObject ()
 
virtual ~ReferencedObject ()
 
Index ReferenceCount () const
 
void AddRef (const Referencer *referencer) const
 
void ReleaseRef (const Referencer *referencer) const
 

Static Public Member Functions

static void RegisterOptions (SmartPtr< RegisteredOptions > roptions)
 
static void SetFunctions (IPOPT_DECL_MA77_DEFAULT_CONTROL(*ma77_default_control), IPOPT_DECL_MA77_OPEN_NELT(*ma77_open_nelt), IPOPT_DECL_MA77_OPEN(*ma77_open), IPOPT_DECL_MA77_INPUT_VARS(*ma77_input_vars), IPOPT_DECL_MA77_INPUT_REALS(*ma77_input_reals), IPOPT_DECL_MA77_ANALYSE(*ma77_analyse), IPOPT_DECL_MA77_FACTOR(*ma77_factor), IPOPT_DECL_MA77_FACTOR_SOLVE(*ma77_factor_solve), IPOPT_DECL_MA77_SOLVE(*ma77_solve), IPOPT_DECL_MA77_RESID(*ma77_resid), IPOPT_DECL_MA77_SCALE(*ma77_scale), IPOPT_DECL_MA77_ENQUIRE_POSDEF(*ma77_enquire_posdef), IPOPT_DECL_MA77_ENQUIRE_INDEF(*ma77_enquire_indef), IPOPT_DECL_MA77_ALTER(*ma77_alter), IPOPT_DECL_MA77_RESTART(*ma77_restart), IPOPT_DECL_MA77_FINALISE(*ma77_finalise), IPOPT_DECL_MC68_DEFAULT_CONTROL(*mc68_default_control),)
 set MA77 and MC68 functions to use for every instantiation of this class
 

Private Types

enum  order_opts { ORDER_AMD , ORDER_METIS }
 

Private Attributes

int ndim_
 Number of dimensions.
 
Numberval_
 Storage for variables.
 
int numneg_
 Number of negative pivots in last factorization.
 
voidkeep_
 Stores pointer to factors (only understood by Fortran code!)
 
bool pivtol_changed_
 indicates if pivtol has been changed
 
struct ma77_control control_
 
Number umax_
 
int ordering_
 
MA77 and MC68 function pointers
SmartPtr< LibraryLoaderhslloader
 
IPOPT_DECL_MA77_DEFAULT_CONTROLma77_default_control
 
IPOPT_DECL_MA77_OPEN_NELTma77_open_nelt
 
IPOPT_DECL_MA77_OPENma77_open
 
IPOPT_DECL_MA77_INPUT_VARSma77_input_vars
 
IPOPT_DECL_MA77_INPUT_REALSma77_input_reals
 
IPOPT_DECL_MA77_ANALYSEma77_analyse
 
IPOPT_DECL_MA77_FACTORma77_factor
 
IPOPT_DECL_MA77_FACTOR_SOLVEma77_factor_solve
 
IPOPT_DECL_MA77_SOLVEma77_solve
 
IPOPT_DECL_MA77_RESIDma77_resid
 
IPOPT_DECL_MA77_SCALEma77_scale
 
IPOPT_DECL_MA77_ENQUIRE_POSDEFma77_enquire_posdef
 
IPOPT_DECL_MA77_ENQUIRE_INDEFma77_enquire_indef
 
IPOPT_DECL_MA77_ALTERma77_alter
 
IPOPT_DECL_MA77_RESTARTma77_restart
 
IPOPT_DECL_MA77_FINALISEma77_finalise
 
IPOPT_DECL_MC68_DEFAULT_CONTROLmc68_default_control
 
IPOPT_DECL_MC68_ORDERmc68_order
 

Additional Inherited Members

- Public Types inherited from Ipopt::SparseSymLinearSolverInterface
enum  EMatrixFormat {
  Triplet_Format , CSR_Format_0_Offset , CSR_Format_1_Offset , CSR_Full_Format_0_Offset ,
  CSR_Full_Format_1_Offset
}
 Enum to specify sparse matrix format. More...
 
- Protected Member Functions inherited from Ipopt::AlgorithmStrategyObject
const JournalistJnlst () const
 
IpoptNLPIpNLP () const
 
IpoptDataIpData () const
 
IpoptCalculatedQuantitiesIpCq () const
 
bool HaveIpData () const
 

Detailed Description

Definition at line 203 of file IpMa77SolverInterface.hpp.

Member Enumeration Documentation

◆ order_opts

Enumerator
ORDER_AMD 
ORDER_METIS 

Definition at line 206 of file IpMa77SolverInterface.hpp.

Constructor & Destructor Documentation

◆ Ma77SolverInterface()

Ipopt::Ma77SolverInterface::Ma77SolverInterface ( SmartPtr< LibraryLoader hslloader_)
inline
Parameters
hslloader_
Since
3.14.0

Definition at line 250 of file IpMa77SolverInterface.hpp.

◆ ~Ma77SolverInterface()

Ipopt::Ma77SolverInterface::~Ma77SolverInterface ( )

Member Function Documentation

◆ RegisterOptions()

static void Ipopt::Ma77SolverInterface::RegisterOptions ( SmartPtr< RegisteredOptions roptions)
static

◆ SetFunctions()

static void Ipopt::Ma77SolverInterface::SetFunctions ( IPOPT_DECL_MA77_DEFAULT_CONTROL ma77_default_control,
IPOPT_DECL_MA77_OPEN_NELT ma77_open_nelt,
IPOPT_DECL_MA77_OPEN ma77_open,
IPOPT_DECL_MA77_INPUT_VARS ma77_input_vars,
IPOPT_DECL_MA77_INPUT_REALS ma77_input_reals,
IPOPT_DECL_MA77_ANALYSE ma77_analyse,
IPOPT_DECL_MA77_FACTOR ma77_factor,
IPOPT_DECL_MA77_FACTOR_SOLVE ma77_factor_solve,
IPOPT_DECL_MA77_SOLVE ma77_solve,
IPOPT_DECL_MA77_RESID ma77_resid,
IPOPT_DECL_MA77_SCALE ma77_scale,
IPOPT_DECL_MA77_ENQUIRE_POSDEF ma77_enquire_posdef,
IPOPT_DECL_MA77_ENQUIRE_INDEF ma77_enquire_indef,
IPOPT_DECL_MA77_ALTER ma77_alter,
IPOPT_DECL_MA77_RESTART ma77_restart,
IPOPT_DECL_MA77_FINALISE ma77_finalise,
IPOPT_DECL_MC68_DEFAULT_CONTROL mc68_default_control 
)
static

set MA77 and MC68 functions to use for every instantiation of this class

Since
3.14.0

◆ InitializeImpl()

bool Ipopt::Ma77SolverInterface::InitializeImpl ( const OptionsList options,
const std::string &  prefix 
)
virtual

Implementation of the initialization method that has to be overloaded by for each derived class.

Implements Ipopt::SparseSymLinearSolverInterface.

◆ InitializeStructure()

ESymSolverStatus Ipopt::Ma77SolverInterface::InitializeStructure ( Index  dim,
Index  nonzeros,
const Index ia,
const Index ja 
)
virtual

Method for initializing internal structures.

Here, ndim gives the number of rows and columns of the matrix, nonzeros give the number of nonzero elements, and ia and ja give the positions of the nonzero elements, given in the matrix format determined by MatrixFormat.

Implements Ipopt::SparseSymLinearSolverInterface.

◆ GetValuesArrayPtr()

Number * Ipopt::Ma77SolverInterface::GetValuesArrayPtr ( )
inlinevirtual

Method returning an internal array into which the nonzero elements (in the same order as ja) will be stored by the calling routine before a call to MultiSolve with a new_matrix=true (or after a return of MultiSolve with SYMSOLV_CALL_AGAIN).

The returned array must have space for at least nonzero elements.

Implements Ipopt::SparseSymLinearSolverInterface.

Definition at line 319 of file IpMa77SolverInterface.hpp.

◆ MultiSolve()

ESymSolverStatus Ipopt::Ma77SolverInterface::MultiSolve ( bool  new_matrix,
const Index ia,
const Index ja,
Index  nrhs,
Number rhs_vals,
bool  check_NegEVals,
Index  numberOfNegEVals 
)
virtual

Solve operation for multiple right hand sides.

Solves the linear system A * x = b with multiple right hand sides, where A is the symmetric indefinite matrix. Here, ia and ja give the positions of the values (in the required matrix data format). The actual values of the matrix will have been given to this object by copying them into the array provided by GetValuesArrayPtr. ia and ja are identical to the ones given to InitializeStructure. The flag new_matrix is set to true, if the values of the matrix has changed, and a refactorization is required.

Returns
SYMSOLV_SUCCESS if the factorization and solves were successful, SYMSOLV_SINGULAR if the linear system is singular, and SYMSOLV_WRONG_INERTIA if check_NegEVals is true and the number of negative eigenvalues in the matrix does not match numberOfNegEVals. If SYMSOLV_CALL_AGAIN is returned, then the calling function will request the pointer for the array for storing a again (with GetValuesPtr), write the values of the nonzero elements into it, and call this MultiSolve method again with the same right-hand sides. (This can be done, for example, if the linear solver realized it does not have sufficient memory and needs to redo the factorization; e.g., for MA27.)

The number of right-hand sides is given by nrhs, the values of the right-hand sides are given in rhs_vals (one full right-hand side stored immediately after the other), and solutions are to be returned in the same array.

check_NegEVals will not be chosen true, if ProvidesInertia() returns false.

Implements Ipopt::SparseSymLinearSolverInterface.

◆ NumberOfNegEVals()

Index Ipopt::Ma77SolverInterface::NumberOfNegEVals ( ) const
inlinevirtual

Number of negative eigenvalues detected during last factorization.

Returns
the number of negative eigenvalues of the most recent factorized matrix.

This must not be called if the linear solver does not compute this quantities (see ProvidesInertia).

Implements Ipopt::SparseSymLinearSolverInterface.

Definition at line 334 of file IpMa77SolverInterface.hpp.

◆ IncreaseQuality()

bool Ipopt::Ma77SolverInterface::IncreaseQuality ( )
virtual

Request to increase quality of solution for next solve.

The calling class asks linear solver to increase quality of solution for the next solve (e.g. increase pivot tolerance).

Returns
false, if this is not possible (e.g. maximal pivot tolerance already used.)

Implements Ipopt::SparseSymLinearSolverInterface.

◆ ProvidesInertia()

bool Ipopt::Ma77SolverInterface::ProvidesInertia ( ) const
inlinevirtual

Query whether inertia is computed by linear solver.

Returns
true, if linear solver provides inertia

Implements Ipopt::SparseSymLinearSolverInterface.

Definition at line 344 of file IpMa77SolverInterface.hpp.

◆ MatrixFormat()

EMatrixFormat Ipopt::Ma77SolverInterface::MatrixFormat ( ) const
inlinevirtual

Query of requested matrix type that the linear solver understands.

Implements Ipopt::SparseSymLinearSolverInterface.

Definition at line 349 of file IpMa77SolverInterface.hpp.

◆ ProvidesDegeneracyDetection()

bool Ipopt::Ma77SolverInterface::ProvidesDegeneracyDetection ( ) const
inlinevirtual

Query whether the indices of linearly dependent rows/columns can be determined by this linear solver.

Reimplemented from Ipopt::SparseSymLinearSolverInterface.

Definition at line 358 of file IpMa77SolverInterface.hpp.

◆ DetermineDependentRows()

ESymSolverStatus Ipopt::Ma77SolverInterface::DetermineDependentRows ( const Index ,
const Index ,
std::list< Index > &   
)
inlinevirtual

This method determines the list of row indices of the linearly dependent rows.

Reimplemented from Ipopt::SparseSymLinearSolverInterface.

Definition at line 363 of file IpMa77SolverInterface.hpp.

Member Data Documentation

◆ ndim_

int Ipopt::Ma77SolverInterface::ndim_
private

Number of dimensions.

Definition at line 212 of file IpMa77SolverInterface.hpp.

◆ val_

Number* Ipopt::Ma77SolverInterface::val_
private

Storage for variables.

Definition at line 213 of file IpMa77SolverInterface.hpp.

◆ numneg_

int Ipopt::Ma77SolverInterface::numneg_
private

Number of negative pivots in last factorization.

Definition at line 214 of file IpMa77SolverInterface.hpp.

◆ keep_

void* Ipopt::Ma77SolverInterface::keep_
private

Stores pointer to factors (only understood by Fortran code!)

Definition at line 215 of file IpMa77SolverInterface.hpp.

◆ pivtol_changed_

bool Ipopt::Ma77SolverInterface::pivtol_changed_
private

indicates if pivtol has been changed

Definition at line 216 of file IpMa77SolverInterface.hpp.

◆ control_

struct ma77_control Ipopt::Ma77SolverInterface::control_
private

Definition at line 219 of file IpMa77SolverInterface.hpp.

◆ umax_

Number Ipopt::Ma77SolverInterface::umax_
private

Definition at line 220 of file IpMa77SolverInterface.hpp.

◆ ordering_

int Ipopt::Ma77SolverInterface::ordering_
private

Definition at line 221 of file IpMa77SolverInterface.hpp.

◆ hslloader

SmartPtr<LibraryLoader> Ipopt::Ma77SolverInterface::hslloader
private

Definition at line 226 of file IpMa77SolverInterface.hpp.

◆ ma77_default_control

IPOPT_DECL_MA77_DEFAULT_CONTROL* Ipopt::Ma77SolverInterface::ma77_default_control
private

Definition at line 228 of file IpMa77SolverInterface.hpp.

◆ ma77_open_nelt

IPOPT_DECL_MA77_OPEN_NELT* Ipopt::Ma77SolverInterface::ma77_open_nelt
private

Definition at line 229 of file IpMa77SolverInterface.hpp.

◆ ma77_open

IPOPT_DECL_MA77_OPEN* Ipopt::Ma77SolverInterface::ma77_open
private

Definition at line 230 of file IpMa77SolverInterface.hpp.

◆ ma77_input_vars

IPOPT_DECL_MA77_INPUT_VARS* Ipopt::Ma77SolverInterface::ma77_input_vars
private

Definition at line 231 of file IpMa77SolverInterface.hpp.

◆ ma77_input_reals

IPOPT_DECL_MA77_INPUT_REALS* Ipopt::Ma77SolverInterface::ma77_input_reals
private

Definition at line 232 of file IpMa77SolverInterface.hpp.

◆ ma77_analyse

IPOPT_DECL_MA77_ANALYSE* Ipopt::Ma77SolverInterface::ma77_analyse
private

Definition at line 233 of file IpMa77SolverInterface.hpp.

◆ ma77_factor

IPOPT_DECL_MA77_FACTOR* Ipopt::Ma77SolverInterface::ma77_factor
private

Definition at line 234 of file IpMa77SolverInterface.hpp.

◆ ma77_factor_solve

IPOPT_DECL_MA77_FACTOR_SOLVE* Ipopt::Ma77SolverInterface::ma77_factor_solve
private

Definition at line 235 of file IpMa77SolverInterface.hpp.

◆ ma77_solve

IPOPT_DECL_MA77_SOLVE* Ipopt::Ma77SolverInterface::ma77_solve
private

Definition at line 236 of file IpMa77SolverInterface.hpp.

◆ ma77_resid

IPOPT_DECL_MA77_RESID* Ipopt::Ma77SolverInterface::ma77_resid
private

Definition at line 237 of file IpMa77SolverInterface.hpp.

◆ ma77_scale

IPOPT_DECL_MA77_SCALE* Ipopt::Ma77SolverInterface::ma77_scale
private

Definition at line 238 of file IpMa77SolverInterface.hpp.

◆ ma77_enquire_posdef

IPOPT_DECL_MA77_ENQUIRE_POSDEF* Ipopt::Ma77SolverInterface::ma77_enquire_posdef
private

Definition at line 239 of file IpMa77SolverInterface.hpp.

◆ ma77_enquire_indef

IPOPT_DECL_MA77_ENQUIRE_INDEF* Ipopt::Ma77SolverInterface::ma77_enquire_indef
private

Definition at line 240 of file IpMa77SolverInterface.hpp.

◆ ma77_alter

IPOPT_DECL_MA77_ALTER* Ipopt::Ma77SolverInterface::ma77_alter
private

Definition at line 241 of file IpMa77SolverInterface.hpp.

◆ ma77_restart

IPOPT_DECL_MA77_RESTART* Ipopt::Ma77SolverInterface::ma77_restart
private

Definition at line 242 of file IpMa77SolverInterface.hpp.

◆ ma77_finalise

IPOPT_DECL_MA77_FINALISE* Ipopt::Ma77SolverInterface::ma77_finalise
private

Definition at line 243 of file IpMa77SolverInterface.hpp.

◆ mc68_default_control

IPOPT_DECL_MC68_DEFAULT_CONTROL* Ipopt::Ma77SolverInterface::mc68_default_control
private

Definition at line 244 of file IpMa77SolverInterface.hpp.

◆ mc68_order

IPOPT_DECL_MC68_ORDER* Ipopt::Ma77SolverInterface::mc68_order
private

Definition at line 245 of file IpMa77SolverInterface.hpp.


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