40 Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1>
43 assert(pt.size() ==
size());
44 Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> res;
56 if (model ==
"SaintVenant")
58 else if (model ==
"NeoHookean")
60 else if (model ==
"LinearElasticity")
62 else if (model ==
"HookeLinearElasticity")
64 else if (model ==
"MooneyRivlin")
66 else if (model ==
"MooneyRivlin3Param")
68 else if (model ==
"UnconstrainedOgden")
70 else if (model ==
"IncompressibleOgden")
72 else if (model ==
"FixedCorotational")
77 return Eigen::VectorXd(0, 0);
87 if (model ==
"SaintVenant")
89 else if (model ==
"NeoHookean")
91 else if (model ==
"LinearElasticity")
93 else if (model ==
"HookeLinearElasticity")
95 else if (model ==
"MooneyRivlin")
97 else if (model ==
"MooneyRivlin3Param")
99 else if (model ==
"UnconstrainedOgden")
101 else if (model ==
"IncompressibleOgden")
103 else if (model ==
"FixedCorotational")
108 return Eigen::MatrixXd(0, 0);
117 if (model ==
"SaintVenant")
119 else if (model ==
"NeoHookean")
121 else if (model ==
"LinearElasticity")
123 else if (model ==
"HookeLinearElasticity")
125 else if (model ==
"MooneyRivlin")
127 else if (model ==
"MooneyRivlin3Param")
129 else if (model ==
"UnconstrainedOgden")
131 else if (model ==
"IncompressibleOgden")
133 else if (model ==
"FixedCorotational")
146 Eigen::MatrixXd &all,
147 const std::function<Eigen::MatrixXd(
const Eigen::MatrixXd &)> &fun)
const
151 if (model ==
"SaintVenant")
153 else if (model ==
"NeoHookean")
155 else if (model ==
"LinearElasticity")
157 else if (model ==
"HookeLinearElasticity")
159 else if (model ==
"MooneyRivlin")
161 else if (model ==
"MooneyRivlin3Param")
163 else if (model ==
"UnconstrainedOgden")
165 else if (model ==
"IncompressibleOgden")
167 else if (model ==
"FixedCorotational")
177 std::map<std::string, ParamFunc> res;
virtual void set_size(const int size)
Eigen::MatrixXd assemble_hessian(const NonLinearAssemblerData &data) const override
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
double compute_energy(const NonLinearAssemblerData &data) const override
void assign_stress_tensor(const OutputData &data, const int all_size, const ElasticityTensorType &type, Eigen::MatrixXd &all, const std::function< Eigen::MatrixXd(const Eigen::MatrixXd &)> &fun) const override
Eigen::VectorXd assemble_gradient(const NonLinearAssemblerData &data) const override
void assign_stress_tensor(const OutputData &data, const int all_size, const ElasticityTensorType &type, Eigen::MatrixXd &all, const std::function< Eigen::MatrixXd(const Eigen::MatrixXd &)> &fun) const override
Eigen::MatrixXd assemble_hessian(const NonLinearAssemblerData &data) const override
Eigen::VectorXd assemble_gradient(const NonLinearAssemblerData &data) const override
double compute_energy(const NonLinearAssemblerData &data) const override
double compute_energy(const NonLinearAssemblerData &data) const override
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
Eigen::MatrixXd assemble_hessian(const NonLinearAssemblerData &data) const override
Eigen::VectorXd assemble_gradient(const NonLinearAssemblerData &data) const override
void assign_stress_tensor(const OutputData &data, const int all_size, const ElasticityTensorType &type, Eigen::MatrixXd &all, const std::function< Eigen::MatrixXd(const Eigen::MatrixXd &)> &fun) const override
void set_size(const int size) override
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
Eigen::VectorXd assemble_gradient(const NonLinearAssemblerData &data) const override
void assign_stress_tensor(const OutputData &data, const int all_size, const ElasticityTensorType &type, Eigen::MatrixXd &all, const std::function< Eigen::MatrixXd(const Eigen::MatrixXd &)> &fun) const override
Eigen::MatrixXd assemble_hessian(const NonLinearAssemblerData &data) const override
double compute_energy(const NonLinearAssemblerData &data) const override
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
VectorNd compute_rhs(const AutodiffHessianPt &pt) const override
std::vector< std::string > multi_material_models_
UnconstrainedOgdenElasticity unconstrained_ogden_elasticity_
LinearElasticity linear_elasticity_
FixedCorotational fixed_corotational_
MooneyRivlinElasticity mooney_rivlin_elasticity_
void set_size(const int size) override
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
SaintVenantElasticity saint_venant_
Eigen::MatrixXd assemble_hessian(const NonLinearAssemblerData &data) const override
Eigen::VectorXd assemble_gradient(const NonLinearAssemblerData &data) const override
double compute_energy(const NonLinearAssemblerData &data) const override
MooneyRivlin3ParamElasticity mooney_rivlin_3_param_elasticity_
std::map< std::string, ParamFunc > parameters() const override
IncompressibleOgdenElasticity incompressible_ogden_elasticity_
HookeLinearElasticity hooke_
void assign_stress_tensor(const OutputData &data, const int all_size, const ElasticityTensorType &type, Eigen::MatrixXd &all, const std::function< Eigen::MatrixXd(const Eigen::MatrixXd &)> &fun) const override
NeoHookeanElasticity neo_hookean_
double compute_energy(const NonLinearAssemblerData &data) const override
void assign_stress_tensor(const OutputData &data, const int all_size, const ElasticityTensorType &type, Eigen::MatrixXd &all, const std::function< Eigen::MatrixXd(const Eigen::MatrixXd &)> &fun) const override
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
Eigen::MatrixXd assemble_hessian(const NonLinearAssemblerData &data) const override
Eigen::VectorXd assemble_gradient(const NonLinearAssemblerData &data) const override
const ElementAssemblyValues & vals
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
double compute_energy(const NonLinearAssemblerData &data) const override
void set_size(const int size) override
Eigen::MatrixXd assemble_hessian(const NonLinearAssemblerData &data) const override
void assign_stress_tensor(const OutputData &data, const int all_size, const ElasticityTensorType &type, Eigen::MatrixXd &all, const std::function< Eigen::MatrixXd(const Eigen::MatrixXd &)> &fun) const override
Eigen::VectorXd assemble_gradient(const NonLinearAssemblerData &data) const override
void add_multimaterial(const int index, const json ¶ms, const Units &units) override
Eigen::Matrix< AutodiffScalarHessian, Eigen::Dynamic, 1, 0, 3, 1 > AutodiffHessianPt