PolyFEM
Loading...
Searching...
No Matches
polyfem::solver::ContactForm Class Reference

Form representing the contact potential and forces. More...

#include <ContactForm.hpp>

Inheritance diagram for polyfem::solver::ContactForm:
[legend]
Collaboration diagram for polyfem::solver::ContactForm:
[legend]

Public Member Functions

 ContactForm (const ipc::CollisionMesh &collision_mesh, const double dhat, const double avg_mass, const bool use_convergent_formulation, const bool use_adaptive_barrier_stiffness, const bool is_time_dependent, const bool enable_shape_derivatives, const ipc::BroadPhaseMethod broad_phase_method, const double ccd_tolerance, const int ccd_max_iterations)
 Construct a new Contact Form object.
 
virtual ~ContactForm ()=default
 
std::string name () const override
 
void init (const Eigen::VectorXd &x) override
 Initialize the form.
 
virtual void force_shape_derivative (const ipc::Collisions &collision_set, const Eigen::MatrixXd &solution, const Eigen::VectorXd &adjoint_sol, Eigen::VectorXd &term)
 
void update_quantities (const double t, const Eigen::VectorXd &x) override
 Update time-dependent fields.
 
double max_step_size (const Eigen::VectorXd &x0, const Eigen::VectorXd &x1) const override
 Determine the maximum step size allowable between the current and next solution.
 
void line_search_begin (const Eigen::VectorXd &x0, const Eigen::VectorXd &x1) override
 Initialize variables used during the line search.
 
void line_search_end () override
 Clear variables used during the line search.
 
void solution_changed (const Eigen::VectorXd &new_x) override
 Update cached fields upon a change in the solution.
 
void post_step (const polysolve::nonlinear::PostStepData &data) override
 Update fields after a step in the optimization.
 
bool is_step_collision_free (const Eigen::VectorXd &x0, const Eigen::VectorXd &x1) const override
 Checks if the step is collision free.
 
virtual void update_barrier_stiffness (const Eigen::VectorXd &x, const Eigen::MatrixXd &grad_energy)
 Update the barrier stiffness based on the current elasticity energy.
 
Eigen::MatrixXd compute_displaced_surface (const Eigen::VectorXd &x) const
 Compute the displaced positions of the surface nodes.
 
double barrier_stiffness () const
 Get the current barrier stiffness.
 
void set_barrier_stiffness (const double barrier_stiffness)
 Get the current barrier stiffness.
 
bool use_adaptive_barrier_stiffness () const
 Get use_adaptive_barrier_stiffness.
 
bool use_convergent_formulation () const
 Get use_convergent_formulation.
 
bool enable_shape_derivatives () const
 
double weight () const override
 Get the form's multiplicative constant weight.
 
double dhat () const
 
const ipc::Collisions & collision_set () const
 
const ipc::BarrierPotential & barrier_potential () const
 
- Public Member Functions inherited from polyfem::solver::Form
virtual ~Form ()
 
virtual double value (const Eigen::VectorXd &x) const
 Compute the value of the form multiplied with the weigth.
 
Eigen::VectorXd value_per_element (const Eigen::VectorXd &x) const
 Compute the value of the form multiplied with the weigth.
 
