#include <IpTSymLinearSolver.hpp>
This interface includes a call to a method for scaling of the matrix (if given). This class takes in the contructor a pointer to the interface to an actual linear solver, and possibly a pointer to a method for computing scaling factors. It translates the SymMatrix into the format required by the linear solver and calls the solver via the TSymLinearSolverInterface. If a scaling method has been given, the matrix, the right hand side, and the solution are scaled.
Public Member Functions | |
bool | InitializeImpl (const OptionsList &options, const std::string &prefix) |
overloaded from AlgorithmStrategyObject | |
Constructor/Destructor | |
TSymLinearSolver (SmartPtr< SparseSymLinearSolverInterface > solver_interface, SmartPtr< TSymScalingMethod > scaling_method) | |
Constructor. | |
virtual | ~TSymLinearSolver () |
Destructor. | |
Methods for requesting solution of the linear system. | |
virtual ESymSolverStatus | MultiSolve (const SymMatrix &A, std::vector< SmartPtr< const Vector > > &rhsV, std::vector< SmartPtr< Vector > > &solV, bool check_NegEVals, Index numberOfNegEVals) |
Solve operation for multiple right hand sides. | |
virtual Index | NumberOfNegEVals () const |
Number of negative eigenvalues detected during last factorization. | |
virtual bool | IncreaseQuality () |
Request to increase quality of solution for next solve. | |
virtual bool | ProvidesInertia () const |
Query whether inertia is computed by linear solver. | |
Static Public Member Functions | |
static void | RegisterOptions (SmartPtr< RegisteredOptions > roptions) |
Methods for OptionsList. |
TSymLinearSolver | ( | SmartPtr< SparseSymLinearSolverInterface > | solver_interface, | |
SmartPtr< TSymScalingMethod > | scaling_method | |||
) |
Constructor.
The solver_interface is a pointer to a linear solver for symmetric matrices in triplet format. If scaling_method not NULL, it must be a pointer to a class for computing scaling factors for the matrix.
References DBG_ASSERT, DBG_START_METH, and Ipopt::IsValid().
~TSymLinearSolver | ( | ) | [virtual] |
bool InitializeImpl | ( | const OptionsList & | options, | |
const std::string & | prefix | |||
) | [virtual] |
overloaded from AlgorithmStrategyObject
Implements SymLinearSolver.
References ASSERT_EXCEPTION, SparseSymLinearSolverInterface::CSR_Format_0_Offset, SparseSymLinearSolverInterface::CSR_Format_1_Offset, DBG_ASSERT, SparseSymLinearSolverInterface::Dense_Format, TimedTask::End(), OptionsList::GetBoolValue(), AlgorithmStrategyObject::IpCq(), AlgorithmStrategyObject::IpData(), AlgorithmStrategyObject::IpNLP(), Ipopt::IsValid(), AlgorithmStrategyObject::Jnlst(), TimingStatistics::LinearSystemScaling(), TimedTask::Start(), IpoptData::TimingStats(), and SparseSymLinearSolverInterface::Triplet_Format.
ESymSolverStatus MultiSolve | ( | const SymMatrix & | A, | |
std::vector< SmartPtr< const Vector > > & | rhsV, | |||
std::vector< SmartPtr< Vector > > & | solV, | |||
bool | check_NegEVals, | |||
Index | numberOfNegEVals | |||
) | [virtual] |
Solve operation for multiple right hand sides.
For details see the description in the base class SymLinearSolver.
Implements SymLinearSolver.
References DBG_ASSERT, DBG_PRINT, DBG_START_METH, SparseSymLinearSolverInterface::Dense_Format, TimedTask::End(), TripletHelper::FillValuesFromVector(), TripletHelper::GetNumberEntries(), TaggedObject::GetTag(), TaggedObject::HasChanged(), fkinkryx::i, AlgorithmStrategyObject::IpData(), TimingStatistics::LinearSystemScaling(), TimingStatistics::LinearSystemStructureConverter(), nrhs, TSymLinearSolver::ProvidesInertia(), TripletHelper::PutValuesInVector(), TimedTask::Start(), Ipopt::SYMSOLVER_CALL_AGAIN, Ipopt::SYMSOLVER_SUCCESS, IpoptData::TimingStats(), and SparseSymLinearSolverInterface::Triplet_Format.
Index NumberOfNegEVals | ( | ) | const [virtual] |
Number of negative eigenvalues detected during last factorization.
Returns the number of negative eigenvalues of the most recent factorized matrix.
Implements SymLinearSolver.
References DBG_START_METH.
bool IncreaseQuality | ( | ) | [virtual] |
Request to increase quality of solution for next solve.
Ask 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 SymLinearSolver.
References IpoptData::Append_info_string(), DBG_START_METH, AlgorithmStrategyObject::IpData(), Ipopt::IsValid(), Ipopt::J_DETAILED, Ipopt::J_LINEAR_ALGEBRA, AlgorithmStrategyObject::Jnlst(), and Journalist::Printf().
bool ProvidesInertia | ( | ) | const [virtual] |
Query whether inertia is computed by linear solver.
Returns true, if linear solver provides inertia.
Implements SymLinearSolver.
References DBG_START_METH.
Referenced by TSymLinearSolver::MultiSolve().
void RegisterOptions | ( | SmartPtr< RegisteredOptions > | roptions | ) | [static] |