MFEM v4.9.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::IPSolver Class Reference

Class for interior-point solvers of contact-problems described by a OptContactProblem. More...

#include <ip.hpp>

Collaboration diagram for mfem::IPSolver:
[legend]

Public Member Functions

 IPSolver (OptContactProblem *)
 Construct interior-point solver.
 
void Mult (const Vector &, Vector &)
 Apply the interior-point solver.
 
void Mult (const BlockVector &, BlockVector &)
 Apply the interior-point solver.
 
void SetTol (real_t tol)
 Set absolute tolerance.
 
void SetMaxIter (int max_it)
 Set maximum number of interior-point steps.
 
void SetLinearSolver (Solver *solver_)
 Set linear solver.
 
void SetPrintLevel (int print_level_)
 Set print level.
 
bool GetConverged () const
 Get convergence status of most recent Mult call.
 
int GetNumIterations ()
 get number of interior-point iterations of most recent Mult call
 
Array< int > & GetLinearSolverIterations ()
 Get solver iteration counts.
 
virtual ~IPSolver ()
 

Protected Attributes

OptContactProblemproblem = nullptr
 OptContactProblem (not owned).
 
Solversolver = nullptr
 Linear solver (not owned)
 
real_t abs_tol
 
int max_iter
 
int iter =0
 
real_t mu_k
 
Vector lk
 
Vector zlk
 
real_t kSig
 interior-point algorithm parameters
 
real_t tauMin
 
real_t eta
 
real_t thetaMin
 
real_t delta
 
real_t sTheta
 
real_t sPhi
 
real_t kMu
 
real_t thetaMu
 
real_t thetaMax
 
real_t gTheta
 
real_t gPhi
 
real_t kEps
 
Array< real_tF1
 
Array< real_tF2
 
real_t alpha
 
real_t alphaz
 
real_t thx0
 
real_t phx0
 
bool switchCondition = false
 
bool sufficientDecrease = false
 
bool lineSearchSuccess = false
 
int dimU
 
int dimM
 
int dimC
 
Array< int > constraint_offsets
 
Array< int > block_offsetsumlz
 
Array< int > block_offsetsuml
 
Array< int > block_offsetsx
 
HypreParMatrixHuu = nullptr
 Operators (not owned)
 
HypreParMatrixHmm = nullptr
 
HypreParMatrixWuu = nullptr
 
HypreParMatrixWmm = nullptr
 
HypreParMatrixJu = nullptr
 
HypreParMatrixJm = nullptr
 
HypreParMatrixJuT = nullptr
 
HypreParMatrixJmT = nullptr
 
Vector Mcslump
 Lumped masses.
 
Vector Mvlump
 
Vector Mlump
 
real_t alphaCurvatureTest
 inertia-regularization parameters
 
real_t deltaRegLast
 
real_t deltaRegMin
 
real_t deltaRegMax
 
real_t deltaReg0
 
real_t kRegMinus
 inertia-regularization rate parameters
 
real_t kRegBarPlus
 
real_t kRegPlus
 
Array< int > lin_solver_iterations
 
bool converged = false
 
int myid = -1
 
int print_level = 0
 print level, 0: no printing, > 0 various solver progress output is shown
 
MPI_Comm comm
 

Detailed Description

Class for interior-point solvers of contact-problems described by a OptContactProblem.

IPSolver is an implementation of a primal-dual interior-point algorithm as described in Wächter, Andreas, and Lorenz T. Biegler. "On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming." Mathematical programming 106.1 (2006): 25-57.

With inertia-free regularization as described in Chiang, Nai-Yuan, and Victor M. Zavala. "An inertia-free filter line-search algorithm for large-scale nonlinear programming." Computational Optimization and Applications 64.2 (2016): 327-354.

This solver contains less solver options than say ipopt but the user has full control over the linear solver.

This solver is intended to solve problems of the form

\[ \min_{u, m} f(u, m) \qquad \text{s.t.} \quad c(u, m) = 0, m \geq 0 \]

In the context of frictionless quasi-static contact mechanics for the displacement variable \(d\) and slack variable \(s\) we have

\[ \min_{d, s} E(d, s) \qquad \text{s.t.} \quad g(d) - s = 0, \; s \geq 0 \]

Typical usage

  1. Initialize IPSolver object.
  2. Set solver options e.g., SetTol, SetMaxIter, SetLinearSolver
  3. Use Mult to apply the solver.

Definition at line 54 of file ip.hpp.

Constructor & Destructor Documentation

◆ IPSolver()

mfem::IPSolver::IPSolver ( OptContactProblem * problem_)

Construct interior-point solver.

Definition at line 17 of file ip.cpp.

◆ ~IPSolver()

mfem::IPSolver::~IPSolver ( )
virtual

Definition at line 839 of file ip.cpp.

