PolyFEM
Loading...
Searching...
No Matches
polyfem::solver::ALSolver Class Reference

#include <ALSolver.hpp>

Public Member Functions

 ALSolver (const std::vector< std::shared_ptr< AugmentedLagrangianForm > > &alagr_form, const double initial_al_weight, const double scaling, const double max_al_weight, const double eta_tol, const std::function< void(const Eigen::VectorXd &)> &update_barrier_stiffness)
 
virtual ~ALSolver ()=default
 
void solve_al (std::shared_ptr< NLSolver > nl_solver, NLProblem &nl_problem, Eigen::MatrixXd &sol)
 
void solve_reduced (std::shared_ptr< NLSolver > nl_solver, NLProblem &nl_problem, Eigen::MatrixXd &sol)
 

Public Attributes

std::function< void(const double)> post_subsolve = [](const double) {}
 

Protected Member Functions

void set_al_weight (NLProblem &nl_problem, const Eigen::VectorXd &x, const double weight)
 

Protected Attributes

std::vector< std::shared_ptr< AugmentedLagrangianForm > > alagr_forms
 
const double initial_al_weight
 
const double scaling
 
const double max_al_weight
 
const double eta_tol
 
std::function< void(const Eigen::VectorXd &)> update_barrier_stiffness
 

Private Types

using NLSolver = polysolve::nonlinear::Solver
 

Detailed Description

Definition at line 15 of file ALSolver.hpp.

Member Typedef Documentation

◆ NLSolver

using polyfem::solver::ALSolver::NLSolver = polysolve::nonlinear::Solver
private

Definition at line 17 of file ALSolver.hpp.

Constructor & Destructor Documentation

◆ ALSolver()

polyfem::solver::ALSolver::ALSolver ( const std::vector< std::shared_ptr< AugmentedLagrangianForm > > &  alagr_form,
const double  initial_al_weight,
const double  scaling,
const double  max_al_weight,
const double  eta_tol,
const std::function< void(const Eigen::VectorXd &)> &  update_barrier_stiffness 
)

Definition at line 7 of file ALSolver.cpp.

◆ ~ALSolver()

virtual polyfem::solver::ALSolver::~ALSolver ( )
virtualdefault

Member Function Documentation

◆ set_al_weight()

void polyfem::solver::ALSolver::set_al_weight ( NLProblem nl_problem,
const Eigen::VectorXd &  x,
const double  weight 
)
protected

Definition at line 140 of file ALSolver.cpp.

References alagr_forms, polyfem::solver::NLProblem::use_full_size(), and polyfem::solver::NLProblem::use_reduced_size().

Referenced by solve_al().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ solve_al()

void polyfem::solver::ALSolver::solve_al ( std::shared_ptr< NLSolver nl_solver,
NLProblem nl_problem,
Eigen::MatrixXd &  sol 
)

◆ solve_reduced()

void polyfem::solver::ALSolver::solve_reduced ( std::shared_ptr< NLSolver nl_solver,
NLProblem nl_problem,
Eigen::MatrixXd &  sol 
)

Definition at line 106 of file ALSolver.cpp.

References polyfem::solver::FullNLProblem::finish(), polyfem::solver::NLProblem::full_size(), polyfem::solver::NLProblem::full_to_reduced(), polyfem::solver::FullNLProblem::init(), polyfem::solver::NLProblem::is_step_collision_free(), polyfem::solver::NLProblem::is_step_valid(), polyfem::solver::NLProblem::line_search_begin(), polyfem::log_and_throw_error(), polyfem::logger(), post_subsolve, polyfem::solver::NLProblem::reduced_to_full(), update_barrier_stiffness, and polyfem::solver::NLProblem::value().

Referenced by polyfem::State::solve_tensor_nonlinear().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ alagr_forms

std::vector<std::shared_ptr<AugmentedLagrangianForm> > polyfem::solver::ALSolver::alagr_forms
protected

Definition at line 37 of file ALSolver.hpp.

Referenced by set_al_weight(), and solve_al().

◆ eta_tol

const double polyfem::solver::ALSolver::eta_tol
protected

Definition at line 41 of file ALSolver.hpp.

Referenced by solve_al().

◆ initial_al_weight

const double polyfem::solver::ALSolver::initial_al_weight
protected

Definition at line 38 of file ALSolver.hpp.

Referenced by solve_al().

◆ max_al_weight

const double polyfem::solver::ALSolver::max_al_weight
protected

Definition at line 40 of file ALSolver.hpp.

Referenced by solve_al().

◆ post_subsolve

std::function<void(const double)> polyfem::solver::ALSolver::post_subsolve = [](const double) {}

Definition at line 32 of file ALSolver.hpp.

Referenced by solve_al(), solve_reduced(), and polyfem::State::solve_tensor_nonlinear().

◆ scaling

const double polyfem::solver::ALSolver::scaling
protected

Definition at line 39 of file ALSolver.hpp.

Referenced by solve_al().

◆ update_barrier_stiffness

std::function<void(const Eigen::VectorXd &)> polyfem::solver::ALSolver::update_barrier_stiffness
protected

Definition at line 44 of file ALSolver.hpp.

Referenced by solve_al(), and solve_reduced().


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