PolyFEM
Loading...
Searching...
No Matches
polyfem::assembler::GenericElastic< Derived > Class Template Referenceabstract

#include <GenericElastic.hpp>

Inheritance diagram for polyfem::assembler::GenericElastic< Derived >:
[legend]
Collaboration diagram for polyfem::assembler::GenericElastic< Derived >:
[legend]

Public Member Functions

 GenericElastic ()
 
virtual ~GenericElastic ()=default
 
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
 
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 compute_stress_grad_multiply_mat (const OptAssemblerData &data, const Eigen::MatrixXd &mat, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const override
 
void compute_stress_grad_multiply_stress (const OptAssemblerData &data, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const override
 
void compute_stress_grad_multiply_vect (const OptAssemblerData &data, const Eigen::MatrixXd &vect, Eigen::MatrixXd &stress, Eigen::MatrixXd &result) const override
 
Derived & derived ()
 Returns this as a reference to derived class.
 
const Derived & derived () const
 Returns this as a const reference to derived class.
 
virtual void add_multimaterial (const int index, const json &params, const Units &units) override=0
 
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
 
virtual std::string name () const =0
 
int size () const
 
virtual void set_size (const int size)
 
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 (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 std::map< std::string, ParamFuncparameters () const =0
 
virtual VectorNd compute_rhs (const AutodiffHessianPt &pt) 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
 
- Public Member Functions inherited from polyfem::assembler::ElasticityAssembler
 ElasticityAssembler ()
 
virtual ~ElasticityAssembler ()=default
 
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

template<typename T >
compute_energy_aux (const NonLinearAssemblerData &data) const
 

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
 

Detailed Description

template<typename Derived>
class polyfem::assembler::GenericElastic< Derived >

Definition at line 13 of file GenericElastic.hpp.

Constructor & Destructor Documentation

◆ GenericElastic()

template<typename Derived >
polyfem::assembler::GenericElastic< Derived >::GenericElastic ( )

Definition at line 14 of file GenericElastic.cpp.

◆ ~GenericElastic()

template<typename Derived >
virtual polyfem::assembler::GenericElastic< Derived >::~GenericElastic ( )
virtualdefault

Member Function Documentation

◆ add_multimaterial()

◆ assemble_energy()

template<typename Derived >
double polyfem::assembler::NLAssembler::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
overridevirtual

Reimplemented from polyfem::assembler::Assembler.

Definition at line 244 of file Assembler.cpp.

◆ assemble_gradient() [1/3]

template<typename Derived >
void polyfem::assembler::NLAssembler::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
overridevirtual

Reimplemented from polyfem::assembler::Assembler.

◆ assemble_gradient() [2/3]

template<typename Derived >
Eigen::VectorXd polyfem::assembler::GenericElastic< Derived >::assemble_gradient ( const NonLinearAssemblerData data) const
overridevirtual

Implements polyfem::assembler::NLAssembler.

Definition at line 93 of file GenericElastic.cpp.

References polyfem::assembler::ElementAssemblyValues::basis_values, polyfem::gradient_from_energy(), and polyfem::assembler::NonLinearAssemblerData::vals.

Referenced by polyfem::assembler::MultiModel::assemble_gradient().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assemble_gradient() [3/3]

template<typename Derived >
virtual Eigen::VectorXd polyfem::assembler::NLAssembler::assemble_gradient ( const NonLinearAssemblerData data) const
virtual

◆ assemble_hessian() [1/3]

template<typename Derived >
void polyfem::assembler::NLAssembler::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
overridevirtual

Reimplemented from polyfem::assembler::Assembler.

◆ assemble_hessian() [2/3]

template<typename Derived >
Eigen::MatrixXd polyfem::assembler::GenericElastic< Derived >::assemble_hessian ( const NonLinearAssemblerData data) const
overridevirtual

Implements polyfem::assembler::NLAssembler.

Definition at line 112 of file GenericElastic.cpp.

References polyfem::assembler::ElementAssemblyValues::basis_values, polyfem::hessian_from_energy(), and polyfem::assembler::NonLinearAssemblerData::vals.

Referenced by polyfem::assembler::MultiModel::assemble_hessian().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assemble_hessian() [3/3]

template<typename Derived >
virtual Eigen::MatrixXd polyfem::assembler::NLAssembler::assemble_hessian ( const NonLinearAssemblerData data) const
virtual

◆ assign_stress_tensor()

template<typename Derived >
void polyfem::assembler::GenericElastic< Derived >::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
overridevirtual

Implements polyfem::assembler::ElasticityAssembler.

Definition at line 19 of file GenericElastic.cpp.

Referenced by polyfem::assembler::MultiModel::assign_stress_tensor().

Here is the caller graph for this function:

◆ compute_energy()

template<typename Derived >
double polyfem::assembler::GenericElastic< Derived >::compute_energy ( const NonLinearAssemblerData data) const
overridevirtual

Implements polyfem::assembler::NLAssembler.

Definition at line 87 of file GenericElastic.cpp.

Referenced by polyfem::assembler::MultiModel::compute_energy().

Here is the caller graph for this function:

◆ compute_energy_aux()

template<typename Derived >
template<typename T >
T polyfem::assembler::GenericElastic< Derived >::compute_energy_aux ( const NonLinearAssemblerData data) const
inlineprivate

◆ compute_stress_grad_multiply_mat()

template<typename Derived >
void polyfem::assembler::GenericElastic< Derived >::compute_stress_grad_multiply_mat ( const OptAssemblerData data,
const Eigen::MatrixXd &  mat,
Eigen::MatrixXd &  stress,
Eigen::MatrixXd &  result 
) const
overridevirtual

Reimplemented from polyfem::assembler::Assembler.

Definition at line 130 of file GenericElastic.cpp.

References polyfem::assembler::OptAssemblerData::el_id, polyfem::F, polyfem::assembler::OptAssemblerData::global_pts, polyfem::assembler::OptAssemblerData::grad_u_i, polyfem::assembler::OptAssemblerData::local_pts, DiffScalarBase::setVariableCount(), and polyfem::assembler::OptAssemblerData::t.

Here is the call graph for this function:

◆ compute_stress_grad_multiply_stress()

template<typename Derived >
void polyfem::assembler::GenericElastic< Derived >::compute_stress_grad_multiply_stress ( const OptAssemblerData data,
Eigen::MatrixXd &  stress,
Eigen::MatrixXd &  result 
) const
overridevirtual

Reimplemented from polyfem::assembler::Assembler.

Definition at line 170 of file GenericElastic.cpp.

References polyfem::assembler::OptAssemblerData::el_id, polyfem::F, polyfem::assembler::OptAssemblerData::global_pts, polyfem::assembler::OptAssemblerData::grad_u_i, polyfem::assembler::OptAssemblerData::local_pts, DiffScalarBase::setVariableCount(), and polyfem::assembler::OptAssemblerData::t.

Here is the call graph for this function:

◆ compute_stress_grad_multiply_vect()

template<typename Derived >
void polyfem::assembler::GenericElastic< Derived >::compute_stress_grad_multiply_vect ( const OptAssemblerData data,
const Eigen::MatrixXd &  vect,
Eigen::MatrixXd &  stress,
Eigen::MatrixXd &  result 
) const
overridevirtual

Reimplemented from polyfem::assembler::Assembler.

Definition at line 209 of file GenericElastic.cpp.

References polyfem::assembler::OptAssemblerData::el_id, polyfem::F, polyfem::assembler::OptAssemblerData::global_pts, polyfem::assembler::OptAssemblerData::grad_u_i, polyfem::assembler::OptAssemblerData::local_pts, DiffScalarBase::setVariableCount(), and polyfem::assembler::OptAssemblerData::t.

Here is the call graph for this function:

◆ derived() [1/2]

template<typename Derived >
Derived & polyfem::assembler::GenericElastic< Derived >::derived ( )
inline

Returns this as a reference to derived class.

Definition at line 49 of file GenericElastic.hpp.

Referenced by polyfem::assembler::GenericElastic< Derived >::compute_energy_aux().

Here is the caller graph for this function:

◆ derived() [2/2]

template<typename Derived >
const Derived & polyfem::assembler::GenericElastic< Derived >::derived ( ) const
inline

Returns this as a const reference to derived class.

Definition at line 51 of file GenericElastic.hpp.


The documentation for this class was generated from the following files: