9#include <spdlog/spdlog.h>
25 class CheckpointReader;
42 bool strict_validation,
43 bool is_adjoint_optimization =
false);
47 bool strict_validation);
51 bool strict_validation);
56 bool strict_validation,
57 bool is_adjoint_optimization =
false);
60 void set_max_threads(
const int max_threads = std::numeric_limits<int>::max());
81 const std::string &log_file,
82 const spdlog::level::level_enum log_level,
83 const spdlog::level::level_enum file_log_level,
89 void init_logger(std::ostream &os,
const spdlog::level::level_enum log_level);
93 void set_log_level(
const spdlog::level::level_enum log_level);
97 void init_logger(
const std::vector<spdlog::sink_ptr> &sinks,
const spdlog::level::level_enum log_level);
105 void solve(Eigen::MatrixXd &sol);
113 void load_mesh(
bool non_conforming =
false);
119 void set_mesh(
const Eigen::MatrixXd &
V,
const Eigen::MatrixXi &
F,
bool non_conforming =
false);
123 std::optional<std::reference_wrapper<const io::CheckpointReader>>
checkpoint_;
VarForm-only simulation state.
std::shared_ptr< varform::VarForm > variational_formulation
active variational formulation
void init(const json &args, bool strict_validation, bool is_adjoint_optimization=false)
initialize the polyfem solver with a json settings
void solve(Eigen::MatrixXd &sol)
solves the problem, call other methods
void set_max_threads(const int max_threads=std::numeric_limits< int >::max())
void set_mesh(const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, bool non_conforming=false)
loads the mesh from V and F,
std::optional< std::reference_wrapper< const io::CheckpointReader > > checkpoint_
spdlog::sink_ptr file_sink_
spdlog::sink_ptr console_sink_
logger sink to stdout
json args
main input arguments containing all defaults
void set_log_level(const spdlog::level::level_enum log_level)
change log level
std::unique_ptr< const io::ResourceIO > resources_
std::function< void(int, int, double, double)> time_callback
Optional UI progress callback.
void load_mesh(bool non_conforming=false)
loads the mesh from the json arguments
void init_logger(const std::string &log_file, const spdlog::level::level_enum log_level, const spdlog::level::level_enum file_log_level, const bool is_quiet)
initializing the logger
Read-only interface to a hierarchical collection of simulation resources.