35 void init(
const json &
args,
const bool strict_validation);
46 const std::string &log_file,
47 const spdlog::level::level_enum log_level,
48 const spdlog::level::level_enum file_log_level,
54 void init_logger(std::ostream &os,
const spdlog::level::level_enum log_level);
58 void set_log_level(
const spdlog::level::level_enum log_level);
70 double eval(Eigen::VectorXd &
x)
const;
72 void solve(Eigen::VectorXd &
x);
78 return args[
"root_path"].get<std::string>();
83 void init_logger(
const std::vector<spdlog::sink_ptr> &sinks,
const spdlog::level::level_enum log_level);
94 std::vector<std::shared_ptr<State>>
states;
main class that contains the polyfem adjoint solver and all its state
std::vector< std::shared_ptr< State > > states
State used in the opt.
void solve(Eigen::VectorXd &x)
void initial_guess(Eigen::VectorXd &x)
void set_log_level(const spdlog::level::level_enum log_level)
change log level
json args
main input arguments containing all defaults
void init(const json &args, const bool strict_validation)
initialize the polyfem solver with a json settings
spdlog::sink_ptr file_sink_
std::string root_path() const
double eval(Eigen::VectorXd &x) const
std::vector< int > variable_sizes
variables
std::unique_ptr< solver::AdjointNLProblem > nl_problem
std::string output_dir
Directory for output files.
spdlog::sink_ptr console_sink_
logger sink to stdout
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
void create_states(const polyfem::solver::CacheLevel level, const int max_threads=-1)
create the opt states
solver::VariableToSimulationGroup variable_to_simulations
void init_variables()
init variables
A collection of VariableToSimulation.
bool is_param_valid(const json ¶ms, const std::string &key)
Determine if a key exists and is non-null in a json object.