PolyFEM
|
#include <ExpressionValue.hpp>
Public Member Functions | |
ExpressionValue () | |
void | set_unit_type (const std::string &unit_type) |
void | init (const json &vals) |
void | init (const double val) |
void | init (const Eigen::MatrixXd &val) |
void | init (const std::string &expr) |
void | init (const std::function< double(double x, double y, double z)> &func) |
void | init (const std::function< double(double x, double y, double z, double t)> &func) |
void | init (const std::function< double(double x, double y, double z, double t, int index)> &func) |
void | init (const std::function< Eigen::MatrixXd(double x, double y, double z)> &func, const int coo) |
void | init (const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &func, const int coo) |
void | set_t (const json &t) |
double | operator() (double x, double y, double z=0, double t=0, int index=-1) const |
void | clear () |
bool | is_zero () const |
bool | is_mat () const |
const Eigen::MatrixXd & | get_mat () const |
void | set_mat (const Eigen::MatrixXd &mat) |
double | get_val () const |
Private Attributes | |
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_ |
int | tfunc_coo_ |
std::string | expr_ |
double | value_ |
Eigen::MatrixXd | mat_ |
std::vector< ExpressionValue > | mat_expr_ |
std::map< double, int > | t_index_ |
units::precise_unit | unit_type_ |
units::precise_unit | unit_ |
bool | unit_type_set_ = false |
Definition at line 12 of file ExpressionValue.hpp.
polyfem::utils::ExpressionValue::ExpressionValue | ( | ) |
Definition at line 63 of file ExpressionValue.cpp.
References clear().
void polyfem::utils::ExpressionValue::clear | ( | ) |
Definition at line 68 of file ExpressionValue.cpp.
References expr_, mat_, mat_expr_, sfunc_, tfunc_, and value_.
Referenced by polyfem::assembler::GenericScalarProblem::clear(), ExpressionValue(), init(), init(), init(), init(), init(), init(), init(), init(), and init().
|
inline |
Definition at line 49 of file ExpressionValue.hpp.
References is_mat(), and mat_.
|
inline |
Definition at line 63 of file ExpressionValue.hpp.
References value_.
void polyfem::utils::ExpressionValue::init | ( | const double | val | ) |
Definition at line 78 of file ExpressionValue.cpp.
References clear(), val, and value_.
void polyfem::utils::ExpressionValue::init | ( | const Eigen::MatrixXd & | val | ) |
Definition at line 85 of file ExpressionValue.cpp.
References clear(), mat_, and val.
void polyfem::utils::ExpressionValue::init | ( | const json & | vals | ) |
Definition at line 149 of file ExpressionValue.cpp.
References clear(), init(), polyfem::logger(), mat_, mat_expr_, t_index_, unit_, and vals.
Referenced by init(), polyfem::assembler::GenericScalarProblem::set_parameters(), and polyfem::solver::TargetForm::set_reference().
void polyfem::utils::ExpressionValue::init | ( | const std::function< double(double x, double y, double z, double t, int index)> & | func | ) |
Definition at line 208 of file ExpressionValue.cpp.
References clear(), and sfunc_.
void polyfem::utils::ExpressionValue::init | ( | const std::function< Eigen::MatrixXd(double x, double y, double z)> & | func, |
const int | coo | ||
) |
Definition at line 214 of file ExpressionValue.cpp.
References clear(), tfunc_, tfunc_coo_, x, y, and z.
void polyfem::utils::ExpressionValue::init | ( | const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> & | func, |
const int | coo | ||
) |
Definition at line 222 of file ExpressionValue.cpp.
References clear(), tfunc_, and tfunc_coo_.
void polyfem::utils::ExpressionValue::init | ( | const std::string & | expr | ) |
Definition at line 92 of file ExpressionValue.cpp.
References clear(), expr_, polyfem::logger(), mat_, polyfem::io::read_matrix(), x, y, and z.
|
inline |
|
inline |
Definition at line 41 of file ExpressionValue.hpp.
Referenced by polyfem::assembler::GenericScalarProblem::is_rhs_zero().
double polyfem::utils::ExpressionValue::operator() | ( | double | x, |
double | y, | ||
double | z = 0 , |
||
double | t = 0 , |
||
int | index = -1 |
||
) | const |
Definition at line 244 of file ExpressionValue.cpp.
References expr_, polyfem::log_and_throw_error(), polyfem::logger(), mat_, mat_expr_, sfunc_, t_index_, tfunc_, tfunc_coo_, unit_, unit_type_, unit_type_set_, value_, x, y, and z.
|
inline |
Definition at line 55 of file ExpressionValue.hpp.
References is_mat(), and mat_.
void polyfem::utils::ExpressionValue::set_t | ( | const json & | t | ) |
Definition at line 230 of file ExpressionValue.cpp.
References polyfem::logger(), mat_, mat_expr_, and t_index_.
|
inline |
Definition at line 17 of file ExpressionValue.hpp.
References unit_type_, and unit_type_set_.
Referenced by polyfem::assembler::ScalarBCValue::set_unit_type(), and polyfem::assembler::GenericScalarProblem::set_units().
|
private |
Definition at line 73 of file ExpressionValue.hpp.
Referenced by clear(), init(), is_mat(), is_zero(), and operator()().
|
private |
|
private |
Definition at line 76 of file ExpressionValue.hpp.
Referenced by clear(), init(), operator()(), and set_t().
|
private |
Definition at line 69 of file ExpressionValue.hpp.
Referenced by clear(), init(), init(), init(), and operator()().
|
private |
Definition at line 77 of file ExpressionValue.hpp.
Referenced by init(), operator()(), and set_t().
|
private |
Definition at line 70 of file ExpressionValue.hpp.
Referenced by clear(), init(), init(), and operator()().
|
private |
Definition at line 71 of file ExpressionValue.hpp.
Referenced by init(), init(), and operator()().
|
private |
Definition at line 80 of file ExpressionValue.hpp.
Referenced by init(), and operator()().
|
private |
Definition at line 79 of file ExpressionValue.hpp.
Referenced by operator()(), and set_unit_type().
|
private |
Definition at line 81 of file ExpressionValue.hpp.
Referenced by operator()(), and set_unit_type().
|
private |
Definition at line 74 of file ExpressionValue.hpp.
Referenced by clear(), get_val(), init(), is_zero(), and operator()().