12 using typename FullNLProblem::Scalar;
13 using typename FullNLProblem::THessian;
14 using typename FullNLProblem::TVector;
19 const std::vector<std::shared_ptr<Form>> &
forms,
20 const std::vector<std::shared_ptr<AugmentedLagrangianForm>> &penalty_forms);
24 const std::shared_ptr<utils::PeriodicBoundary> &periodic_bc,
26 const std::vector<std::shared_ptr<Form>> &
forms,
27 const std::vector<std::shared_ptr<AugmentedLagrangianForm>> &penalty_forms);
30 virtual double value(
const TVector &
x)
override;
31 virtual void gradient(
const TVector &
x, TVector &gradv)
override;
34 virtual bool is_step_valid(
const TVector &x0,
const TVector &x1)
override;
36 virtual double max_step_size(
const TVector &x0,
const TVector &x1)
override;
38 virtual void post_step(
const polysolve::nonlinear::PostStepData &data)
override;
88 template <
class FullMat,
class ReducedMat>
91 template <
class ReducedMat,
class FullMat>
94 template <
class FullMat,
class ReducedMat>
std::vector< std::shared_ptr< Form > > & forms()
const int full_size_
Size of the full problem.
void line_search_begin(const TVector &x0, const TVector &x1) override
void setup_constrain_nodes()
virtual bool is_step_valid(const TVector &x0, const TVector &x1) override
int reduced_size_
Size of the reduced problem.
virtual void post_step(const polysolve::nonlinear::PostStepData &data) override
virtual TVector full_to_reduced_grad(const TVector &full) const
virtual Eigen::MatrixXd constraint_values(const TVector &reduced) const
virtual TVector full_to_reduced(const TVector &full) const
virtual void update_quantities(const double t, const TVector &x)
virtual void gradient(const TVector &x, TVector &gradv) override
void init_lagging(const TVector &x) override
virtual bool is_step_collision_free(const TVector &x0, const TVector &x1) override
virtual TVector reduced_to_full(const TVector &reduced) const
void update_lagging(const TVector &x, const int iter_num) override
virtual void full_hessian_to_reduced_hessian(const THessian &full, THessian &reduced) const
void full_to_reduced_aux(const std::vector< int > &constraint_nodes, const int full_size, const int reduced_size, const FullMat &full, ReducedMat &reduced) const
std::vector< std::shared_ptr< AugmentedLagrangianForm > > penalty_forms_
virtual double value(const TVector &x) override
virtual double max_step_size(const TVector &x0, const TVector &x1) override
virtual ~NLProblem()=default
std::shared_ptr< utils::PeriodicBoundary > periodic_bc_
virtual void hessian(const TVector &x, THessian &hessian) override
std::vector< int > constraint_nodes_
void solution_changed(const TVector &new_x) override
void reduced_to_full_aux(const std::vector< int > &constraint_nodes, const int full_size, const int reduced_size, const ReducedMat &reduced, const Eigen::MatrixXd &rhs, FullMat &full) const
CurrentSize current_size_
Current size of the problem (either full or reduced size)
void full_to_reduced_aux_grad(const std::vector< int > &constraint_nodes, const int full_size, const int reduced_size, const FullMat &full, ReducedMat &reduced) const