PolyFEM
Loading...
Searching...
No Matches
BuildFromJson.hpp
Go to the documentation of this file.
1#pragma once
2
4#include <polyfem/Common.hpp>
5
11
12#include <string>
13#include <memory>
14#include <vector>
15#include <cstddef>
16
17namespace polyfem::from_json
18{
19 std::shared_ptr<varform::DifferentiableVarForm> build_differentiable_varform(
20 const json &args,
21 const size_t max_threads);
22
23 std::vector<std::shared_ptr<varform::DifferentiableVarForm>> build_varforms(
24 const std::string &root_path,
25 const json &args,
26 const size_t max_threads,
27 const json &output_log = json::object());
28
29 std::shared_ptr<solver::Parametrization> build_parametrization(
30 const json &args,
31 const std::vector<std::shared_ptr<varform::DifferentiableVarForm>> &varforms,
32 const std::vector<int> &variable_sizes);
33
34 std::shared_ptr<solver::VariableToSimulation> build_variable_to_simulation(
35 const json &args,
36 const std::vector<std::shared_ptr<varform::DifferentiableVarForm>> &varforms,
37 const std::vector<std::shared_ptr<DiffCache>> &diff_caches,
38 const std::vector<int> &variable_sizes);
39
40 solver::VariableToSimulationGroup build_variable_to_simulation_group(
41 const json &args,
42 const std::vector<std::shared_ptr<varform::DifferentiableVarForm>> &varforms,
43 const std::vector<std::shared_ptr<DiffCache>> &diff_caches,
44 const std::vector<int> &variable_sizes);
45
46 std::shared_ptr<solver::AdjointForm> build_form(
47 const json &args,
48 const solver::VariableToSimulationGroup &var2sim,
49 const std::vector<std::shared_ptr<varform::DifferentiableVarForm>> &varforms,
50 const std::vector<std::shared_ptr<DiffCache>> &diff_caches);
51
52} // namespace polyfem::from_json
std::shared_ptr< solver::AdjointForm > build_form(const json &args, const solver::VariableToSimulationGroup &var2sim, const std::vector< std::shared_ptr< varform::DifferentiableVarForm > > &varforms, const std::vector< std::shared_ptr< DiffCache > > &diff_caches)
std::shared_ptr< solver::VariableToSimulation > build_variable_to_simulation(const json &args, const std::vector< std::shared_ptr< varform::DifferentiableVarForm > > &varforms, const std::vector< std::shared_ptr< DiffCache > > &diff_caches, const std::vector< int > &variable_sizes)
std::shared_ptr< solver::Parametrization > build_parametrization(const json &args, const std::vector< std::shared_ptr< varform::DifferentiableVarForm > > &varforms, const std::vector< int > &variable_sizes)
std::vector< std::shared_ptr< varform::DifferentiableVarForm > > build_varforms(const std::string &root_path, const json &args, const size_t max_threads, const json &output_log)
std::shared_ptr< varform::DifferentiableVarForm > build_differentiable_varform(const json &args, const size_t max_threads)
solver::VariableToSimulationGroup build_variable_to_simulation_group(const json &args, const std::vector< std::shared_ptr< varform::DifferentiableVarForm > > &varforms, const std::vector< std::shared_ptr< DiffCache > > &diff_caches, const std::vector< int > &variable_sizes)
nlohmann::json json
Definition Common.hpp:9