Loading [MathJax]/extensions/tex2jax.js
PolyFEM
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
polyfem::solver::DiffCache Class Reference

#include <DiffCache.hpp>

Public Member Functions

void init (const int dimension, const int ndof, const int n_time_steps=0)
 
void cache_quantities_static (const Eigen::MatrixXd &u, const StiffnessMatrix &gradu_h, const ipc::NormalCollisions &contact_set, const ipc::TangentialCollisions &friction_constraint_set, const ipc::NormalCollisions &normal_adhesion_set, const ipc::TangentialCollisions &tangential_adhesion_set, const Eigen::MatrixXd &disp_grad)
 
void cache_quantities_transient (const int cur_step, const int cur_bdf_order, const Eigen::MatrixXd &u, const Eigen::MatrixXd &v, const Eigen::MatrixXd &acc, const StiffnessMatrix &gradu_h, const ipc::NormalCollisions &collision_set, const ipc::TangentialCollisions &friction_collision_set)
 
void cache_quantities_quasistatic (const int cur_step, const Eigen::MatrixXd &u, const StiffnessMatrix &gradu_h, const ipc::NormalCollisions &contact_set, const ipc::NormalCollisions &normal_adhesion_set, const Eigen::MatrixXd &disp_grad)
 
void cache_adjoints (const Eigen::MatrixXd &adjoint_mat)
 
const Eigen::MatrixXd & adjoint_mat () const
 
int size () const
 
int bdf_order (int step) const
 
Eigen::MatrixXd disp_grad (int step=0) const
 
Eigen::VectorXd u (int step) const
 
Eigen::VectorXd v (int step) const
 
Eigen::VectorXd acc (int step) const
 
const StiffnessMatrixgradu_h (int step) const
 
const ipc::NormalCollisions & collision_set (int step) const
 
const ipc::TangentialCollisions & friction_collision_set (int step) const
 
const ipc::NormalCollisions & normal_adhesion_collision_set (int step) const
 
const ipc::TangentialCollisions & tangential_adhesion_collision_set (int step) const
 

Private Attributes

int n_time_steps_ = 0
 
int cur_size_ = 0
 
std::vector< Eigen::MatrixXd > disp_grad_
 
Eigen::MatrixXd u_
 
Eigen::MatrixXd v_
 
Eigen::MatrixXd acc_
 
Eigen::VectorXi bdf_order_
 
std::vector< StiffnessMatrixgradu_h_
 
std::vector< ipc::NormalCollisions > collision_set_
 
std::vector< ipc::TangentialCollisions > friction_collision_set_
 
std::vector< ipc::NormalCollisions > normal_adhesion_collision_set_
 
std::vector< ipc::TangentialCollisions > tangential_adhesion_collision_set_
 
Eigen::MatrixXd adjoint_mat_
 

Detailed Description

Definition at line 18 of file DiffCache.hpp.

Member Function Documentation

◆ acc()

Eigen::VectorXd polyfem::solver::DiffCache::acc ( int  step) const
inline

Definition at line 134 of file DiffCache.hpp.

References acc_, and size().

Referenced by cache_quantities_transient().

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

◆ adjoint_mat()

const Eigen::MatrixXd & polyfem::solver::DiffCache::adjoint_mat ( ) const
inline

Definition at line 107 of file DiffCache.hpp.

References adjoint_mat_.

Referenced by cache_adjoints(), and polyfem::State::get_adjoint_mat().

Here is the caller graph for this function:

◆ bdf_order()

int polyfem::solver::DiffCache::bdf_order ( int  step) const
inline

Definition at line 110 of file DiffCache.hpp.

References bdf_order_, and size().

Referenced by polyfem::State::compute_force_jacobian_prev(), and polyfem::State::solve_transient_adjoint().

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

◆ cache_adjoints()

void polyfem::solver::DiffCache::cache_adjoints ( const Eigen::MatrixXd &  adjoint_mat)
inline

Definition at line 106 of file DiffCache.hpp.

References adjoint_mat(), and adjoint_mat_.

Referenced by polyfem::State::solve_adjoint_cached().

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

◆ cache_quantities_quasistatic()

void polyfem::solver::DiffCache::cache_quantities_quasistatic ( const int  cur_step,
const Eigen::MatrixXd &  u,
const StiffnessMatrix gradu_h,
const ipc::NormalCollisions &  contact_set,
const ipc::NormalCollisions &  normal_adhesion_set,
const Eigen::MatrixXd &  disp_grad 
)
inline

