PolyFEM
|
#include <MultiModel.hpp>
Public Member Functions | |
double | compute_energy (const NonLinearAssemblerData &data) const override |
Eigen::MatrixXd | assemble_hessian (const NonLinearAssemblerData &data) const override |
Eigen::VectorXd | assemble_gradient (const NonLinearAssemblerData &data) const override |
VectorNd | compute_rhs (const AutodiffHessianPt &pt) const override |
void | set_size (const int size) override |
void | add_multimaterial (const int index, const json ¶ms, const Units &units) override |
void | init_multimodels (const std::vector< std::string > &mats) |
std::string | name () const override |
bool | allow_inversion () const override |
std::map< std::string, ParamFunc > | parameters () const override |
double | assemble_energy (const bool is_volume, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, const double dt, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &displacement_prev) const override |
void | assemble_gradient (const bool is_volume, const int n_basis, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, const double dt, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &displacement_prev, Eigen::MatrixXd &rhs) const override |
virtual Eigen::VectorXd | assemble_gradient (const NonLinearAssemblerData &data) const=0 |
void | assemble_hessian (const bool is_volume, const int n_basis, const bool project_to_psd, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, const double dt, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &displacement_prev, utils::MatrixCache &mat_cache, StiffnessMatrix &grad) const override |
virtual Eigen::MatrixXd | assemble_hessian (const NonLinearAssemblerData &data) const=0 |
Public Member Functions inherited from polyfem::assembler::NLAssembler | |
virtual | ~NLAssembler ()=default |
double | assemble_energy (const bool is_volume, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, const double dt, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &displacement_prev) const override |
Eigen::VectorXd | assemble_energy_per_element (const bool is_volume, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, const double dt, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &displacement_prev) const override |
void | assemble_gradient (const bool is_volume, const int n_basis, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, const double dt, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &displacement_prev, Eigen::MatrixXd &rhs) const override |
void | assemble_hessian (const bool is_volume, const int n_basis, const bool project_to_psd, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, const double dt, const Eigen::MatrixXd &displacement, const Eigen::MatrixXd &displacement_prev, utils::MatrixCache &mat_cache, StiffnessMatrix &grad) const override |
virtual bool | is_linear () const override |
Public Member Functions inherited from polyfem::assembler::Assembler | |
virtual | ~Assembler ()=default |
int | size () const |
virtual void | assemble (const bool is_volume, const int n_basis, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, StiffnessMatrix &stiffness, const bool is_mass=false) const |
virtual void | compute_stiffness_value (const double t, const assembler::ElementAssemblyValues &vals, const Eigen::MatrixXd &local_pts, const Eigen::MatrixXd &displacement, Eigen::MatrixXd &tensor) const |
virtual void | compute_dstress_dmu_dlambda (const OptAssemblerData &data, Eigen::MatrixXd &dstress_dmu, Eigen::MatrixXd &dstress_dlambda) const |
virtual void | compute_stress_grad_multiply_mat (const OptAssemblerData &data, const Eigen::MatrixXd &mat, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const |
virtual void | compute_stress_grad_multiply_stress (const OptAssemblerData &data, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const |
virtual void | compute_stress_grad_multiply_vect (const OptAssemblerData &data, const Eigen::MatrixXd &vect, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const |
virtual void | compute_stress_grad (const OptAssemblerData &data, const Eigen::MatrixXd &prev_grad_u_i, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const |
virtual void | compute_stress_prev_grad (const OptAssemblerData &data, const Eigen::MatrixXd &prev_grad_u_i, Eigen::MatrixXd &result) const |
virtual Eigen::Matrix< AutodiffScalarGrad, Eigen::Dynamic, 1, 0, 3, 1 > | kernel (const int dim, const AutodiffGradPt &rvect, const AutodiffScalarGrad &r) const |
void | set_materials (const std::vector< int > &body_ids, const json &body_params, const Units &units) |
virtual void | update_lame_params (const Eigen::MatrixXd &lambdas, const Eigen::MatrixXd &mus) |
virtual bool | is_fluid () const |
Protected Member Functions | |
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 |
Private Attributes | |
std::vector< std::string > | multi_material_models_ |
SaintVenantElasticity | saint_venant_ |
NeoHookeanElasticity | neo_hookean_ |
LinearElasticity | linear_elasticity_ |
HookeLinearElasticity | hooke_ |
MooneyRivlinElasticity | mooney_rivlin_elasticity_ |
MooneyRivlin3ParamElasticity | mooney_rivlin_3_param_elasticity_ |
UnconstrainedOgdenElasticity | unconstrained_ogden_elasticity_ |
IncompressibleOgdenElasticity | incompressible_ogden_elasticity_ |
FixedCorotational | fixed_corotational_ |
Private Attributes inherited from polyfem::assembler::ElasticityAssembler | |
bool | use_robust_jacobian = false |
Private Attributes inherited from polyfem::assembler::Assembler | |
int | size_ = -1 |
Additional Inherited Members | |
Public Types inherited from polyfem::assembler::Assembler | |
typedef std::pair< std::string, Eigen::MatrixXd > | NamedMatrix |
typedef std::function< double(const RowVectorNd &, const RowVectorNd &, double, int)> | ParamFunc |
Protected Attributes inherited from polyfem::assembler::Assembler | |
int | size_ = -1 |
Private Types inherited from polyfem::assembler::Assembler | |
typedef std::pair< std::string, Eigen::MatrixXd > | NamedMatrix |
typedef std::function< double(const RowVectorNd &, const RowVectorNd &, double, int)> | ParamFunc |
Private Member Functions inherited from polyfem::assembler::ElasticityAssembler | |
ElasticityAssembler () | |
virtual | ~ElasticityAssembler ()=default |
void | set_use_robust_jacobian () |
void | compute_scalar_value (const OutputData &data, std::vector< NamedMatrix > &result) const override |
void | compute_tensor_value (const OutputData &data, std::vector< NamedMatrix > &result) const override |
void | compute_stress_tensor (const OutputData &data, const ElasticityTensorType &type, Eigen::MatrixXd &stresses) const |
void | compute_von_mises_stresses (const OutputData &data, Eigen::MatrixXd &stresses) const |
bool | is_solution_displacement () const override |
bool | is_tensor () const override |
Private Member Functions inherited from polyfem::assembler::Assembler | |
virtual | ~Assembler ()=default |
int | size () const |
virtual void | assemble (const bool is_volume, const int n_basis, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const AssemblyValsCache &cache, const double t, StiffnessMatrix &stiffness, const bool is_mass=false) const |
virtual void | compute_stiffness_value (const double t, const assembler::ElementAssemblyValues &vals, const Eigen::MatrixXd &local_pts, const Eigen::MatrixXd &displacement, Eigen::MatrixXd &tensor) const |
virtual void | compute_dstress_dmu_dlambda (const OptAssemblerData &data, Eigen::MatrixXd &dstress_dmu, Eigen::MatrixXd &dstress_dlambda) const |
virtual void | compute_stress_grad_multiply_mat (const OptAssemblerData &data, const Eigen::MatrixXd &mat, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const |
virtual void | compute_stress_grad_multiply_stress (const OptAssemblerData &data, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const |
virtual void | compute_stress_grad_multiply_vect (const OptAssemblerData &data, const Eigen::MatrixXd &vect, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const |
virtual void | compute_stress_grad (const OptAssemblerData &data, const Eigen::MatrixXd &prev_grad_u_i, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const |
virtual void | compute_stress_prev_grad (const OptAssemblerData &data, const Eigen::MatrixXd &prev_grad_u_i, Eigen::MatrixXd &result) const |
virtual Eigen::Matrix< AutodiffScalarGrad, Eigen::Dynamic, 1, 0, 3, 1 > | kernel (const int dim, const AutodiffGradPt &rvect, const AutodiffScalarGrad &r) const |
void | set_materials (const std::vector< int > &body_ids, const json &body_params, const Units &units) |
virtual void | update_lame_params (const Eigen::MatrixXd &lambdas, const Eigen::MatrixXd &mus) |
virtual bool | is_fluid () const |
Definition at line 15 of file MultiModel.hpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Assembler.
Definition at line 25 of file MultiModel.cpp.
References polyfem::assembler::FixedCorotational::add_multimaterial(), polyfem::assembler::HookeLinearElasticity::add_multimaterial(), polyfem::assembler::LinearElasticity::add_multimaterial(), polyfem::assembler::MooneyRivlinElasticity::add_multimaterial(), polyfem::assembler::NeoHookeanElasticity::add_multimaterial(), polyfem::assembler::UnconstrainedOgdenElasticity::add_multimaterial(), polyfem::assembler::IncompressibleOgdenElasticity::add_multimaterial(), polyfem::assembler::SaintVenantElasticity::add_multimaterial(), fixed_corotational_, hooke_, incompressible_ogden_elasticity_, linear_elasticity_, mooney_rivlin_elasticity_, neo_hookean_, saint_venant_, polyfem::assembler::Assembler::size(), and unconstrained_ogden_elasticity_.
|
inlineoverridevirtual |
Implements polyfem::assembler::ElasticityAssembler.
Definition at line 42 of file MultiModel.hpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Assembler.
Definition at line 244 of file Assembler.cpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Assembler.
|
overridevirtual |
Implements polyfem::assembler::NLAssembler.
Definition at line 51 of file MultiModel.cpp.
References polyfem::assembler::FixedCorotational::assemble_gradient(), polyfem::assembler::GenericElastic< Derived >::assemble_gradient(), polyfem::assembler::HookeLinearElasticity::assemble_gradient(), polyfem::assembler::LinearElasticity::assemble_gradient(), polyfem::assembler::NeoHookeanElasticity::assemble_gradient(), polyfem::assembler::SaintVenantElasticity::assemble_gradient(), polyfem::assembler::ElementAssemblyValues::element_id, fixed_corotational_, hooke_, incompressible_ogden_elasticity_, linear_elasticity_, mooney_rivlin_3_param_elasticity_, mooney_rivlin_elasticity_, multi_material_models_, neo_hookean_, saint_venant_, unconstrained_ogden_elasticity_, and polyfem::assembler::NonLinearAssemblerData::vals.
|
virtual |
Implements polyfem::assembler::NLAssembler.
|
overridevirtual |
Reimplemented from polyfem::assembler::Assembler.
|
overridevirtual |
Implements polyfem::assembler::NLAssembler.
Definition at line 82 of file MultiModel.cpp.
References polyfem::assembler::FixedCorotational::assemble_hessian(), polyfem::assembler::GenericElastic< Derived >::assemble_hessian(), polyfem::assembler::HookeLinearElasticity::assemble_hessian(), polyfem::assembler::LinearElasticity::assemble_hessian(), polyfem::assembler::NeoHookeanElasticity::assemble_hessian(), polyfem::assembler::SaintVenantElasticity::assemble_hessian(), polyfem::assembler::ElementAssemblyValues::element_id, fixed_corotational_, hooke_, incompressible_ogden_elasticity_, linear_elasticity_, mooney_rivlin_3_param_elasticity_, mooney_rivlin_elasticity_, multi_material_models_, neo_hookean_, saint_venant_, unconstrained_ogden_elasticity_, and polyfem::assembler::NonLinearAssemblerData::vals.
|
virtual |
Implements polyfem::assembler::NLAssembler.
|
overrideprotectedvirtual |
Implements polyfem::assembler::ElasticityAssembler.
Definition at line 142 of file MultiModel.cpp.
References polyfem::assembler::FixedCorotational::assign_stress_tensor(), polyfem::assembler::GenericElastic< Derived >::assign_stress_tensor(), polyfem::assembler::HookeLinearElasticity::assign_stress_tensor(), polyfem::assembler::LinearElasticity::assign_stress_tensor(), polyfem::assembler::NeoHookeanElasticity::assign_stress_tensor(), polyfem::assembler::SaintVenantElasticity::assign_stress_tensor(), polyfem::assembler::OutputData::el_id, fixed_corotational_, hooke_, incompressible_ogden_elasticity_, linear_elasticity_, mooney_rivlin_3_param_elasticity_, mooney_rivlin_elasticity_, multi_material_models_, neo_hookean_, saint_venant_, and unconstrained_ogden_elasticity_.
|
overridevirtual |
Implements polyfem::assembler::NLAssembler.
Definition at line 112 of file MultiModel.cpp.
References polyfem::assembler::FixedCorotational::compute_energy(), polyfem::assembler::GenericElastic< Derived >::compute_energy(), polyfem::assembler::HookeLinearElasticity::compute_energy(), polyfem::assembler::LinearElasticity::compute_energy(), polyfem::assembler::NeoHookeanElasticity::compute_energy(), polyfem::assembler::SaintVenantElasticity::compute_energy(), polyfem::assembler::ElementAssemblyValues::element_id, fixed_corotational_, hooke_, incompressible_ogden_elasticity_, linear_elasticity_, mooney_rivlin_3_param_elasticity_, mooney_rivlin_elasticity_, multi_material_models_, neo_hookean_, saint_venant_, unconstrained_ogden_elasticity_, and polyfem::assembler::NonLinearAssemblerData::vals.
|
overridevirtual |
Reimplemented from polyfem::assembler::Assembler.
Definition at line 41 of file MultiModel.cpp.
References polyfem::assembler::Assembler::size().
|
inline |
Definition at line 39 of file MultiModel.hpp.
References multi_material_models_.
|
inlineoverridevirtual |
Implements polyfem::assembler::Assembler.
Definition at line 41 of file MultiModel.hpp.
|
overridevirtual |
Implements polyfem::assembler::Assembler.
Definition at line 175 of file MultiModel.cpp.
|
overridevirtual |
Reimplemented from polyfem::assembler::Assembler.
Definition at line 10 of file MultiModel.cpp.
References fixed_corotational_, hooke_, incompressible_ogden_elasticity_, linear_elasticity_, mooney_rivlin_elasticity_, neo_hookean_, saint_venant_, polyfem::assembler::Assembler::set_size(), polyfem::assembler::HookeLinearElasticity::set_size(), polyfem::assembler::SaintVenantElasticity::set_size(), polyfem::assembler::Assembler::size(), and unconstrained_ogden_elasticity_.
|
private |
Definition at line 63 of file MultiModel.hpp.
Referenced by add_multimaterial(), assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and set_size().
|
private |
Definition at line 58 of file MultiModel.hpp.
Referenced by add_multimaterial(), assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and set_size().
|
private |
Definition at line 62 of file MultiModel.hpp.
Referenced by add_multimaterial(), assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and set_size().
|
private |
Definition at line 57 of file MultiModel.hpp.
Referenced by add_multimaterial(), assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and set_size().
|
private |
Definition at line 60 of file MultiModel.hpp.
Referenced by assemble_gradient(), assemble_hessian(), assign_stress_tensor(), and compute_energy().
|
private |
Definition at line 59 of file MultiModel.hpp.
Referenced by add_multimaterial(), assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and set_size().
|
private |
Definition at line 53 of file MultiModel.hpp.
Referenced by assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and init_multimodels().
|
private |
Definition at line 56 of file MultiModel.hpp.
Referenced by add_multimaterial(), assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and set_size().
|
private |
Definition at line 55 of file MultiModel.hpp.
Referenced by add_multimaterial(), assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and set_size().
|
private |
Definition at line 61 of file MultiModel.hpp.
Referenced by add_multimaterial(), assemble_gradient(), assemble_hessian(), assign_stress_tensor(), compute_energy(), and set_size().