PolyFEM
Loading...
Searching...
No Matches
polyfem::from_json Namespace Reference

Functions

std::shared_ptr< Statebuild_state (const json &args, const size_t max_threads)
 
std::vector< std::shared_ptr< State > > build_states (const std::string &root_path, const json &args, const size_t max_threads)
 
std::shared_ptr< solver::Parametrizationbuild_parametrization (const json &args, const std::vector< std::shared_ptr< State > > &states, const std::vector< int > &variable_sizes)
 
std::unique_ptr< solver::VariableToSimulationbuild_variable_to_simulation (const json &args, const std::vector< std::shared_ptr< State > > &states, const std::vector< std::shared_ptr< DiffCache > > &diff_caches, const std::vector< int > &variable_sizes)
 
solver::VariableToSimulationGroup build_variable_to_simulation_group (const json &args, const std::vector< std::shared_ptr< State > > &states, const std::vector< std::shared_ptr< DiffCache > > &diff_caches, const std::vector< int > &variable_sizes)
 
std::shared_ptr< solver::AdjointFormbuild_form (const json &args, const solver::VariableToSimulationGroup &var2sim, const std::vector< std::shared_ptr< State > > &states, const std::vector< std::shared_ptr< DiffCache > > &diff_caches)
 

Function Documentation

◆ build_form()

std::shared_ptr< solver::AdjointForm > polyfem::from_json::build_form ( const json args,
const solver::VariableToSimulationGroup var2sim,
const std::vector< std::shared_ptr< State > > &  states,
const std::vector< std::shared_ptr< DiffCache > > &  diff_caches 
)

Definition at line 303 of file BuildFromJson.cpp.

References build_form(), build_parametrization(), polyfem::F, polyfem::log_and_throw_adjoint_error(), polyfem::log_and_throw_error(), polyfem::io::OBJReader::read(), and V.

Referenced by build_form(), and polyfem::OptState::create_problem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_parametrization()

std::shared_ptr< solver::Parametrization > polyfem::from_json::build_parametrization ( const json args,
const std::vector< std::shared_ptr< State > > &  states,
const std::vector< int > &  variable_sizes 
)

Definition at line 111 of file BuildFromJson.cpp.

References polyfem::log_and_throw_adjoint_error(), and vals.

Referenced by build_form(), and build_variable_to_simulation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_state()

std::shared_ptr< State > polyfem::from_json::build_state ( const json args,
const size_t  max_threads 
)

Definition at line 59 of file BuildFromJson.cpp.

Referenced by build_states().

Here is the caller graph for this function:

◆ build_states()

std::vector< std::shared_ptr< State > > polyfem::from_json::build_states ( const std::string &  root_path,
const json args,
const size_t  max_threads 
)

Definition at line 91 of file BuildFromJson.cpp.

References build_state(), load_json(), polyfem::log_and_throw_adjoint_error(), and polyfem::utils::resolve_path().

Referenced by polyfem::OptState::create_states().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_variable_to_simulation()

std::unique_ptr< solver::VariableToSimulation > polyfem::from_json::build_variable_to_simulation ( const json args,
const std::vector< std::shared_ptr< State > > &  states,
const std::vector< std::shared_ptr< DiffCache > > &  diff_caches,
const std::vector< int > &  variable_sizes 
)

Definition at line 205 of file BuildFromJson.cpp.

References build_parametrization(), and polyfem::log_and_throw_adjoint_error().

Referenced by build_variable_to_simulation_group().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_variable_to_simulation_group()

solver::VariableToSimulationGroup polyfem::from_json::build_variable_to_simulation_group ( const json args,
const std::vector< std::shared_ptr< State > > &  states,
const std::vector< std::shared_ptr< DiffCache > > &  diff_caches,
const std::vector< int > &  variable_sizes 
)

Definition at line 288 of file BuildFromJson.cpp.

References build_variable_to_simulation(), and polyfem::solver::VariableToSimulationGroup::data.

Referenced by polyfem::OptState::init_variables().

Here is the call graph for this function:
Here is the caller graph for this function: