PolyFEM
Loading...
Searching...
No Matches
Optimizations.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <polyfem/Common.hpp>
6
7#include <Eigen/Core>
8#include <memory>
9#include <vector>
10
12{
13 class Solver;
14}
15
16namespace polyfem::solver
17{
18 class AdjointNLProblem;
19 class AdjointForm;
20 class Parametrization;
21 class VariableToSimulation;
22 class VariableToSimulationGroup;
23
25 {
26 static json apply_opt_json_spec(const json &input_args, bool strict_validation);
27
28 static std::shared_ptr<polysolve::nonlinear::Solver> make_nl_solver(
29 const json &solver_params,
30 const json &linear_solver_params,
31 const double characteristic_length,
32 const bool strict_validation = true);
33
34 static Eigen::VectorXd inverse_evaluation(const json &args, const int ndof, const std::vector<int> &variable_sizes, VariableToSimulationGroup &var2sim);
35
36 static void solve_pde(varform::DifferentiableVarForm &varform);
37
38 static int compute_variable_size(const json &args, const std::vector<std::shared_ptr<varform::DifferentiableVarForm>> &varforms);
39 };
40} // namespace polyfem::solver
Optimization-facing interface implemented by differentiated VarForm adapters.
nlohmann::json json
Definition Common.hpp:9
static int compute_variable_size(const json &args, const std::vector< std::shared_ptr< varform::DifferentiableVarForm > > &varforms)
static void solve_pde(varform::DifferentiableVarForm &varform)
static json apply_opt_json_spec(const json &input_args, bool strict_validation)
static Eigen::VectorXd inverse_evaluation(const json &args, const int ndof, const std::vector< int > &variable_sizes, VariableToSimulationGroup &var2sim)
static std::shared_ptr< polysolve::nonlinear::Solver > make_nl_solver(const json &solver_params, const json &linear_solver_params, const double characteristic_length, const bool strict_validation=true)