virtual void first_derivative (const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const
 Compute the first derivative of the value wrt x multiplied with the weigth.
 
void second_derivative (const Eigen::VectorXd &x, StiffnessMatrix &hessian) const
 Compute the second derivative of the value wrt x multiplied with the weigth.
 
virtual bool is_step_valid (const Eigen::VectorXd &x0, const Eigen::VectorXd &x1) const
 Determine if a step from solution x0 to solution x1 is allowed.
 
virtual void init_lagging (const Eigen::VectorXd &x)
 Initialize lagged fields TODO: more than one step.
 
virtual void update_lagging (const Eigen::VectorXd &x, const int iter_num)
 Update lagged fields.
 
virtual int max_lagging_iterations () const
 Get the maximum number of lagging iteration allowable.
 
virtual bool uses_lagging () const
 Does this form require lagging?
 
void set_project_to_psd (bool val)
 Set project to psd.
 
bool is_project_to_psd () const
 Get if the form's second derivative is projected to psd.
 
void enable ()
 Enable the form.
 
void disable ()
 Disable the form.
 
void set_enabled (const bool enabled)
 Set if the form is enabled.
 
bool enabled () const
 Determine if the form is enabled.
 
void set_weight (const double weight)
 Set the form's multiplicative constant weight.
 
void set_output_dir (const std::string &output_dir)
 

Public Attributes

bool save_ccd_debug_meshes = false
 If true, output debug files.
 

Protected Member Functions

virtual double value_unweighted (const Eigen::VectorXd &x) const override
 Compute the contact barrier potential value.
 
Eigen::VectorXd value_per_element_unweighted (const Eigen::VectorXd &x) const override
 Compute the value of the form multiplied per element.
 
virtual void first_derivative_unweighted (const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
 Compute the first derivative of the value wrt x.
 
virtual void second_derivative_unweighted (const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override
 Compute the second derivative of the value wrt x.
 
void update_collision_set (const Eigen::MatrixXd &displaced_surface)
 Update the cached candidate set for the current solution.
 
- Protected Member Functions inherited from polyfem::solver::Form
std::string resolve_output_path (const std::string &path) const
 

Protected Attributes

const ipc::CollisionMesh & collision_mesh_
 Collision mesh.
 
const double dhat_
 Barrier activation distance.
 
const double dmin_ = 0
 Minimum distance between elements.
 
const bool use_adaptive_barrier_stiffness_
 If true, use an adaptive barrier stiffness.
 
double barrier_stiffness_
 Barrier stiffness.
 
double max_barrier_stiffness_
 Maximum barrier stiffness to use when using adaptive barrier stiffness.
 
const double avg_mass_
 Average mass of the mesh (used for adaptive barrier stiffness)
 
const bool is_time_dependent_
 Is the simulation time dependent?
 
const bool enable_shape_derivatives_
 Enable shape derivatives computation.
 
const ipc::BroadPhaseMethod broad_phase_method_
 Broad phase method to use for distance and CCD evaluations.
 
const double ccd_tolerance_
 Continuous collision detection tolerance.
 
const int ccd_max_iterations_
 Continuous collision detection maximum iterations.
 
double prev_distance_
 Previous minimum distance between all elements.
 
bool use_cached_candidates_ = false
 If true, use the cached candidate set for the current solution.
 
ipc::Collisions collision_set_
 Cached constraint set for the current solution.
 
ipc::Candidates candidates_
 Cached candidate set for the current solution.
 
const ipc::BarrierPotential barrier_potential_
 
- Protected Attributes inherited from polyfem::solver::Form
bool project_to_psd_ = false
 If true, the form's second derivative is projected to be positive semidefinite.
 
double weight_ = 1
 weight of the form (e.g., AL penalty weight or Δt²)
 
bool enabled_ = true
 If true, the form is enabled.
 
std::string output_dir_
 

Detailed Description

Form representing the contact potential and forces.

Definition at line 35 of file ContactForm.hpp.

Constructor & Destructor Documentation

◆ ContactForm()

polyfem::solver::ContactForm::ContactForm ( const ipc::CollisionMesh &  collision_mesh,
const double  dhat,
const double  avg_mass,
const bool  use_convergent_formulation,
const bool  use_adaptive_barrier_stiffness,
const bool  is_time_dependent,
const bool  enable_shape_derivatives,
const ipc::BroadPhaseMethod  broad_phase_method,
const double  ccd_tolerance,
const int  ccd_max_iterations 
)

Construct a new Contact Form object.

Parameters
collision_meshReference to the collision mesh
dhatBarrier activation distance
avg_massAverage mass of the mesh
use_adaptive_barrier_stiffnessIf true, use an adaptive barrier stiffness
is_time_dependentIs the simulation time dependent?
broad_phase_methodBroad phase method to use for distance and CCD evaluations
ccd_toleranceContinuous collision detection tolerance
ccd_max_iterationsContinuous collision detection maximum iterations

Definition at line 20 of file ContactForm.cpp.

References collision_set_, dhat_, enable_shape_derivatives(), prev_distance_, and use_convergent_formulation().

Here is the call graph for this function:

◆ ~ContactForm()

virtual polyfem::solver::ContactForm::~ContactForm ( )
virtualdefault

Member Function Documentation

◆ barrier_potential()

const ipc::BarrierPotential & polyfem::solver::ContactForm::barrier_potential ( ) const
inline

Definition at line 146 of file ContactForm.hpp.

References barrier_potential_.

Referenced by polyfem::solver::FrictionForm::force_shape_derivative(), and polyfem::solver::FrictionForm::update_lagging().

Here is the caller graph for this function:

◆ barrier_stiffness()

double polyfem::solver::ContactForm::barrier_stiffness ( ) const
inline

Get the current barrier stiffness.

Definition at line 129 of file ContactForm.hpp.

References barrier_stiffness_.

Referenced by polyfem::solver::FrictionForm::force_shape_derivative(), force_shape_derivative(), post_step(), set_barrier_stiffness(), update_barrier_stiffness(), and polyfem::solver::FrictionForm::update_lagging().

Here is the caller graph for this function:

◆ collision_set()

const ipc::Collisions & polyfem::solver::ContactForm::collision_set ( ) const
inline

Definition at line 145 of file ContactForm.hpp.

References collision_set_.

Referenced by force_shape_derivative().

Here is the caller graph for this function:

◆ compute_displaced_surface()

Eigen::MatrixXd polyfem::solver::ContactForm::compute_displaced_surface ( const Eigen::VectorXd &  x) const

Compute the displaced positions of the surface nodes.

Definition at line 69 of file ContactForm.cpp.

References collision_mesh_, polyfem::utils::unflatten(), and x.

Referenced by polyfem::solver::FrictionForm::compute_displaced_surface(), first_derivative_unweighted(), polyfem::solver::PeriodicContactForm::force_periodic_shape_derivative(), force_shape_derivative(), init(), is_step_collision_free(), line_search_begin(), max_step_size(), post_step(), second_derivative_unweighted(), solution_changed(), update_barrier_stiffness(), update_quantities(), value_per_element_unweighted(), and value_unweighted().

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

◆ dhat()

double polyfem::solver::ContactForm::dhat ( ) const
inline

Definition at line 144 of file ContactForm.hpp.

References dhat_.

Referenced by polyfem::solver::FrictionForm::update_lagging().

Here is the caller graph for this function:

◆ enable_shape_derivatives()

bool polyfem::solver::ContactForm::enable_shape_derivatives ( ) const
inline

Definition at line 137 of file ContactForm.hpp.

References enable_shape_derivatives_.

Referenced by ContactForm(), and polyfem::solver::FrictionForm::update_lagging().

Here is the caller graph for this function:

◆ first_derivative_unweighted()

void polyfem::solver::ContactForm::first_derivative_unweighted ( const Eigen::VectorXd &  x,
Eigen::VectorXd &  gradv 
) const
overrideprotectedvirtual

Compute the first derivative of the value wrt x.

Parameters
[in]xCurrent solution
[out]gradvOutput gradient of the value wrt x

Implements polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 200 of file ContactForm.cpp.

References barrier_potential_, collision_mesh_, collision_set_, compute_displaced_surface(), and x.

Referenced by polyfem::solver::PeriodicContactForm::first_derivative_unweighted().

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

◆ force_shape_derivative()

void polyfem::solver::ContactForm::force_shape_derivative ( const ipc::Collisions &  collision_set,
const Eigen::MatrixXd &  solution,
const Eigen::VectorXd &  adjoint_sol,
Eigen::VectorXd &  term 
)
virtual

Definition at line 54 of file ContactForm.cpp.

References barrier_potential_, barrier_stiffness(), collision_mesh_, collision_set(), and compute_displaced_surface().

Here is the call graph for this function:

◆ init()

void polyfem::solver::ContactForm::init ( const Eigen::VectorXd &  x)
overridevirtual

Initialize the form.

Parameters
xCurrent solution

Reimplemented from polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 49 of file ContactForm.cpp.

References compute_displaced_surface(), update_collision_set(), and x.

Referenced by polyfem::solver::PeriodicContactForm::init().

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

◆ is_step_collision_free()

bool polyfem::solver::ContactForm::is_step_collision_free ( const Eigen::VectorXd &  x0,
const Eigen::VectorXd &  x1 
) const
overridevirtual

Checks if the step is collision free.

Returns
True if the step is collision free else false

Reimplemented from polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 319 of file ContactForm.cpp.

References broad_phase_method_, candidates_, ccd_max_iterations_, ccd_tolerance_, collision_mesh_, compute_displaced_surface(), dmin_, and use_cached_candidates_.

Referenced by polyfem::solver::PeriodicContactForm::is_step_collision_free().

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

◆ line_search_begin()

void polyfem::solver::ContactForm::line_search_begin ( const Eigen::VectorXd &  x0,
const Eigen::VectorXd &  x1 
)
overridevirtual

Initialize variables used during the line search.

Parameters
x0Current solution
x1Next solution

Reimplemented from polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 265 of file ContactForm.cpp.

References broad_phase_method_, candidates_, collision_mesh_, compute_displaced_surface(), dhat_, and use_cached_candidates_.

Referenced by polyfem::solver::PeriodicContactForm::line_search_begin().

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

◆ line_search_end()

void polyfem::solver::ContactForm::line_search_end ( )
overridevirtual

Clear variables used during the line search.

Reimplemented from polyfem::solver::Form.

Definition at line 277 of file ContactForm.cpp.

References candidates_, and use_cached_candidates_.

◆ max_step_size()

double polyfem::solver::ContactForm::max_step_size ( const Eigen::VectorXd &  x0,
const Eigen::VectorXd &  x1 
) const
overridevirtual

Determine the maximum step size allowable between the current and next solution.

Parameters
x0Current solution (step size = 0)
x1Next solution (step size = 1)
Returns
Maximum allowable step size

Reimplemented from polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 218 of file ContactForm.cpp.

References broad_phase_method_, candidates_, ccd_max_iterations_, ccd_tolerance_, collision_mesh_, compute_displaced_surface(), dmin_, polyfem::F, polyfem::log_and_throw_error(), polyfem::logger(), polyfem::solver::Form::resolve_output_path(), save_ccd_debug_meshes, use_cached_candidates_, polyfem::mesh::V0, and polyfem::mesh::V1.

Referenced by polyfem::solver::PeriodicContactForm::max_step_size().

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

◆ name()

std::string polyfem::solver::ContactForm::name ( ) const
inlineoverridevirtual

Implements polyfem::solver::Form.

Definition at line 59 of file ContactForm.hpp.

◆ post_step()

void polyfem::solver::ContactForm::post_step ( const polysolve::nonlinear::PostStepData &  data)
overridevirtual

Update fields after a step in the optimization.

Parameters
iter_numOptimization iteration number
xCurrent solution

Reimplemented from polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 283 of file ContactForm.cpp.

References barrier_stiffness(), barrier_stiffness_, collision_mesh_, collision_set_, compute_displaced_surface(), is_time_dependent_, polyfem::logger(), max_barrier_stiffness_, prev_distance_, and use_adaptive_barrier_stiffness_.

Referenced by polyfem::solver::PeriodicContactForm::post_step().

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

◆ second_derivative_unweighted()

void polyfem::solver::ContactForm::second_derivative_unweighted ( const Eigen::VectorXd &  x,
StiffnessMatrix hessian 
) const
overrideprotectedvirtual

Compute the second derivative of the value wrt x.

Parameters
xCurrent solution
hessianOutput Hessian of the value wrt x

Implements polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 206 of file ContactForm.cpp.

References barrier_potential_, collision_mesh_, collision_set_, compute_displaced_surface(), POLYFEM_SCOPED_TIMER, polyfem::solver::Form::project_to_psd_, and x.

Referenced by polyfem::solver::PeriodicContactForm::force_periodic_shape_derivative(), and polyfem::solver::PeriodicContactForm::second_derivative_unweighted().

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

◆ set_barrier_stiffness()

void polyfem::solver::ContactForm::set_barrier_stiffness ( const double  barrier_stiffness)
inline

Get the current barrier stiffness.

Definition at line 131 of file ContactForm.hpp.

References barrier_stiffness(), and barrier_stiffness_.

Here is the call graph for this function:

◆ solution_changed()

void polyfem::solver::ContactForm::solution_changed ( const Eigen::VectorXd &  new_x)
overridevirtual

Update cached fields upon a change in the solution.

Parameters
new_xNew solution

Reimplemented from polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 213 of file ContactForm.cpp.

References compute_displaced_surface(), and update_collision_set().

Referenced by polyfem::solver::PeriodicContactForm::solution_changed().

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

◆ update_barrier_stiffness()

void polyfem::solver::ContactForm::update_barrier_stiffness ( const Eigen::VectorXd &  x,
const Eigen::MatrixXd &  grad_energy 
)
virtual

Update the barrier stiffness based on the current elasticity energy.

Parameters
xCurrent solution

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 74 of file ContactForm.cpp.

References avg_mass_, barrier_potential_, barrier_stiffness(), barrier_stiffness_, broad_phase_method_, collision_mesh_, collision_set_, compute_displaced_surface(), dhat_, dmin_, polyfem::logger(), max_barrier_stiffness_, update_collision_set(), use_adaptive_barrier_stiffness(), use_convergent_formulation(), polyfem::solver::Form::weight_, and x.

Referenced by polyfem::solver::PeriodicContactForm::update_barrier_stiffness().

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

◆ update_collision_set()

void polyfem::solver::ContactForm::update_collision_set ( const Eigen::MatrixXd &  displaced_surface)
protected

Update the cached candidate set for the current solution.

Parameters
displaced_surfaceVertex positions displaced by the current solution

Definition at line 129 of file ContactForm.cpp.

References broad_phase_method_, candidates_, collision_mesh_, collision_set_, dhat_, dmin_, and use_cached_candidates_.

Referenced by init(), solution_changed(), update_barrier_stiffness(), and update_quantities().

Here is the caller graph for this function:

◆ update_quantities()

void polyfem::solver::ContactForm::update_quantities ( const double  t,
const Eigen::VectorXd &  x 
)
overridevirtual

Update time-dependent fields.

Parameters
tCurrent time
xCurrent solution at time t

Reimplemented from polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 64 of file ContactForm.cpp.

References compute_displaced_surface(), update_collision_set(), and x.

Referenced by polyfem::solver::PeriodicContactForm::update_quantities().

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

◆ use_adaptive_barrier_stiffness()

bool polyfem::solver::ContactForm::use_adaptive_barrier_stiffness ( ) const
inline

Get use_adaptive_barrier_stiffness.

Definition at line 133 of file ContactForm.hpp.

References use_adaptive_barrier_stiffness_.

Referenced by update_barrier_stiffness().

Here is the caller graph for this function:

◆ use_convergent_formulation()

bool polyfem::solver::ContactForm::use_convergent_formulation ( ) const
inline

Get use_convergent_formulation.

Definition at line 135 of file ContactForm.hpp.

References collision_set_.

Referenced by ContactForm(), update_barrier_stiffness(), and polyfem::solver::FrictionForm::update_lagging().

Here is the caller graph for this function:

◆ value_per_element_unweighted()

Eigen::VectorXd polyfem::solver::ContactForm::value_per_element_unweighted ( const Eigen::VectorXd &  x) const
overrideprotectedvirtual

Compute the value of the form multiplied per element.

Parameters
xCurrent solution
Returns
Computed value

Reimplemented from polyfem::solver::Form.

Definition at line 150 of file ContactForm.cpp.

References collision_mesh_, collision_set_, compute_displaced_surface(), polyfem::F, polyfem::utils::maybe_parallel_for(), V, and x.

Here is the call graph for this function:

◆ value_unweighted()

double polyfem::solver::ContactForm::value_unweighted ( const Eigen::VectorXd &  x) const
overrideprotectedvirtual

Compute the contact barrier potential value.

Parameters
xCurrent solution
Returns
Value of the contact barrier potential

Implements polyfem::solver::Form.

Reimplemented in polyfem::solver::PeriodicContactForm.

Definition at line 145 of file ContactForm.cpp.

References barrier_potential_, collision_mesh_, collision_set_, compute_displaced_surface(), and x.

Referenced by polyfem::solver::PeriodicContactForm::value_unweighted().

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

◆ weight()

double polyfem::solver::ContactForm::weight ( ) const
inlineoverridevirtual

Get the form's multiplicative constant weight.

Reimplemented from polyfem::solver::Form.

Definition at line 139 of file ContactForm.hpp.

References barrier_stiffness_, and polyfem::solver::Form::weight_.

Referenced by polyfem::solver::PeriodicContactForm::force_periodic_shape_derivative().

Here is the caller graph for this function:

Member Data Documentation

◆ avg_mass_

const double polyfem::solver::ContactForm::avg_mass_
protected

Average mass of the mesh (used for adaptive barrier stiffness)

Definition at line 170 of file ContactForm.hpp.

Referenced by update_barrier_stiffness().

◆ barrier_potential_

◆ barrier_stiffness_

double polyfem::solver::ContactForm::barrier_stiffness_
protected

Barrier stiffness.

Definition at line 165 of file ContactForm.hpp.

Referenced by barrier_stiffness(), post_step(), set_barrier_stiffness(), update_barrier_stiffness(), and weight().

◆ broad_phase_method_

const ipc::BroadPhaseMethod polyfem::solver::ContactForm::broad_phase_method_
protected

Broad phase method to use for distance and CCD evaluations.

Definition at line 179 of file ContactForm.hpp.

Referenced by is_step_collision_free(), line_search_begin(), max_step_size(), update_barrier_stiffness(), and update_collision_set().

◆ candidates_

ipc::Candidates polyfem::solver::ContactForm::candidates_
protected

Cached candidate set for the current solution.

Definition at line 193 of file ContactForm.hpp.

Referenced by is_step_collision_free(), line_search_begin(), line_search_end(), max_step_size(), and update_collision_set().

◆ ccd_max_iterations_

const int polyfem::solver::ContactForm::ccd_max_iterations_
protected

Continuous collision detection maximum iterations.

Definition at line 183 of file ContactForm.hpp.

Referenced by is_step_collision_free(), and max_step_size().

◆ ccd_tolerance_

const double polyfem::solver::ContactForm::ccd_tolerance_
protected

Continuous collision detection tolerance.

Definition at line 181 of file ContactForm.hpp.

Referenced by is_step_collision_free(), and max_step_size().

◆ collision_mesh_

◆ collision_set_

ipc::Collisions polyfem::solver::ContactForm::collision_set_
protected

◆ dhat_

const double polyfem::solver::ContactForm::dhat_
protected

Barrier activation distance.

Definition at line 157 of file ContactForm.hpp.

Referenced by ContactForm(), dhat(), line_search_begin(), update_barrier_stiffness(), and update_collision_set().

◆ dmin_

const double polyfem::solver::ContactForm::dmin_ = 0
protected

Minimum distance between elements.

Definition at line 160 of file ContactForm.hpp.

Referenced by is_step_collision_free(), max_step_size(), update_barrier_stiffness(), and update_collision_set().

◆ enable_shape_derivatives_

const bool polyfem::solver::ContactForm::enable_shape_derivatives_
protected

Enable shape derivatives computation.

Definition at line 176 of file ContactForm.hpp.

Referenced by enable_shape_derivatives().

◆ is_time_dependent_

const bool polyfem::solver::ContactForm::is_time_dependent_
protected

Is the simulation time dependent?

Definition at line 173 of file ContactForm.hpp.

Referenced by post_step().

◆ max_barrier_stiffness_

double polyfem::solver::ContactForm::max_barrier_stiffness_
protected

Maximum barrier stiffness to use when using adaptive barrier stiffness.

Definition at line 167 of file ContactForm.hpp.

Referenced by post_step(), and update_barrier_stiffness().

◆ prev_distance_

double polyfem::solver::ContactForm::prev_distance_
protected

Previous minimum distance between all elements.

Definition at line 186 of file ContactForm.hpp.

Referenced by ContactForm(), and post_step().

◆ save_ccd_debug_meshes

bool polyfem::solver::ContactForm::save_ccd_debug_meshes = false

If true, output debug files.

Definition at line 142 of file ContactForm.hpp.

Referenced by max_step_size().

◆ use_adaptive_barrier_stiffness_

const bool polyfem::solver::ContactForm::use_adaptive_barrier_stiffness_
protected

If true, use an adaptive barrier stiffness.

Definition at line 163 of file ContactForm.hpp.

Referenced by post_step(), and use_adaptive_barrier_stiffness().

◆ use_cached_candidates_

bool polyfem::solver::ContactForm::use_cached_candidates_ = false
protected

If true, use the cached candidate set for the current solution.

Definition at line 189 of file ContactForm.hpp.

Referenced by is_step_collision_free(), line_search_begin(), line_search_end(), max_step_size(), and update_collision_set().


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