Member Function Documentation

◆ GetConverged()

bool mfem::IPSolver::GetConverged ( ) const
inline

Get convergence status of most recent Mult call.

Definition at line 79 of file ip.hpp.

◆ GetLinearSolverIterations()

Array< int > & mfem::IPSolver::GetLinearSolverIterations ( )
inline

Get solver iteration counts.

Definition at line 85 of file ip.hpp.

◆ GetNumIterations()

int mfem::IPSolver::GetNumIterations ( )
inline

get number of interior-point iterations of most recent Mult call

Definition at line 82 of file ip.hpp.

◆ Mult() [1/2]

void mfem::IPSolver::Mult ( const BlockVector & x0,
BlockVector & xf )

Apply the interior-point solver.

Definition at line 142 of file ip.cpp.

◆ Mult() [2/2]

void mfem::IPSolver::Mult ( const Vector & x0,
Vector & xf )

Apply the interior-point solver.

Definition at line 132 of file ip.cpp.

◆ SetLinearSolver()

void mfem::IPSolver::SetLinearSolver ( Solver * solver_)
inline

Set linear solver.

Definition at line 73 of file ip.hpp.

◆ SetMaxIter()

void mfem::IPSolver::SetMaxIter ( int max_it)
inline

Set maximum number of interior-point steps.

Definition at line 70 of file ip.hpp.

◆ SetPrintLevel()

void mfem::IPSolver::SetPrintLevel ( int print_level_)
inline

Set print level.

Definition at line 76 of file ip.hpp.

◆ SetTol()

void mfem::IPSolver::SetTol ( real_t tol)
inline

Set absolute tolerance.

Definition at line 67 of file ip.hpp.

Member Data Documentation

◆ abs_tol

real_t mfem::IPSolver::abs_tol
protected

Definition at line 95 of file ip.hpp.

◆ alpha

real_t mfem::IPSolver::alpha
protected

Definition at line 109 of file ip.hpp.

◆ alphaCurvatureTest

real_t mfem::IPSolver::alphaCurvatureTest
protected

inertia-regularization parameters

Definition at line 136 of file ip.hpp.

◆ alphaz

real_t mfem::IPSolver::alphaz
protected

Definition at line 109 of file ip.hpp.

◆ block_offsetsuml

Array<int> mfem::IPSolver::block_offsetsuml
protected

Definition at line 118 of file ip.hpp.

◆ block_offsetsumlz

Array<int> mfem::IPSolver::block_offsetsumlz
protected

Definition at line 118 of file ip.hpp.

◆ block_offsetsx

Array<int> mfem::IPSolver::block_offsetsx
protected

Definition at line 118 of file ip.hpp.

◆ comm

MPI_Comm mfem::IPSolver::comm
protected

Definition at line 155 of file ip.hpp.

◆ constraint_offsets

Array<int> mfem::IPSolver::constraint_offsets
protected

Definition at line 117 of file ip.hpp.

◆ converged

bool mfem::IPSolver::converged = false
protected

Definition at line 149 of file ip.hpp.

◆ delta

real_t mfem::IPSolver::delta
protected

Definition at line 102 of file ip.hpp.

◆ deltaReg0

real_t mfem::IPSolver::deltaReg0
protected

Definition at line 140 of file ip.hpp.

◆ deltaRegLast

real_t mfem::IPSolver::deltaRegLast
protected

Definition at line 137 of file ip.hpp.

◆ deltaRegMax

real_t mfem::IPSolver::deltaRegMax
protected

Definition at line 139 of file ip.hpp.

◆ deltaRegMin

real_t mfem::IPSolver::deltaRegMin
protected

Definition at line 138 of file ip.hpp.

◆ dimC

int mfem::IPSolver::dimC
protected

Definition at line 116 of file ip.hpp.

◆ dimM

int mfem::IPSolver::dimM
protected

Definition at line 116 of file ip.hpp.

◆ dimU

int mfem::IPSolver::dimU
protected

Definition at line 116 of file ip.hpp.

◆ eta

real_t mfem::IPSolver::eta
protected

Definition at line 102 of file ip.hpp.

◆ F1

Array<real_t> mfem::IPSolver::F1
protected

Definition at line 106 of file ip.hpp.

◆ F2

Array<real_t> mfem::IPSolver::F2
protected

Definition at line 106 of file ip.hpp.

◆ gPhi

real_t mfem::IPSolver::gPhi
protected

Definition at line 103 of file ip.hpp.

◆ gTheta

real_t mfem::IPSolver::gTheta
protected

Definition at line 103 of file ip.hpp.

◆ Hmm

HypreParMatrix* mfem::IPSolver::Hmm = nullptr
protected

Definition at line 122 of file ip.hpp.

◆ Huu

HypreParMatrix* mfem::IPSolver::Huu = nullptr
protected

