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

Functions

std::shared_ptr< varform::DifferentiableVarForm > build_differentiable_varform (const json &args, const io::ResourceIO &resources, const size_t max_threads)
 
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::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, const std::vector< std::reference_wrapper< const io::ResourceIO > > &resources)
 
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, const std::vector< std::reference_wrapper< const io::ResourceIO > > &resources)
 
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, const std::vector< std::reference_wrapper< const io::ResourceIO > > &resources)
 

Function Documentation

◆ build_differentiable_varform()

std::shared_ptr< varform::DifferentiableVarForm > polyfem::from_json::build_differentiable_varform ( const json &  args,
const io::ResourceIO &  resources,
const size_t  max_threads 
)

Definition at line 106 of file BuildFromJson.cpp.

References polyfem::log_and_throw_adjoint_error().

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

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

◆ 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< varform::DifferentiableVarForm > > &  varforms,
const std::vector< std::shared_ptr< DiffCache > > &  diff_caches,
const std::vector< std::reference_wrapper< const io::ResourceIO > > &  resources 
)

Definition at line 370 of file BuildFromJson.cpp.

References build_form(), build_parametrization(), polyfem::mesh::MeshLoader::load_surface(), polyfem::log_and_throw_adjoint_error(), and polyfem::log_and_throw_error().

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< varform::DifferentiableVarForm > > &  varforms,
const std::vector< int > &  variable_sizes 
)

Definition at line 130 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_variable_to_simulation()

std::shared_ptr< solver::VariableToSimulation > polyfem::from_json::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,
const std::vector< std::reference_wrapper< const io::ResourceIO > > &  resources 
)

Definition at line 225 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< varform::DifferentiableVarForm > > &  varforms,
const std::vector< std::shared_ptr< DiffCache > > &  diff_caches,
const std::vector< int > &  variable_sizes,
const std::vector< std::reference_wrapper< const io::ResourceIO > > &  resources 
)

Definition at line 354 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: