Wildmeshing Toolkit
AMIPSOptimizationSmoothing.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <polysolve/Types.hpp>
6 #include "AttributesUpdate.hpp"
7 
8 
10 class Solver;
11 }
12 
13 namespace wmtk::function {
14 class Function;
15 }
16 
17 namespace wmtk::operations {
18 
20 {
21 private:
22  template <int S>
23  class WMTKAMIPSProblem;
24 
25 public:
27 
28  std::vector<simplex::Simplex> execute(const simplex::Simplex& simplex) override;
29 
32 
33 
35  {
36  m_linear_solver_params = params;
37  create_solver();
38  }
39 
41  {
43  create_solver();
44  }
45 
46 private:
47  std::shared_ptr<polysolve::nonlinear::Solver> m_solver;
49 
50 
53 
55 
56  void create_solver();
57 };
58 
59 } // namespace wmtk::operations
void set_linear_solver_params(const polysolve::json &params)
std::vector< simplex::Simplex > execute(const simplex::Simplex &simplex) override
returns an empty vector in case of failure
std::shared_ptr< polysolve::nonlinear::Solver > m_solver
const attribute::MeshAttributeHandle & m_coordinate_handle
void set_nonlinear_solver_params(const polysolve::json &params)
AMIPSOptimizationSmoothing(Mesh &mesh, const attribute::MeshAttributeHandle &coords)
const Mesh & mesh() const
Definition: Operation.hpp:45
nlohmann::json json
Definition: input.cpp:9