PolyFEM
|
#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 (NLProblem &nl_problem, Eigen::MatrixXd &sol, std::shared_ptr< polysolve::nonlinear::Solver > nl_solver) |
void | solve_al (NLProblem &nl_problem, Eigen::MatrixXd &sol, const json &nl_solver_params, const json &linear_solver, const double characteristic_length, std::shared_ptr< polysolve::nonlinear::Solver > nl_solver=nullptr) |
void | solve_reduced (NLProblem &nl_problem, Eigen::MatrixXd &sol, std::shared_ptr< polysolve::nonlinear::Solver > nl_solver) |
void | solve_reduced (NLProblem &nl_problem, Eigen::MatrixXd &sol, const json &nl_solver_params, const json &linear_solver, const double characteristic_length, std::shared_ptr< polysolve::nonlinear::Solver > nl_solver=nullptr) |
Public Attributes | |
std::function< void(const double)> | post_subsolve = [](const double) {} |
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 |
Definition at line 15 of file ALSolver.hpp.
|
private |
Definition at line 17 of file ALSolver.hpp.
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.
|
virtualdefault |
void polyfem::solver::ALSolver::solve_al | ( | NLProblem & | nl_problem, |
Eigen::MatrixXd & | sol, | ||
const json & | nl_solver_params, | ||
const json & | linear_solver, | ||
const double | characteristic_length, | ||
std::shared_ptr< polysolve::nonlinear::Solver > | nl_solver = nullptr |
||
) |
Definition at line 23 of file ALSolver.cpp.
References alagr_forms, eta_tol, polyfem::solver::FullNLProblem::finish(), polyfem::solver::NLProblem::full_size(), polyfem::solver::NLProblem::full_to_reduced(), polyfem::solver::FullNLProblem::init(), initial_al_weight, polyfem::solver::NLProblem::is_step_collision_free(), polyfem::solver::NLProblem::is_step_valid(), polyfem::solver::NLProblem::line_search_begin(), polyfem::solver::FullNLProblem::line_search_end(), polyfem::log_and_throw_error(), polyfem::logger(), max_al_weight, polyfem::solver::NLProblem::normalize_forms(), post_subsolve, polyfem::solver::NLProblem::reduced_size(), scaling, update_barrier_stiffness, polyfem::solver::NLProblem::use_full_size(), polyfem::solver::NLProblem::use_reduced_size(), and polyfem::solver::NLProblem::value().
|
inline |
Definition at line 29 of file ALSolver.hpp.
References solve_al().
Referenced by polyfem::mesh::constrained_L2_projection(), solve_al(), solve_reduced(), and polyfem::State::solve_tensor_nonlinear().
void polyfem::solver::ALSolver::solve_reduced | ( | NLProblem & | nl_problem, |
Eigen::MatrixXd & | sol, | ||
const json & | nl_solver_params, | ||
const json & | linear_solver, | ||
const double | characteristic_length, | ||
std::shared_ptr< polysolve::nonlinear::Solver > | nl_solver = nullptr |
||
) |
Definition at line 120 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::solver::FullNLProblem::line_search_end(), polyfem::log_and_throw_error(), polyfem::logger(), polyfem::solver::NLProblem::normalize_forms(), post_subsolve, polyfem::solver::NLProblem::reduced_to_full(), update_barrier_stiffness, polyfem::solver::NLProblem::use_reduced_size(), and polyfem::solver::NLProblem::value().
|
inline |
Definition at line 41 of file ALSolver.hpp.
References solve_al().
Referenced by polyfem::State::solve_tensor_nonlinear().
|
protected |
Definition at line 56 of file ALSolver.hpp.
Referenced by solve_al().
|
protected |
Definition at line 60 of file ALSolver.hpp.
Referenced by solve_al().
|
protected |
Definition at line 57 of file ALSolver.hpp.
Referenced by solve_al().
|
protected |
Definition at line 59 of file ALSolver.hpp.
Referenced by solve_al().
std::function<void(const double)> polyfem::solver::ALSolver::post_subsolve = [](const double) {} |
Definition at line 53 of file ALSolver.hpp.
Referenced by solve_al(), solve_reduced(), and polyfem::State::solve_tensor_nonlinear().
|
protected |
Definition at line 58 of file ALSolver.hpp.
Referenced by solve_al().
|
protected |
Definition at line 63 of file ALSolver.hpp.
Referenced by solve_al(), and solve_reduced().