SuperDex Physics C++ API
Loading...
Searching...
No Matches
superdex::ExperimentalEvalParams Struct Reference

[Experimental] Evaluation settings common to the full scene. More...

#include <eval_params.h>

Public Member Functions

bool operator== (ExperimentalEvalParams const &) const =default

Public Attributes

bool consistencyResNorm = false
 Validate that the residual is the gradient of the objective by a directional finite-difference consistency check.
real consistencyResNormStep = 1e-4_r
 Step size for finite-difference consistency check.
bool explicitNormals = false
 Use explicit normals (from stage-start kinematics) for the evaluation of friction.
bool fadeFriction = true
 Fade friction coefficient based on normal alignment.
SaturationHessianParams fittedSaturationHessian
 Controls whether force-saturation terms use a fitted quadratic Hessian (more stable) or the exact analytical Hessian (faster convergence but less stable), independently for each saturation pathway.
CoulombFrictionModel frictionModel = CoulombFrictionModel::Default
 Selects which Coulomb friction smoothing model to use.
bool implicitNormalForceForDissipation = false
 Treat the normal contact force implicitly (if true) or explicitly (if false) for dissipative contact terms.

Detailed Description

[Experimental] Evaluation settings common to the full scene.

They tune the evaluation of internal models (contact, constraints, etc).

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.

Definition at line 73 of file eval_params.h.

Member Function Documentation

◆ operator==()

bool superdex::ExperimentalEvalParams::operator== ( ExperimentalEvalParams const & ) const
default

Member Data Documentation

◆ consistencyResNorm

bool superdex::ExperimentalEvalParams::consistencyResNorm = false

Validate that the residual is the gradient of the objective by a directional finite-difference consistency check.

Note
This operation is expensive and should only be used for debugging.

Definition at line 145 of file eval_params.h.

◆ consistencyResNormStep

real superdex::ExperimentalEvalParams::consistencyResNormStep = 1e-4_r

Step size for finite-difference consistency check.

Definition at line 150 of file eval_params.h.

◆ explicitNormals

bool superdex::ExperimentalEvalParams::explicitNormals = false

Use explicit normals (from stage-start kinematics) for the evaluation of friction.

Whether to treat the colliding and collider normals explicitly (using stage-start kinematics) or implicitly (using current kinematics) for the evaluation of alignment and the friction plane.

Note
The SDF gradient for the normal collision force is always implicit.
explicitNormals = true and implicitNormalForceForDissipation = false produces contact residuals that are the exact gradients of the contact merit. This improves convergence guarantees of the Newton solve, but may be less stable due to the explicit treatment.
A differentiable scene requires explicitNormals = true.

Definition at line 87 of file eval_params.h.

◆ fadeFriction

bool superdex::ExperimentalEvalParams::fadeFriction = true

Fade friction coefficient based on normal alignment.

When enabled, friction is scaled by (maxAlignmentNormals - alignment) / (maxAlignmentNormals + 1), where "alignment" is defined as the dot product between colliding and collider normals.

Note
For co-dimensional colliding actors with ambiguous normals, friction fading is disabled regardless of fadeFriction (normal alignment cannot be computed).
fadeFriction = true adds a non-integrable term to the residual unless explicitNormals = true.
See also
ContactParams::maxAlignmentNormals

Definition at line 103 of file eval_params.h.

◆ fittedSaturationHessian

SaturationHessianParams superdex::ExperimentalEvalParams::fittedSaturationHessian

Controls whether force-saturation terms use a fitted quadratic Hessian (more stable) or the exact analytical Hessian (faster convergence but less stable), independently for each saturation pathway.

Note
For any flag set to false, the solver will try first with the true Hessian. If it fails, it will retry with the fitted Hessian.

Definition at line 129 of file eval_params.h.

◆ frictionModel

CoulombFrictionModel superdex::ExperimentalEvalParams::frictionModel = CoulombFrictionModel::Default

Selects which Coulomb friction smoothing model to use.

C1Regularized (default) preserves existing behavior exactly. CinfRegularized is an additional model that can be selected at runtime without affecting C1Regularized users.

Definition at line 137 of file eval_params.h.

◆ implicitNormalForceForDissipation

bool superdex::ExperimentalEvalParams::implicitNormalForceForDissipation = false

Treat the normal contact force implicitly (if true) or explicitly (if false) for dissipative contact terms.

Note
Implicit treatment improves stability (especially with high-order time integrators) but the resulting dissipative force is not integrable, hence it cannot be derived from an objective function. This (a) may hurt convergence with an objective-based line search, and (b) makes the force dresidual non-symmetric (a symmetric approximation is used). With implicitNormalForceForDissipation = false, the distance used for the explicit normal force is approximate with explicitNormals = false, but accurate with explicitNormals = true.
Dissipative contact terms include Coulomb friction, viscous friction, and normal viscous damping. Using an implicit normal force for normal damping can improve the accuracy of the effective coefficient of restitution at a given time step size.

Definition at line 119 of file eval_params.h.


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