Definition at line 89 of file DiffCache.hpp.

References collision_set_, cur_size_, disp_grad(), disp_grad_, gradu_h(), gradu_h_, normal_adhesion_collision_set_, u(), and u_.

Referenced by polyfem::State::cache_transient_adjoint_quantities().

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

◆ cache_quantities_static()

void polyfem::solver::DiffCache::cache_quantities_static ( const Eigen::MatrixXd &  u,
const StiffnessMatrix gradu_h,
const ipc::NormalCollisions &  contact_set,
const ipc::TangentialCollisions &  friction_constraint_set,
const ipc::NormalCollisions &  normal_adhesion_set,
const ipc::TangentialCollisions &  tangential_adhesion_set,
const Eigen::MatrixXd &  disp_grad 
)
inline

Definition at line 42 of file DiffCache.hpp.

References collision_set_, cur_size_, disp_grad(), disp_grad_, friction_collision_set_, gradu_h(), gradu_h_, normal_adhesion_collision_set_, tangential_adhesion_collision_set_, u(), and u_.

Referenced by polyfem::State::cache_transient_adjoint_quantities().

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

◆ cache_quantities_transient()

void polyfem::solver::DiffCache::cache_quantities_transient ( const int  cur_step,
const int  cur_bdf_order,
const Eigen::MatrixXd &  u,
const Eigen::MatrixXd &  v,
const Eigen::MatrixXd &  acc,
const StiffnessMatrix gradu_h,
const ipc::NormalCollisions &  collision_set,
const ipc::TangentialCollisions &  friction_collision_set 
)
inline

Definition at line 63 of file DiffCache.hpp.

References acc(), acc_, bdf_order_, collision_set(), collision_set_, cur_size_, friction_collision_set(), friction_collision_set_, gradu_h(), gradu_h_, u(), u_, v(), and v_.

Referenced by polyfem::State::cache_transient_adjoint_quantities().

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

◆ collision_set()

const ipc::NormalCollisions & polyfem::solver::DiffCache::collision_set ( int  step) const
inline

Definition at line 151 of file DiffCache.hpp.

References collision_set_, and size().

Referenced by cache_quantities_transient(), polyfem::solver::AdjointTools::dJ_shape_homogenization_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_static_adjoint_term(), and polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term().

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

◆ disp_grad()

Eigen::MatrixXd polyfem::solver::DiffCache::disp_grad ( int  step = 0) const
inline

Definition at line 118 of file DiffCache.hpp.

References disp_grad_, and size().

Referenced by cache_quantities_quasistatic(), cache_quantities_static(), polyfem::solver::SpatialIntegralForm::compute_partial_gradient_step(), and polyfem::solver::AdjointTools::dJ_periodic_shape_adjoint_term().

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

◆ friction_collision_set()

const ipc::TangentialCollisions & polyfem::solver::DiffCache::friction_collision_set ( int  step) const
inline

Definition at line 158 of file DiffCache.hpp.

References friction_collision_set_, and size().

Referenced by cache_quantities_transient(), polyfem::State::compute_force_jacobian_prev(), polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term(), and polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term().

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

◆ gradu_h()

const StiffnessMatrix & polyfem::solver::DiffCache::gradu_h ( int  step) const
inline

Definition at line 142 of file DiffCache.hpp.

References gradu_h_, and size().

Referenced by cache_quantities_quasistatic(), cache_quantities_static(), cache_quantities_transient(), polyfem::solver::AdjointTools::dJ_dirichlet_static_adjoint_term(), polyfem::State::solve_static_adjoint(), and polyfem::State::solve_transient_adjoint().

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

◆ init()

void polyfem::solver::DiffCache::init ( const int  dimension,
const int  ndof,
const int  n_time_steps = 0 
)
inline

Definition at line 21 of file DiffCache.hpp.

References acc_, bdf_order_, collision_set_, cur_size_, disp_grad_, friction_collision_set_, gradu_h_, n_time_steps_, normal_adhesion_collision_set_, tangential_adhesion_collision_set_, u_, and v_.

Referenced by polyfem::State::cache_transient_adjoint_quantities().

Here is the caller graph for this function:

◆ normal_adhesion_collision_set()

const ipc::NormalCollisions & polyfem::solver::DiffCache::normal_adhesion_collision_set ( int  step) const
inline

