PolyFEM
|
#include <filesystem>
#include <CLI/CLI.hpp>
#include <h5pp/h5pp.h>
#include <polyfem/State.hpp>
#include <polyfem/OptState.hpp>
#include <polyfem/utils/JSONUtils.hpp>
#include <polyfem/utils/Logger.hpp>
#include <polyfem/io/YamlToJson.hpp>
Go to the source code of this file.
Functions | |
bool | has_arg (const CLI::App &command_line, const std::string &value) |
bool | load_json (const std::string &json_file, json &out) |
bool | load_yaml (const std::string &yaml_file, json &out) |
int | forward_simulation (const CLI::App &command_line, const std::string &hdf5_file, const std::string output_dir, const unsigned max_threads, const bool is_strict, const bool fallback_solver, const spdlog::level::level_enum &log_level, json &in_args) |
int | optimization_simulation (const CLI::App &command_line, const unsigned max_threads, const bool is_strict, const spdlog::level::level_enum &log_level, json &opt_args) |
int | main (int argc, char **argv) |
int forward_simulation | ( | const CLI::App & | command_line, |
const std::string & | hdf5_file, | ||
const std::string | output_dir, | ||
const unsigned | max_threads, | ||
const bool | is_strict, | ||
const bool | fallback_solver, | ||
const spdlog::level::level_enum & | log_level, | ||
json & | in_args | ||
) |
Definition at line 141 of file main.cpp.
References polyfem::State::assemble_mass_mat(), polyfem::State::assemble_rhs(), polyfem::State::build_basis(), polyfem::State::compute_errors(), polyfem::io::OutStatsData::compute_mesh_stats(), polyfem::State::export_data(), has_arg(), polyfem::State::init(), polyfem::State::load_mesh(), polyfem::logger(), polyfem::State::mesh, polyfem::State::save_json(), polyfem::State::solve_problem(), polyfem::State::stats, polyfem::State::timings, and polyfem::io::OutRuntimeData::total_time().
Referenced by main().
bool has_arg | ( | const CLI::App & | command_line, |
const std::string & | value | ||
) |
Definition at line 17 of file main.cpp.
Referenced by forward_simulation(), and optimization_simulation().
bool load_json | ( | const std::string & | json_file, |
json & | out | ||
) |
Definition at line 26 of file main.cpp.
Referenced by polyfem::solver::AdjointOptUtils::create_states(), and main().
bool load_yaml | ( | const std::string & | yaml_file, |
json & | out | ||
) |
Definition at line 41 of file main.cpp.
References polyfem::io::yaml_file_to_json().
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 71 of file main.cpp.
References forward_simulation(), load_json(), load_yaml(), polyfem::log_and_throw_error(), and optimization_simulation().
int optimization_simulation | ( | const CLI::App & | command_line, |
const unsigned | max_threads, | ||
const bool | is_strict, | ||
const spdlog::level::level_enum & | log_level, | ||
json & | opt_args | ||
) |
Definition at line 227 of file main.cpp.
References polyfem::OptState::args, polyfem::OptState::create_problem(), polyfem::OptState::create_states(), polyfem::solver::Derivatives, polyfem::OptState::eval(), has_arg(), polyfem::OptState::init(), polyfem::OptState::init_variables(), polyfem::OptState::initial_guess(), polyfem::logger(), polyfem::solver::Solution, polyfem::OptState::solve(), and x.
Referenced by main().