15 double operator()(
double x,
double y,
double z,
double t,
int index)
const;
21 std::vector<utils::ExpressionValue>
param_;
44 void resize(
const int size);
50 void set_from_lambda_mu(
const double lambda,
const double mu,
const std::string &stress_unit);
54 double Ex,
double Ey,
double Ez,
55 double nuXY,
double nuXZ,
double nuYZ,
56 double muYZ,
double muZX,
double muXY,
const std::string &stress_unit);
57 void set_orthotropic(
double Ex,
double Ey,
double nuXY,
double muXY,
const std::string &stress_unit);
60 double compute_stress(
const std::array<double, DIM> &strain,
const int j)
const;
72 void add_multimaterial(
const int index,
const json ¶ms,
const bool is_volume,
const std::string &stress_unit);
74 void lambda_mu(
double px,
double py,
double pz,
double x,
double y,
double z,
double t,
int el_id,
double &lambda,
double &mu)
const;
75 void lambda_mu(
const Eigen::MatrixXd ¶m,
const Eigen::MatrixXd &p,
double t,
int el_id,
double &lambda,
double &mu)
const
77 assert(param.size() == 2 || param.size() == 3);
78 assert(param.size() == p.size());
80 param(0), param(1), param.size() == 3 ? param(2) : 0.0,
81 p(0), p(1), p.size() == 3 ? p(2) : 0.0,
89 void set_e_nu(
const int index,
const json &E,
const json &nu,
const std::string &stress_unit);
102 virtual void add_multimaterial(
const int index,
const json ¶ms,
const std::string &density_unit);
104 virtual double operator()(
double px,
double py,
double pz,
double x,
double y,
double z,
double t,
int el_id)
const;
105 double operator()(
const Eigen::MatrixXd ¶m,
const Eigen::MatrixXd &p,
double t,
int el_id)
const
107 assert(param.size() == 2 || param.size() == 3);
108 assert(param.size() == p.size());
109 return (*
this)(param(0), param(1), param.size() == 3 ? param(2) : 0.0,
110 p(0), p(1), p.size() == 3 ? p(2) : 0.0,
117 std::vector<utils::ExpressionValue>
rho_;
127 throw std::runtime_error(
"NoDensity does not support multimaterial");
130 double operator()(
double px,
double py,
double pz,
double x,
double y,
double z,
double t,
int el_id)
const override
std::vector< Eigen::Triplet< double > > entries
std::vector< utils::ExpressionValue > rho_
virtual void add_multimaterial(const int index, const json ¶ms, const std::string &density_unit)
double operator()(const Eigen::MatrixXd ¶m, const Eigen::MatrixXd &p, double t, int el_id) const
virtual double operator()(double px, double py, double pz, double x, double y, double z, double t, int el_id) const
virtual ~Density()=default
void set_rho(const json &rho)
double operator()(int i, int j) const
void resize(const int size)
void set_from_entries(const std::vector< double > &entries, const std::string &stress_unit)
void set_from_young_poisson(const double young, const double poisson, const std::string &stress_unit)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, 6, 6 > stifness_tensor_
void set_orthotropic(double Ex, double Ey, double Ez, double nuXY, double nuXZ, double nuYZ, double muYZ, double muZX, double muXY, const std::string &stress_unit)
double compute_stress(const std::array< double, DIM > &strain, const int j) const
void set_from_lambda_mu(const double lambda, const double mu, const std::string &stress_unit)
void add_multimaterial(const int index, const json ¶ms, const std::string &unit_type)
double operator()(const RowVectorNd &p, double t, int index) const
std::vector< utils::ExpressionValue > param_
const std::string param_name_
const GenericMatParam & operator[](const size_t i) const
void add_multimaterial(const int index, const json ¶ms, const std::string &unit_type)
std::vector< GenericMatParam > params_
const std::string param_name_
std::vector< utils::ExpressionValue > mu_or_nu_
void lambda_mu(double px, double py, double pz, double x, double y, double z, double t, int el_id, double &lambda, double &mu) const
void set_e_nu(const int index, const json &E, const json &nu, const std::string &stress_unit)
std::vector< utils::ExpressionValue > lambda_or_E_
void add_multimaterial(const int index, const json ¶ms, const bool is_volume, const std::string &stress_unit)
void lambda_mu(const Eigen::MatrixXd ¶m, const Eigen::MatrixXd &p, double t, int el_id, double &lambda, double &mu) const
Eigen::MatrixXd lambda_mat_
void add_multimaterial(const int index, const json ¶ms, const std::string &density_unit) override
double operator()(double px, double py, double pz, double x, double y, double z, double t, int el_id) const override
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd