Main Functions

void ipc::construct_friction_constraint_set(const CollisionMesh &mesh, const Eigen::MatrixXd &V, const Constraints &contact_constraint_set, double dhat, double barrier_stiffness, double mu, FrictionConstraints &friction_constraint_set)
void ipc::construct_friction_constraint_set(const CollisionMesh &mesh, const Eigen::MatrixXd &V, const Constraints &contact_constraint_set, double dhat, double barrier_stiffness, const Eigen::VectorXd &mus, FrictionConstraints &friction_constraint_set)
void ipc::construct_friction_constraint_set(const CollisionMesh &mesh, const Eigen::MatrixXd &V, const Constraints &contact_constraint_set, double dhat, double barrier_stiffness, const Eigen::VectorXd &mus, const std::function<double(double, double)> &blend_mu, FrictionConstraints &friction_constraint_set)
double ipc::compute_barrier_potential(const CollisionMesh &mesh, const Eigen::MatrixXd &V, const Constraints &constraint_set, const double dhat)

Compute the barrier potential for a given constraint set.

Parameters:
const CollisionMesh &mesh

[in] The collision mesh.

const Eigen::MatrixXd &V

[in] Vertices of the collision mesh.

const Constraints &constraint_set

[in] The set of constraints.

const double dhat

[in] The activation distance of the barrier.

Returns:

The sum of all barrier potentials (not scaled by the barrier stiffness).

Eigen::VectorXd ipc::compute_barrier_potential_gradient(const CollisionMesh &mesh, const Eigen::MatrixXd &V, const Constraints &constraint_set, const double dhat)

Compute the gradient of the barrier potential.

Parameters:
const CollisionMesh &mesh

[in] The collision mesh.

const Eigen::MatrixXd &V

[in] Vertices of the collision mesh.

const Constraints &constraint_set

[in] The set of constraints.

const double dhat

[in] The activation distance of the barrier.

Returns:

The gradient of all barrier potentials (not scaled by the barrier stiffness). This will have a size of |V|.

Eigen::SparseMatrix<double> ipc::compute_barrier_potential_hessian(const CollisionMesh &mesh, const Eigen::MatrixXd &V, const Constraints &constraint_set, const double dhat, const bool project_hessian_to_psd = true)

Compute the hessian of the barrier potential.

Parameters:
const CollisionMesh &mesh

[in] The collision mesh.

const Eigen::MatrixXd &V

[in] Vertices of the collision mesh.

const Constraints &constraint_set

[in] The set of constraints.

const double dhat

[in] The activation distance of the barrier.

const bool project_hessian_to_psd = true

[in] Make sure the hessian is positive semi-definite.

Returns:

The hessian of all barrier potentials (not scaled by the barrier stiffness). This will have a size of |V|x|V|.

template<typename T>
T ipc::compute_friction_potential(const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> &V1, const FrictionConstraints &friction_constraint_set, double epsv_times_h)

Compute the friction potential between two positions.

Parameters:
const CollisionMesh &mesh

[in] The collision mesh.

const Eigen::MatrixXd &V0

[in] Vertex positions at start of time-step (rowwise)

const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> &V1

[in] Current vertex positions (rowwise)

const FrictionConstraints &friction_constraint_set

[in] The set of friction constraints.

double epsv_times_h

[in] Tolerance for the transition between static and dynamic friction.

Eigen::VectorXd ipc::compute_friction_potential_gradient(const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const FrictionConstraints &friction_constraint_set, double epsv_times_h)

Compute the gradient of the friction potential wrt V1.

Parameters:
const CollisionMesh &mesh

[in] The collision mesh.

const Eigen::MatrixXd &V0

[in] Vertex positions at start of time-step (rowwise)

const Eigen::MatrixXd &V1

[in] Current vertex positions (rowwise)

const FrictionConstraints &friction_constraint_set

[in] The set of friction constraints.

double epsv_times_h

[in] Tolerance for the transition between static and dynamic friction.

Eigen::SparseMatrix<double> ipc::compute_friction_potential_hessian(const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const FrictionConstraints &friction_constraint_set, double epsv_times_h, bool project_hessian_to_psd = true)

Compute the Hessian of the friction potential wrt V1.

Parameters:
const CollisionMesh &mesh

[in] The collision mesh.

const Eigen::MatrixXd &V0

[in] Vertex positions at start of time-step (rowwise)

const Eigen::MatrixXd &V1

[in] Current vertex positions (rowwise)

const FrictionConstraints &friction_constraint_set

[in] The set of friction constraints.

double epsv_times_h

[in] Tolerance for the transition between static and dynamic friction.

Warning

doxygenfunction: Unable to resolve function “is_step_collision_free” with arguments (const CollisionMesh&, const Eigen::MatrixXd&, const Eigen::MatrixXd&, const BroadPhaseMethod, const double, const long) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:

- bool is_step_collision_free(const Candidates &candidates, const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const double min_distance = 0.0, const double tolerance = 1e-6, const long max_iterations = 1e7)
- bool is_step_collision_free(const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const BroadPhaseMethod method = BroadPhaseMethod::HASH_GRID, const double min_distance = 0.0, const double tolerance = 1e-6, const long max_iterations = 1e7)

Warning

doxygenfunction: Unable to resolve function “is_step_collision_free” with arguments (const Candidates&, const CollisionMesh&, const Eigen::MatrixXd&, const Eigen::MatrixXd&, const double, const long) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:

- bool is_step_collision_free(const Candidates &candidates, const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const double min_distance = 0.0, const double tolerance = 1e-6, const long max_iterations = 1e7)
- bool is_step_collision_free(const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const BroadPhaseMethod method = BroadPhaseMethod::HASH_GRID, const double min_distance = 0.0, const double tolerance = 1e-6, const long max_iterations = 1e7)

Warning

doxygenfunction: Unable to resolve function “compute_collision_free_stepsize” with arguments (const CollisionMesh&, const Eigen::MatrixXd&, const Eigen::MatrixXd&, const BroadPhaseMethod, const double, const long) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:

- double compute_collision_free_stepsize(const Candidates &candidates, const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const double min_distance = 0.0, const double tolerance = 1e-6, const long max_iterations = 1e7)
- double compute_collision_free_stepsize(const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const BroadPhaseMethod method = BroadPhaseMethod::HASH_GRID, const double min_distance = 0.0, const double tolerance = 1e-6, const long max_iterations = 1e7)

Warning

doxygenfunction: Unable to resolve function “compute_collision_free_stepsize” with arguments (const Candidates&, const CollisionMesh&, const Eigen::MatrixXd&, const Eigen::MatrixXd&, const double, const long) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:

- double compute_collision_free_stepsize(const Candidates &candidates, const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const double min_distance = 0.0, const double tolerance = 1e-6, const long max_iterations = 1e7)
- double compute_collision_free_stepsize(const CollisionMesh &mesh, const Eigen::MatrixXd &V0, const Eigen::MatrixXd &V1, const BroadPhaseMethod method = BroadPhaseMethod::HASH_GRID, const double min_distance = 0.0, const double tolerance = 1e-6, const long max_iterations = 1e7)

Last update: January 26, 2023