7#ifndef __IPMA27TSOLVERINTERFACE_HPP__
8#define __IPMA27TSOLVERINTERFACE_HPP__
15#define IPOPT_DECL_MA27A(x) void (x)( \
33#define IPOPT_DECL_MA27B(x) void (x)( \
52#define IPOPT_DECL_MA27C(x) void (x)( \
68#define IPOPT_DECL_MA27I(x) void (x)( \
94 const std::string& prefix
115 Index numberOfNegEVals);
293 Index numberOfNegEVals
#define IPOPT_DECL_MA27C(x)
#define IPOPT_DECL_MA27I(x)
#define IPOPT_DECL_MA27B(x)
#define IPOPT_DECL_MA27A(x)
Interface to the symmetric linear solver MA27, derived from SparseSymLinearSolverInterface.
SmartPtr< LibraryLoader > hslloader
bool InitializeImpl(const OptionsList &options, const std::string &prefix)
Implementation of the initialization method that has to be overloaded by for each derived class.
Number pivtol_
Pivot tolerance.
ESymSolverStatus Backsolve(Index nrhs, Number *rhs_vals)
Call MA27CX to do the backsolve.
virtual Index NumberOfNegEVals() const
Number of negative eigenvalues detected during last factorization.
virtual Number * GetValuesArrayPtr()
Method returning an internal array into which the nonzero elements (in the same order as ja) will be ...
bool initialized_
Flag indicating if internal data is initialized.
static void SetFunctions(IPOPT_DECL_MA27A(*ma27a), IPOPT_DECL_MA27B(*ma27b), IPOPT_DECL_MA27C(*ma27c),)
set MA27 functions to use for every instantiation of this class
virtual ~Ma27TSolverInterface()
Destructor.
Ma27TSolverInterface(const Ma27TSolverInterface &)
Copy Constructor.
bool refactorize_
Flag that is true if we just requested the values of the matrix again (SYMSOLVER_CALL_AGAIN) and have...
Number * a_
factor A of matrix
Index liw_
length of integer work space
Index icntl_[30]
integer control values
virtual bool IncreaseQuality()
Request to increase quality of solution for next solve.
Number la_init_factor_
Factor for estimating initial value of la.
static void RegisterOptions(SmartPtr< RegisteredOptions > roptions)
bool ignore_singularity_
Flag indicating if MA27 should continue if a singular matrix is detected, but right hands sides are s...
Ma27TSolverInterface(SmartPtr< LibraryLoader > hslloader_)
Constructor.
Index nsteps_
MA27's NSTEPS.
bool warm_start_same_structure_
Flag indicating whether the TNLP with identical structure has already been solved before.
virtual ESymSolverStatus InitializeStructure(Index dim, Index nonzeros, const Index *airn, const Index *ajcn)
Method for initializing internal structures.
Number liw_init_factor_
Factor for estimating initial value of liw.
ESymSolverStatus SymbolicFactorization(const Index *airn, const Index *ajcn)
Call MA27AX and reserve memory for MA27 data.
bool skip_inertia_check_
Flag indicating if the inertia is always assumed to be correct.
void operator=(const Ma27TSolverInterface &)
Default Assignment Operator.
bool liw_increase_
flag indicating that liw should be increased before next factorization
EMatrixFormat MatrixFormat() const
Query of requested matrix type that the linear solver understands.
Index maxfrt_
MA27's MAXFRT.
bool pivtol_changed_
Flag indicating if the matrix has to be refactorized because the pivot tolerance has been changed.
virtual bool ProvidesInertia() const
Query whether inertia is computed by linear solver.
Index * iw_
integer work space
Index dim_
Number of rows and columns of the matrix.
Index * ikeep_
MA27's IKEEP.
ESymSolverStatus Factorization(const Index *airn, const Index *ajcn, bool check_NegEVals, Index numberOfNegEVals)
Call MA27BX to factorize the Matrix.
Number pivtolmax_
Maximal pivot tolerance.
bool la_increase_
flag indicating that la should be increased before next factorization
Index negevals_
Number of negative eigenvalues.
virtual ESymSolverStatus MultiSolve(bool new_matrix, const Index *airn, const Index *ajcn, Index nrhs, Number *rhs_vals, bool check_NegEVals, Index numberOfNegEVals)
Solve operation for multiple right hand sides.
Index nonzeros_
Number of nonzeros of the matrix.
Number cntl_[5]
real control values
Number meminc_factor_
Factor for increaseing memory.
This class stores a list of user set options.
Template class for Smart Pointers.
Base class for interfaces to symmetric indefinite linear solvers for sparse matrices.
EMatrixFormat
Enum to specify sparse matrix format.
@ Triplet_Format
Triplet (MA27) format for lower triangular part.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
ESymSolverStatus
Enum to report outcome of a linear solve.
ipindex Index
Type of all indices of vectors, matrices etc.
ipnumber Number
Type of all numbers.