|
PolyFEM
|
A collection of VariableToSimulation. More...
#include <VariableToSimulation.hpp>
Public Member Functions | |
| virtual | ~VariableToSimulationGroup ()=default |
| void | update (const Eigen::VectorXd &x) |
| Update parameters in simulators. | |
| void | compute_state_variable (const ParameterType type, const State *state_ptr, const Eigen::VectorXd &x, Eigen::VectorXd &state_variable) const |
| Evaluate the variable to simulations and overwrite the state_variable based on x. | |
| Eigen::VectorXd | compute_adjoint_term (const Eigen::VectorXd &x) const |
| Computes the sum of adjoint terms for all VariableToSimulation. | |
| virtual Eigen::VectorXd | apply_parametrization_jacobian (const ParameterType type, const State *state_ptr, const Eigen::VectorXd &x, const std::function< Eigen::VectorXd()> &grad) const |
| Maps the partial gradient wrt. | |
Public Attributes | |
| std::vector< std::shared_ptr< VariableToSimulation > > | data |
A collection of VariableToSimulation.
Definition at line 62 of file VariableToSimulation.hpp.
|
virtualdefault |
|
virtual |
Maps the partial gradient wrt.
the state variable to the partial gradient wrt. the optimization variable
| type | Type of state variable |
| state_ptr | The state that stores the state variable |
| x | Optimization variable |
| grad | Partial gradient wrt. the state variable, lambda function to allow lazy evaluation of the gradient |
Definition at line 110 of file VariableToSimulation.cpp.
Referenced by polyfem::solver::AMIPSForm::compute_partial_gradient(), polyfem::solver::CollisionBarrierForm::compute_partial_gradient(), polyfem::solver::DeformedCollisionBarrierForm::compute_partial_gradient(), polyfem::solver::BoundarySmoothingForm::compute_partial_gradient(), polyfem::solver::SmoothContactForceForm::compute_partial_gradient_step(), polyfem::solver::SpatialIntegralForm::compute_partial_gradient_step(), polyfem::solver::ElasticEnergyForm::compute_partial_gradient_step(), polyfem::solver::StressNormForm::compute_partial_gradient_step(), polyfem::solver::DirichletEnergyForm::compute_partial_gradient_step(), polyfem::solver::ComplianceForm::compute_partial_gradient_step(), polyfem::solver::StressForm::compute_partial_gradient_step(), polyfem::solver::ProxyContactForceForm::compute_partial_gradient_step(), and polyfem::solver::NodeTargetForm::compute_partial_gradient_step().
| Eigen::VectorXd polyfem::solver::VariableToSimulationGroup::compute_adjoint_term | ( | const Eigen::VectorXd & | x | ) | const |
Computes the sum of adjoint terms for all VariableToSimulation.
| x | Optimization variable |
Definition at line 84 of file VariableToSimulation.cpp.
Referenced by polyfem::solver::AdjointForm::first_derivative().
| void polyfem::solver::VariableToSimulationGroup::compute_state_variable | ( | const ParameterType | type, |
| const State * | state_ptr, | ||
| const Eigen::VectorXd & | x, | ||
| Eigen::VectorXd & | state_variable | ||
| ) | const |
Evaluate the variable to simulations and overwrite the state_variable based on x.
| x | Optimization variable |
| state_variable | The state variable in state_ptr with type |
Definition at line 92 of file VariableToSimulation.cpp.
Referenced by polyfem::solver::AMIPSForm::get_updated_mesh_nodes(), polyfem::solver::CollisionBarrierForm::get_updated_mesh_nodes(), and polyfem::solver::DeformedCollisionBarrierForm::get_updated_mesh_nodes().
|
inline |
Update parameters in simulators.
| x | Optimization variable |
Definition at line 69 of file VariableToSimulation.hpp.
Referenced by polyfem::OptState::initial_guess().
| std::vector<std::shared_ptr<VariableToSimulation> > polyfem::solver::VariableToSimulationGroup::data |
Definition at line 93 of file VariableToSimulation.hpp.
Referenced by polyfem::solver::AdjointNLProblem::after_line_search_custom_operation(), apply_parametrization_jacobian(), polyfem::from_json::build_variable_to_simulation_group(), compute_adjoint_term(), compute_state_variable(), polyfem::solver::AdjointOptUtils::inverse_evaluation(), polyfem::solver::AdjointNLProblem::is_step_valid(), polyfem::solver::AdjointNLProblem::solution_changed(), and update().