Operators (not owned)

Definition at line 121 of file ip.hpp.

◆ iter

int mfem::IPSolver::iter =0
protected

Definition at line 97 of file ip.hpp.

◆ Jm

HypreParMatrix* mfem::IPSolver::Jm = nullptr
protected

Definition at line 126 of file ip.hpp.

◆ JmT

HypreParMatrix* mfem::IPSolver::JmT = nullptr
protected

Definition at line 128 of file ip.hpp.

◆ Ju

HypreParMatrix* mfem::IPSolver::Ju = nullptr
protected

Definition at line 125 of file ip.hpp.

◆ JuT

HypreParMatrix* mfem::IPSolver::JuT = nullptr
protected

Definition at line 127 of file ip.hpp.

◆ kEps

real_t mfem::IPSolver::kEps
protected

Definition at line 103 of file ip.hpp.

◆ kMu

real_t mfem::IPSolver::kMu
protected

Definition at line 102 of file ip.hpp.

◆ kRegBarPlus

real_t mfem::IPSolver::kRegBarPlus
protected

Definition at line 144 of file ip.hpp.

◆ kRegMinus

real_t mfem::IPSolver::kRegMinus
protected

inertia-regularization rate parameters

Definition at line 143 of file ip.hpp.

◆ kRegPlus

real_t mfem::IPSolver::kRegPlus
protected

Definition at line 145 of file ip.hpp.

◆ kSig

real_t mfem::IPSolver::kSig
protected

interior-point algorithm parameters

Definition at line 102 of file ip.hpp.

◆ lin_solver_iterations

Array<int> mfem::IPSolver::lin_solver_iterations
protected

Definition at line 147 of file ip.hpp.

◆ lineSearchSuccess

bool mfem::IPSolver::lineSearchSuccess = false
protected

Definition at line 114 of file ip.hpp.

◆ lk

Vector mfem::IPSolver::lk
protected

Definition at line 99 of file ip.hpp.

◆ max_iter

int mfem::IPSolver::max_iter
protected

Definition at line 96 of file ip.hpp.

◆ Mcslump

Vector mfem::IPSolver::Mcslump
protected

Lumped masses.

Definition at line 131 of file ip.hpp.

◆ Mlump

Vector mfem::IPSolver::Mlump
protected

Definition at line 133 of file ip.hpp.

◆ mu_k

real_t mfem::IPSolver::mu_k
protected

Definition at line 98 of file ip.hpp.

◆ Mvlump

Vector mfem::IPSolver::Mvlump
protected

Definition at line 132 of file ip.hpp.

◆ myid

int mfem::IPSolver::myid = -1
protected

Definition at line 151 of file ip.hpp.

◆ phx0

real_t mfem::IPSolver::phx0
protected

Definition at line 111 of file ip.hpp.

◆ print_level

int mfem::IPSolver::print_level = 0
protected

print level, 0: no printing, > 0 various solver progress output is shown

Definition at line 154 of file ip.hpp.

◆ problem

OptContactProblem* mfem::IPSolver::problem = nullptr
protected

OptContactProblem (not owned).

Definition at line 90 of file ip.hpp.

◆ solver

Solver* mfem::IPSolver::solver = nullptr
protected

Linear solver (not owned)

Definition at line 93 of file ip.hpp.

◆ sPhi

real_t mfem::IPSolver::sPhi
protected

Definition at line 102 of file ip.hpp.

◆ sTheta

real_t mfem::IPSolver::sTheta
protected

Definition at line 102 of file ip.hpp.

◆ sufficientDecrease

bool mfem::IPSolver::sufficientDecrease = false
protected

Definition at line 113 of file ip.hpp.

◆ switchCondition

bool mfem::IPSolver::switchCondition = false
protected

Definition at line 112 of file ip.hpp.

◆ tauMin

real_t mfem::IPSolver::tauMin
protected

Definition at line 102 of file ip.hpp.

◆ thetaMax

real_t mfem::IPSolver::thetaMax
protected

Definition at line 103 of file ip.hpp.

◆ thetaMin

real_t mfem::IPSolver::thetaMin
protected

Definition at line 102 of file ip.hpp.

◆ thetaMu

real_t mfem::IPSolver::thetaMu
protected

Definition at line 102 of file ip.hpp.

◆ thx0

real_t mfem::IPSolver::thx0
protected

Definition at line 110 of file ip.hpp.

◆ Wmm

HypreParMatrix* mfem::IPSolver::Wmm = nullptr
protected

Definition at line 124 of file ip.hpp.

◆ Wuu

HypreParMatrix* mfem::IPSolver::Wuu = nullptr
protected

Definition at line 123 of file ip.hpp.

◆ zlk

Vector mfem::IPSolver::zlk
protected

Definition at line 99 of file ip.hpp.


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