PolyFEM
|
#include <Mass.hpp>
Public Member Functions | |
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 9, 1 > | assemble (const LinearAssemblerData &data) const override |
computes and returns local stiffness matrix (1x1) for bases i,j (where i,j is passed in through data) ie integral of phi_i * phi_j on the given element | |
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > | compute_rhs (const AutodiffHessianPt &pt) const override |
uses autodiff to compute the rhs for a fabricated solution in this case it just return pt.getHessian().trace() pt is the evaluation of the solution at a point | |
void | add_multimaterial (const int index, const json ¶ms, const Units &units) override |
inialize material parameter | |
const Density & | density () const |
class that stores and compute density per point | |
std::string | name () const override |
virtual std::map< std::string, ParamFunc > | parameters () const override |
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 override |
assembles the stiffness matrix for the given basis the bilinear form (local assembler) is encoded by the overloaded assemble (see below) function that the subclass (eg Laplacian) defines sets stiffness and modifies cache if it has not already been computed | |
virtual Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 9, 1 > | assemble (const LinearAssemblerData &data) const=0 |
local assembly function that defines the bilinear form (LHS) computes and returns a single local stiffness value | |
Public Member Functions inherited from polyfem::assembler::LinearAssembler | |
LinearAssembler () | |
virtual | ~LinearAssembler ()=default |
virtual bool | is_linear () const override |
Public Member Functions inherited from polyfem::assembler::Assembler | |
virtual | ~Assembler ()=default |
int | size () const |
virtual void | set_size (const int size) |
virtual 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 |
virtual 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 |
virtual 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 |
virtual 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 |
virtual void | compute_scalar_value (const OutputData &data, std::vector< NamedMatrix > &result) const |
virtual void | compute_tensor_value (const OutputData &data, std::vector< NamedMatrix > &result) 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_solution_displacement () const |
virtual bool | is_fluid () const |
virtual bool | is_tensor () const |
Private Attributes | |
Density | density_ |
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 |
|
overridevirtual |
inialize material parameter
Reimplemented from polyfem::assembler::Assembler.
Definition at line 33 of file Mass.cpp.
References polyfem::assembler::Density::add_multimaterial(), polyfem::Units::density(), density_, and polyfem::assembler::Assembler::size_.
Referenced by polyfem::assembler::RhsAssembler::time_bc().
|
overridevirtual |
assembles the stiffness matrix for the given basis the bilinear form (local assembler) is encoded by the overloaded assemble (see below) function that the subclass (eg Laplacian) defines sets stiffness and modifies cache if it has not already been computed
Reimplemented from polyfem::assembler::LinearAssembler.
|
overridevirtual |
computes and returns local stiffness matrix (1x1) for bases i,j (where i,j is passed in through data) ie integral of phi_i * phi_j on the given element
Implements polyfem::assembler::LinearAssembler.
Definition at line 5 of file Mass.cpp.
References polyfem::assembler::ElementAssemblyValues::basis_values, polyfem::assembler::LinearAssemblerData::da, density_, polyfem::assembler::ElementAssemblyValues::element_id, polyfem::assembler::LinearAssemblerData::i, polyfem::assembler::LinearAssemblerData::j, polyfem::quadrature::Quadrature::points, polyfem::assembler::ElementAssemblyValues::quadrature, polyfem::assembler::Assembler::size(), polyfem::assembler::LinearAssemblerData::t, polyfem::assembler::ElementAssemblyValues::val, and polyfem::assembler::LinearAssemblerData::vals.
Referenced by polyfem::mesh::Remesher::project_quantities(), polyfem::mesh::PhysicsRemesher< wmtk::TetMesh >::smooth_after(), and polyfem::assembler::RhsAssembler::time_bc().
|
virtual |
local assembly function that defines the bilinear form (LHS) computes and returns a single local stiffness value
Implements polyfem::assembler::LinearAssembler.
|
overridevirtual |
uses autodiff to compute the rhs for a fabricated solution in this case it just return pt.getHessian().trace() pt is the evaluation of the solution at a point
Reimplemented from polyfem::assembler::Assembler.
|
inline |
class that stores and compute density per point
Definition at line 29 of file Mass.hpp.
References density_.
Referenced by polyfem::solver::InertiaForm::force_shape_derivative().
|
inlineoverridevirtual |
Implements polyfem::assembler::Assembler.
|
overridevirtual |
Implements polyfem::assembler::Assembler.
Definition at line 40 of file Mass.cpp.
References density_.
|
private |
Definition at line 36 of file Mass.hpp.
Referenced by add_multimaterial(), assemble(), density(), and parameters().