7#include <units/units.hpp>
20 unit_type_ = units::unit_from_string(unit_type);
23 expr.set_unit_type(unit_type);
28 void init(
const Eigen::MatrixXd &
val);
30#ifdef POLYFEM_WITH_PYTHON
31 void init_python(
const std::string &path,
const std::string &function_name);
34 void init(
const std::function<
double(
double x,
double y,
double z)> &func);
35 void init(
const std::function<
double(
double x,
double y,
double z,
double t)> &func);
36 void init(
const std::function<
double(
double x,
double y,
double z,
double t,
int index)> &func);
38 void init(
const std::function<Eigen::MatrixXd(
double x,
double y,
double z)> &func,
const int coo);
39 void init(
const std::function<Eigen::MatrixXd(
double x,
double y,
double z,
double t)> &func,
const int coo);
44 double operator()(
double x,
double y,
double z = 0,
double t = 0,
int index = -1)
const;
68 assert(
mat_.rows() == mat.rows());
69 assert(
mat_.cols() == mat.cols());
79 std::function<double(
double x,
double y,
double z,
double t,
int index)>
sfunc_;
80 std::function<Eigen::MatrixXd(
double x,
double y,
double z,
double t)>
tfunc_;
ElementAssemblyValues vals
Read-only interface to a hierarchical collection of simulation resources.
void set_index(const int index)
void set_t(const json &t)
std::vector< ExpressionValue > mat_expr_
units::precise_unit unit_
std::function< double(double x, double y, double z, double t, int index)> sfunc_
std::function< Eigen::MatrixXd(double x, double y, double z, double t)> tfunc_
std::map< double, int > t_index_
units::precise_unit unit_type_
void set_unit_type(const std::string &unit_type)
double operator()(double x, double y, double z=0, double t=0, int index=-1) const
const Eigen::MatrixXd & get_mat() const
void init(const json &vals, const io::ResourceIO &resources)
void set_mat(const Eigen::MatrixXd &mat)