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

Functions

std::shared_ptr< varform::DifferentiableVarFormbuild_differentiable_varform (const json &args, const size_t max_threads)
 
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< solver::Parametrizationbuild_parametrization (const json &args, const std::vector< std::shared_ptr< varform::DifferentiableVarForm > > &varforms, const std::vector< int > &variable_sizes)
 
std::shared_ptr< solver::VariableToSimulationbuild_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)
 
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)
 
std::shared_ptr< solver::AdjointFormbuild_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)
 

Function Documentation

◆ build_differentiable_varform()

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

Definition at line 128 of file BuildFromJson.cpp.

References polyfem::State::init(), polyfem::State::load_mesh(), polyfem::log_and_throw_adjoint_error(), and polyfem::State::variational_formulation.

Referenced by build_varforms(), and 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 
)

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

Definition at line 174 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_varforms()

std::vector< std::shared_ptr< varform::DifferentiableVarForm > > polyfem::from_json::build_varforms ( const std::string &  root_path,
const json args,
const size_t  max_threads,
const json output_log 
)

Definition at line 150 of file BuildFromJson.cpp.

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

Here is the call 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 
)

Definition at line 269 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 
)

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