Definition at line 165 of file DiffCache.hpp.

References normal_adhesion_collision_set_, and size().

Referenced by polyfem::solver::AdjointTools::dJ_shape_homogenization_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_static_adjoint_term(), and polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term().

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

◆ size()

◆ tangential_adhesion_collision_set()

const ipc::TangentialCollisions & polyfem::solver::DiffCache::tangential_adhesion_collision_set ( int  step) const
inline

Definition at line 172 of file DiffCache.hpp.

References size(), and tangential_adhesion_collision_set_.

Referenced by polyfem::State::compute_force_jacobian_prev(), and polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term().

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

◆ u()

Eigen::VectorXd polyfem::solver::DiffCache::u ( int  step) const
inline

Definition at line 120 of file DiffCache.hpp.

References size(), and u_.

Referenced by cache_quantities_quasistatic(), cache_quantities_static(), cache_quantities_transient(), polyfem::solver::SpatialIntegralForm::compute_adjoint_rhs_step(), polyfem::solver::ProxyContactForceForm::compute_adjoint_rhs_step(), polyfem::solver::NodeTargetForm::compute_adjoint_rhs_step(), polyfem::State::compute_force_jacobian_prev(), polyfem::solver::SpatialIntegralForm::compute_partial_gradient_step(), polyfem::solver::ComplianceForm::compute_partial_gradient_step(), polyfem::solver::ProxyContactForceForm::compute_partial_gradient_step(), polyfem::solver::AdjointTools::dJ_damping_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_material_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_pressure_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), polyfem::solver::DeformedCollisionBarrierForm::get_updated_mesh_nodes(), polyfem::solver::SpatialIntegralForm::value_unweighted_step(), polyfem::solver::ProxyContactForceForm::value_unweighted_step(), and polyfem::solver::NodeTargetForm::value_unweighted_step().

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

◆ v()

Eigen::VectorXd polyfem::solver::DiffCache::v ( int  step) const
inline

Definition at line 127 of file DiffCache.hpp.

References size(), and v_.

Referenced by cache_quantities_transient(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), and polyfem::solver::KineticForm::get_integral_functional().

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

Member Data Documentation

◆ acc_

Eigen::MatrixXd polyfem::solver::DiffCache::acc_
private

Definition at line 187 of file DiffCache.hpp.

Referenced by acc(), cache_quantities_transient(), and init().

◆ adjoint_mat_

Eigen::MatrixXd polyfem::solver::DiffCache::adjoint_mat_
private

Definition at line 200 of file DiffCache.hpp.

Referenced by adjoint_mat(), and cache_adjoints().

◆ bdf_order_

Eigen::VectorXi polyfem::solver::DiffCache::bdf_order_
private

Definition at line 189 of file DiffCache.hpp.

Referenced by bdf_order(), cache_quantities_transient(), and init().

◆ collision_set_

std::vector<ipc::NormalCollisions> polyfem::solver::DiffCache::collision_set_
private

◆ cur_size_

int polyfem::solver::DiffCache::cur_size_ = 0
private

◆ disp_grad_

std::vector<Eigen::MatrixXd> polyfem::solver::DiffCache::disp_grad_
private

◆ friction_collision_set_

std::vector<ipc::TangentialCollisions> polyfem::solver::DiffCache::friction_collision_set_
private

◆ gradu_h_

std::vector<StiffnessMatrix> polyfem::solver::DiffCache::gradu_h_
private

◆ n_time_steps_

int polyfem::solver::DiffCache::n_time_steps_ = 0
private

Definition at line 181 of file DiffCache.hpp.

Referenced by init().

◆ normal_adhesion_collision_set_

std::vector<ipc::NormalCollisions> polyfem::solver::DiffCache::normal_adhesion_collision_set_
private

◆ tangential_adhesion_collision_set_

std::vector<ipc::TangentialCollisions> polyfem::solver::DiffCache::tangential_adhesion_collision_set_
private

Definition at line 198 of file DiffCache.hpp.

Referenced by cache_quantities_static(), init(), and tangential_adhesion_collision_set().

◆ u_

Eigen::MatrixXd polyfem::solver::DiffCache::u_
private

◆ v_

Eigen::MatrixXd polyfem::solver::DiffCache::v_
private

Definition at line 186 of file DiffCache.hpp.

Referenced by cache_quantities_transient(), init(), and v().


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