17 double operator()(
double x,
double y,
double z,
double t,
int index)
const;
19 void add_multimaterial(
const int index,
const json ¶ms,
const std::string &unit_type,
const std::string &root_path);
23 std::vector<utils::ExpressionValue>
param_;
36 void add_multimaterial(
const int index,
const json ¶ms,
const std::string &unit_type,
const std::string &root_path);
46 void resize(
const int size);
51 void set_from_entries(
const std::vector<double> &
entries,
const std::string &stress_unit,
const std::string &root_path);
52 void set_from_lambda_mu(
const double lambda,
const double mu,
const std::string &stress_unit,
const std::string &root_path);
53 void set_from_young_poisson(
const double young,
const double poisson,
const std::string &stress_unit,
const std::string &root_path);
56 double Ex,
double Ey,
double Ez,
57 double nuXY,
double nuXZ,
double nuYZ,
58 double muYZ,
double muZX,
double muXY,
const std::string &stress_unit,
const std::string &root_path);
59 void set_orthotropic(
double Ex,
double Ey,
double nuXY,
double muXY,
const std::string &stress_unit,
const std::string &root_path);
62 double nu_t,
double nu_a,
63 double Ga,
const std::string &stress_units,
const std::string &root_path);
66 double compute_stress(
const std::array<double, DIM> &strain,
const int j)
const;
68 void rotate_stiffness(
const Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 0, 6, 6> &rotation_mtx_voigt);
82 void add_multimaterial(
const int index,
const json ¶ms,
const bool is_volume,
const std::string &stress_unit,
const std::string &root_path);
84 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;
85 void lambda_mu(
const Eigen::MatrixXd ¶m,
const Eigen::MatrixXd &p,
double t,
int el_id,
double &lambda,
double &mu)
const
87 assert(param.size() == 2 || param.size() == 3);
88 assert(param.size() == p.size());
90 param(0), param(1), param.size() == 3 ? param(2) : 0.0,
91 p(0), p(1), p.size() == 3 ? p(2) : 0.0,
99 void set_e_nu(
const int index,
const json &E,
const json &nu,
const std::string &stress_unit,
const std::string &root_path);
112 virtual void add_multimaterial(
const int index,
const json ¶ms,
const std::string &density_unit,
const std::string &root_path);
114 virtual double operator()(
double px,
double py,
double pz,
double x,
double y,
double z,
double t,
int el_id)
const;
115 virtual double operator()(
const Eigen::MatrixXd ¶m,
const Eigen::MatrixXd &p,
double t,
int el_id)
const
117 assert(param.size() == 2 || param.size() == 3);
118 assert(param.size() == p.size());
119 return (*
this)(param(0), param(1), param.size() == 3 ? param(2) : 0.0,
120 p(0), p(1), p.size() == 3 ? p(2) : 0.0,
127 std::vector<utils::ExpressionValue>
rho_;
133 using Density::operator();
137 void add_multimaterial(
const int index,
const json ¶ms,
const std::string &density_unit,
const std::string &root_path)
override
139 throw std::runtime_error(
"NoDensity does not support multimaterial");
142 double operator()(
double px,
double py,
double pz,
double x,
double y,
double z,
double t,
int el_id)
const override
151 using Density::operator();
155 void add_multimaterial(
const int index,
const json ¶ms,
const std::string &density_unit,
const std::string &root_path)
override;
156 void add_multimaterial(
const int index,
const json ¶ms,
const std::string &density_unit,
const std::string &heat_capacity_unit,
const std::string &root_path);
158 double operator()(
double px,
double py,
double pz,
double x,
double y,
double z,
double t,
int el_id)
const override;
173 void resize(
const int size);
175 void add_multimaterial(
const int index,
const json ¶ms,
const std::string &unit,
const std::string &root_path);
177 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 1, 3, 3>
operator()(
double px,
double py,
double pz,
double x,
double y,
double z,
double t,
int el_id)
const;
179 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 1, 3, 3>
operator()(
const Eigen::MatrixXd ¶m,
const Eigen::MatrixXd &p,
double t,
int el_id)
const
181 assert(param.size() == 2 || param.size() == 3);
182 assert(param.size() == p.size());
183 return (*
this)(param(0), param(1), param.size() == 3 ? param(2) : 0.0,
184 p(0), p(1), p.size() == 3 ? p(2) : 0.0,
188 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 1, 6, 6>
stiffness_rotation_voigt(
double px,
double py,
double pz,
double x,
double y,
double z,
double t,
int el_id)
const;
190 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 1, 6, 6>
stiffness_rotation_voigt(
const Eigen::MatrixXd ¶m,
const Eigen::MatrixXd &p,
double t,
int el_id)
const
192 assert(param.size() == 2 || param.size() == 3);
193 assert(param.size() == p.size());
195 p(0), p(1), p.size() == 3 ? p(2) : 0.0,
202 std::vector<Eigen::Matrix<utils::ExpressionValue, Eigen::Dynamic, Eigen::Dynamic, 1, 3, 3>>
dir_;
std::vector< Eigen::Triplet< double > > entries
std::vector< utils::ExpressionValue > rho_
virtual 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)
virtual void add_multimaterial(const int index, const json ¶ms, const std::string &density_unit, const std::string &root_path)
double operator()(int i, int j) const
void set_from_young_poisson(const double young, const double poisson, const std::string &stress_unit, const std::string &root_path)
void rotate_stiffness(const Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, 6, 6 > &rotation_mtx_voigt)
void resize(const int size)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, 6, 6 > stiffness_tensor_
void set_transversely_isotropic(double Et, double Ea, double nu_t, double nu_a, double Ga, const std::string &stress_units, const std::string &root_path)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, 6, 6 > reference_stiffness_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, const std::string &root_path)
double compute_stress(const std::array< double, DIM > &strain, const int j) const
void set_from_entries(const std::vector< double > &entries, const std::string &stress_unit, const std::string &root_path)
void set_from_lambda_mu(const double lambda, const double mu, const std::string &stress_unit, const std::string &root_path)
void unrotate_stiffness()
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 1, 6, 6 > stiffness_rotation_voigt(double px, double py, double pz, double x, double y, double z, double t, int el_id) const
std::vector< Eigen::Matrix< utils::ExpressionValue, Eigen::Dynamic, Eigen::Dynamic, 1, 3, 3 > > dir_
bool use_per_element_file_
void resize(const int size)
bool has_rotation() const
virtual ~FiberDirection()=default
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 1, 3, 3 > operator()(double px, double py, double pz, double x, double y, double z, double t, int el_id) const
void add_multimaterial(const int index, const json ¶ms, const std::string &unit, const std::string &root_path)
std::vector< Eigen::Vector3d > per_el_fibers_
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 1, 3, 3 > operator()(const Eigen::MatrixXd ¶m, const Eigen::MatrixXd &p, double t, int el_id) const
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 1, 6, 6 > stiffness_rotation_voigt(const Eigen::MatrixXd ¶m, const Eigen::MatrixXd &p, double t, int el_id) const
double operator()(const RowVectorNd &p, double t, int index) const
void add_multimaterial(const int index, const json ¶ms, const std::string &unit_type, const std::string &root_path)
std::vector< utils::ExpressionValue > param_
const std::string param_name_
const GenericMatParam & operator[](const size_t i) const
std::vector< GenericMatParam > params_
const std::string param_name_
void add_multimaterial(const int index, const json ¶ms, const std::string &unit_type, const std::string &root_path)
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
std::vector< utils::ExpressionValue > lambda_or_E_
void set_e_nu(const int index, const json &E, const json &nu, const std::string &stress_unit, const std::string &root_path)
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 bool is_volume, const std::string &stress_unit, const std::string &root_path)
void add_multimaterial(const int index, const json ¶ms, const std::string &density_unit, const std::string &root_path) override
double operator()(double px, double py, double pz, double x, double y, double z, double t, int el_id) const override
double rho(const RowVectorNd &p, double t, int el_id) const
double heat_capacity(const RowVectorNd &p, double t, int el_id) const
GenericMatParam heat_capacity_
double operator()(double px, double py, double pz, double x, double y, double z, double t, int el_id) const override
void add_multimaterial(const int index, const json ¶ms, const std::string &density_unit, const std::string &root_path) override
constexpr const char * MATERIAL_ELEMENT_INDEX
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd