From d3ec491cc68e2769b2746f1d266938742dac1caf Mon Sep 17 00:00:00 2001 From: zachferguson Date: Wed, 21 May 2025 13:02:09 -0400 Subject: [PATCH 1/3] Fix documentation warnings --- docs/source/Doxyfile | 17 ----- src/ipc/barrier/adaptive_stiffness.hpp | 1 - src/ipc/candidates/candidates.hpp | 5 +- src/ipc/ccd/additive_ccd.hpp | 9 ++- src/ipc/ccd/tight_inclusion_ccd.hpp | 2 + src/ipc/collision_mesh.hpp | 64 +++++++++---------- .../collisions/normal/normal_collisions.hpp | 2 +- src/ipc/distance/line_line.hpp | 12 ++-- src/ipc/ipc.hpp | 6 +- src/ipc/potentials/barrier_potential.hpp | 2 + src/ipc/potentials/normal_potential.hpp | 1 + src/ipc/potentials/potential.hpp | 1 + src/ipc/potentials/tangential_potential.hpp | 1 + src/ipc/utils/eigen_ext.hpp | 1 + 14 files changed, 57 insertions(+), 67 deletions(-) diff --git a/docs/source/Doxyfile b/docs/source/Doxyfile index 16df0acaa..af1193c20 100644 --- a/docs/source/Doxyfile +++ b/docs/source/Doxyfile @@ -1387,15 +1387,6 @@ HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_GAMMA = 80 -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will @@ -2056,14 +2047,6 @@ LATEX_HIDE_INDICES = NO LATEX_BIB_STYLE = plainnat -# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: NO. -# This tag requires that the tag GENERATE_LATEX is set to YES. - -LATEX_TIMESTAMP = NO - # The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute) # path from which the emoji images will be read. If a relative path is entered, # it will be relative to the LATEX_OUTPUT directory. If left blank the diff --git a/src/ipc/barrier/adaptive_stiffness.hpp b/src/ipc/barrier/adaptive_stiffness.hpp index 4b65cdf5b..8d70378cf 100644 --- a/src/ipc/barrier/adaptive_stiffness.hpp +++ b/src/ipc/barrier/adaptive_stiffness.hpp @@ -53,7 +53,6 @@ double update_barrier_stiffness( /// @brief Compute the semi-implicit stiffness for a single collision. /// See [Ando 2024] for details. /// @param stencil Collision stencil. -/// @param vertex_ids Vertex indices of the collision. /// @param vertices Vertex positions. /// @param mass Vertex masses. /// @param local_hess Local hessian of the elasticity energy function. diff --git a/src/ipc/candidates/candidates.hpp b/src/ipc/candidates/candidates.hpp index bf4bc03b5..76e863113 100644 --- a/src/ipc/candidates/candidates.hpp +++ b/src/ipc/candidates/candidates.hpp @@ -20,7 +20,7 @@ class Candidates { /// @param mesh The surface of the collision mesh. /// @param vertices Surface vertex positions (rowwise). /// @param inflation_radius Amount to inflate the bounding boxes. - /// @param broad_phase_method Broad phase method to use. + /// @param broad_phase Broad phase method to use. void build( const CollisionMesh& mesh, Eigen::ConstRef vertices, @@ -34,7 +34,7 @@ class Candidates { /// @param vertices_t0 Surface vertex starting positions (rowwise). /// @param vertices_t1 Surface vertex ending positions (rowwise). /// @param inflation_radius Amount to inflate the bounding boxes. - /// @param broad_phase_method Broad phase method to use. + /// @param broad_phase Broad phase method to use. void build( const CollisionMesh& mesh, Eigen::ConstRef vertices_t0, @@ -99,6 +99,7 @@ class Candidates { /// @param vertices_t1 Surface vertex ending positions (rowwise). /// @param dhat Barrier activation distance. /// @param min_distance The minimum distance allowable between any two elements. + /// @param broad_phase The broad phase algorithm to use. /// @param narrow_phase_ccd The narrow phase CCD algorithm to use. double compute_cfl_stepsize( const CollisionMesh& mesh, diff --git a/src/ipc/ccd/additive_ccd.hpp b/src/ipc/ccd/additive_ccd.hpp index 3bbef084e..72708e386 100644 --- a/src/ipc/ccd/additive_ccd.hpp +++ b/src/ipc/ccd/additive_ccd.hpp @@ -26,6 +26,7 @@ class AdditiveCCD : public NarrowPhaseCCD { static constexpr double DEFAULT_CONSERVATIVE_RESCALING = 0.9; /// @brief Construct a new AdditiveCCD object. + /// @param max_iterations The maximum number of iterations to use for the CCD algorithm. If set to UNLIMITTED_ITERATIONS, the algorithm will run until it converges. /// @param conservative_rescaling The conservative rescaling of the time of impact. AdditiveCCD( const long max_iterations = UNLIMITTED_ITERATIONS, @@ -39,7 +40,6 @@ class AdditiveCCD : public NarrowPhaseCCD { /// @param[out] toi The time of impact between the two points. /// @param min_distance The minimum distance between two objects. /// @param tmax The maximum time to check for collisions. - /// @param conservative_rescaling The conservative rescaling of the time of impact. /// @return True if a collision was detected, false otherwise. bool point_point_ccd( Eigen::ConstRef p0_t0, @@ -60,7 +60,6 @@ class AdditiveCCD : public NarrowPhaseCCD { /// @param[out] toi The time of impact between the point and the edge. /// @param min_distance The minimum distance between two objects. /// @param tmax The maximum time to check for collisions. - /// @param conservative_rescaling The conservative rescaling of the time of impact. /// @return True if a collision was detected, false otherwise. bool point_edge_ccd( Eigen::ConstRef p_t0, @@ -85,7 +84,6 @@ class AdditiveCCD : public NarrowPhaseCCD { /// @param[out] toi The time of impact between the point and the triangle. /// @param min_distance The minimum distance between two objects. /// @param tmax The maximum time to check for collisions. - /// @param conservative_rescaling The conservative rescaling of the time of impact. /// @return True if a collision was detected, false otherwise. bool point_triangle_ccd( Eigen::ConstRef p_t0, @@ -112,7 +110,6 @@ class AdditiveCCD : public NarrowPhaseCCD { /// @param[out] toi The time of impact between the two edges. /// @param min_distance The minimum distance between two objects. /// @param tmax The maximum time to check for collisions. - /// @param conservative_rescaling The conservative rescaling of the time of impact. /// @return True if a collision was detected, false otherwise. bool edge_edge_ccd( Eigen::ConstRef ea0_t0, @@ -135,11 +132,13 @@ class AdditiveCCD : public NarrowPhaseCCD { private: /// @brief Computes the time of impact between two objects using additive continuous collision detection. + /// @param x Initial positions + /// @param dx Displacements /// @param distance_squared A function that computes the squared distance between the two objects at a given time. + /// @param max_disp_mag The maximum displacement magnitude. /// @param[out] toi The time of impact between the two objects. /// @param min_distance The minimum distance between the objects. /// @param tmax The maximum time to check for collisions. - /// @param conservative_rescaling The amount to rescale the objects by to ensure conservative advancement. /// @return True if a collision was detected, false otherwise. bool additive_ccd( VectorMax12d x, // mutable copy diff --git a/src/ipc/ccd/tight_inclusion_ccd.hpp b/src/ipc/ccd/tight_inclusion_ccd.hpp index 6e5416de0..1fb572c6d 100644 --- a/src/ipc/ccd/tight_inclusion_ccd.hpp +++ b/src/ipc/ccd/tight_inclusion_ccd.hpp @@ -18,6 +18,8 @@ class TightInclusionCCD : public NarrowPhaseCCD { static constexpr double SMALL_TOI = 1e-6; /// @brief Construct a new AdditiveCCD object. + /// @param tolerance The tolerance used for the CCD algorithm. + /// @param max_iterations The maximum number of iterations for the CCD algorithm. /// @param conservative_rescaling The conservative rescaling of the time of impact. TightInclusionCCD( const double tolerance = DEFAULT_TOLERANCE, diff --git a/src/ipc/collision_mesh.hpp b/src/ipc/collision_mesh.hpp index 4f0dc4d93..ececc6e2b 100644 --- a/src/ipc/collision_mesh.hpp +++ b/src/ipc/collision_mesh.hpp @@ -13,9 +13,9 @@ class CollisionMesh { CollisionMesh() = default; /// @brief Construct a new Collision Mesh object directly from the collision mesh vertices. - /// @param rest_positions The vertices of the collision mesh at rest (#V × dim). - /// @param edges The edges of the collision mesh (#E × 2). - /// @param faces The faces of the collision mesh (#F × 3). + /// @param rest_positions The vertices of the collision mesh at rest (|V| × dim). + /// @param edges The edges of the collision mesh (|E| × 2). + /// @param faces The faces of the collision mesh (|F| × 3). /// @param displacement_map The displacement mapping from displacements on the full mesh to the collision mesh. CollisionMesh( Eigen::ConstRef rest_positions, @@ -26,9 +26,9 @@ class CollisionMesh { /// @brief Construct a new Collision Mesh object from a full mesh vertices. /// @param include_vertex Vector of bools indicating whether each vertex should be included in the collision mesh. - /// @param full_rest_positions The vertices of the full mesh at rest (#V × dim). - /// @param edges The edges of the collision mesh indexed into the full mesh vertices (#E × 2). - /// @param faces The faces of the collision mesh indexed into the full mesh vertices (#F × 3). + /// @param full_rest_positions The vertices of the full mesh at rest (|V| × dim). + /// @param edges The edges of the collision mesh indexed into the full mesh vertices (|E| × 2). + /// @param faces The faces of the collision mesh indexed into the full mesh vertices (|F| × 3). /// @param displacement_map The displacement mapping from displacements on the full mesh to the collision mesh. CollisionMesh( const std::vector& include_vertex, @@ -39,9 +39,9 @@ class CollisionMesh { Eigen::SparseMatrix()); /// @brief Helper function that automatically builds include_vertex using construct_is_on_surface. - /// @param full_rest_positions The full vertices at rest (#FV × dim). - /// @param edges The edge matrix of mesh (#E × 2). - /// @param faces The face matrix of mesh (#F × 3). + /// @param full_rest_positions The full vertices at rest (|FV| × dim). + /// @param edges The edge matrix of mesh (|E| × 2). + /// @param faces The face matrix of mesh (|F| × 3). /// @return Constructed CollisionMesh. static CollisionMesh build_from_full_mesh( Eigen::ConstRef full_rest_positions, @@ -91,22 +91,22 @@ class CollisionMesh { /// @brief Get the number of degrees of freedom in the full mesh. size_t full_ndof() const { return full_num_vertices() * dim(); } - /// @brief Get the vertices of the collision mesh at rest (#V × dim). + /// @brief Get the vertices of the collision mesh at rest (|V| × dim). const Eigen::MatrixXd& rest_positions() const { return m_rest_positions; } - /// @brief Get the indices of codimensional vertices of the collision mesh (#CV x 1). + /// @brief Get the indices of codimensional vertices of the collision mesh (|CV| x 1). const Eigen::VectorXi& codim_vertices() const { return m_codim_vertices; } - /// @brief Get the indices of codimensional edges of the collision mesh (#CE x 1). + /// @brief Get the indices of codimensional edges of the collision mesh (|CE| x 1). const Eigen::VectorXi& codim_edges() const { return m_codim_edges; } - /// @brief Get the edges of the collision mesh (#E × 2). + /// @brief Get the edges of the collision mesh (|E| × 2). const Eigen::MatrixXi& edges() const { return m_edges; } - /// @brief Get the faces of the collision mesh (#F × 3). + /// @brief Get the faces of the collision mesh (|F| × 3). const Eigen::MatrixXi& faces() const { return m_faces; } - /// @brief Get the mapping from faces to edges of the collision mesh (#F × 3). + /// @brief Get the mapping from faces to edges of the collision mesh (|F| × 3). const Eigen::MatrixXi& faces_to_edges() const { return m_faces_to_edges; } // const std::vector>& vertices_to_edges() const @@ -122,20 +122,20 @@ class CollisionMesh { // ----------------------------------------------------------------------- /// @brief Compute the vertex positions from the positions of the full mesh. - /// @param full_positions The vertex positions of the full mesh (#FV × dim). - /// @return The vertex positions of the collision mesh (#V × dim). + /// @param full_positions The vertex positions of the full mesh (|FV| × dim). + /// @return The vertex positions of the collision mesh (|V| × dim). Eigen::MatrixXd vertices(Eigen::ConstRef full_positions) const; /// @brief Compute the vertex positions from vertex displacements on the full mesh. - /// @param full_displacements The vertex displacements on the full mesh (#FV × dim). - /// @return The vertex positions of the collision mesh (#V × dim). + /// @param full_displacements The vertex displacements on the full mesh (|FV| × dim). + /// @return The vertex positions of the collision mesh (|V| × dim). Eigen::MatrixXd displace_vertices( Eigen::ConstRef full_displacements) const; /// @brief Map vertex displacements on the full mesh to vertex displacements on the collision mesh. - /// @param full_displacements The vertex displacements on the full mesh (#FV × dim). - /// @return The vertex displacements on the collision mesh (#V × dim). + /// @param full_displacements The vertex displacements on the full mesh (|FV| × dim). + /// @return The vertex displacements on the collision mesh (|V| × dim). Eigen::MatrixXd map_displacements( Eigen::ConstRef full_displacements) const; @@ -263,8 +263,8 @@ class CollisionMesh { /// @brief Construct a vector of bools indicating whether each vertex is on the surface. /// @param num_vertices The number of vertices in the mesh. - /// @param edges The surface edges of the mesh (#E × 2). - /// @param codim_vertices The indices of codimensional vertices (#CV x 1). + /// @param edges The surface edges of the mesh (|E| × 2). + /// @param codim_vertices The indices of codimensional vertices (|CV| x 1). /// @return A vector of bools indicating whether each vertex is on the surface. static std::vector construct_is_on_surface( const size_t num_vertices, @@ -272,8 +272,8 @@ class CollisionMesh { Eigen::ConstRef codim_vertices = Eigen::VectorXi()); /// @brief Construct a matrix that maps from the faces' edges to rows in the edges matrix. - /// @param faces The face matrix of mesh (#F × 3). - /// @param edges The edge matrix of mesh (#E × 2). + /// @param faces The face matrix of mesh (|F| × 3). + /// @param edges The edge matrix of mesh (|E| × 2). /// @return Matrix that maps from the faces' edges to rows in the edges matrix. static Eigen::MatrixXi construct_faces_to_edges( Eigen::ConstRef faces, @@ -303,19 +303,19 @@ class CollisionMesh { // ----------------------------------------------------------------------- - /// @brief The full vertex positions at rest (#FV × dim). + /// @brief The full vertex positions at rest (|FV| × dim). Eigen::MatrixXd m_full_rest_positions; - /// @brief The vertex positions at rest (#V × dim). + /// @brief The vertex positions at rest (|V| × dim). Eigen::MatrixXd m_rest_positions; - /// @brief The indices of codimensional vertices (#CV x 1). + /// @brief The indices of codimensional vertices (|CV| x 1). Eigen::VectorXi m_codim_vertices; - /// @brief The indices of codimensional edges (#CE x 1). + /// @brief The indices of codimensional edges (|CE| x 1). Eigen::VectorXi m_codim_edges; - /// @brief Edges as rows of indicies into vertices (#E × 2). + /// @brief Edges as rows of indicies into vertices (|E| × 2). Eigen::MatrixXi m_edges; - /// @brief Triangular faces as rows of indicies into vertices (#F × 3). + /// @brief Triangular faces as rows of indicies into vertices (|F| × 3). Eigen::MatrixXi m_faces; - /// @brief Map from faces edges to rows of edges (#F × 3). + /// @brief Map from faces edges to rows of edges (|F| × 3). Eigen::MatrixXi m_faces_to_edges; /// @brief Map from full vertices to collision vertices. diff --git a/src/ipc/collisions/normal/normal_collisions.hpp b/src/ipc/collisions/normal/normal_collisions.hpp index 8aa6ed762..1e85ca3a9 100644 --- a/src/ipc/collisions/normal/normal_collisions.hpp +++ b/src/ipc/collisions/normal/normal_collisions.hpp @@ -28,7 +28,7 @@ class NormalCollisions { /// @param vertices Vertices of the collision mesh. /// @param dhat The activation distance of the barrier. /// @param dmin Minimum distance. - /// @param broad_phase_method Broad-phase method to use. + /// @param broad_phase Broad-phase method to use. void build( const CollisionMesh& mesh, Eigen::ConstRef vertices, diff --git a/src/ipc/distance/line_line.hpp b/src/ipc/distance/line_line.hpp index dab39bf4b..e519d478b 100644 --- a/src/ipc/distance/line_line.hpp +++ b/src/ipc/distance/line_line.hpp @@ -9,8 +9,8 @@ namespace ipc { /// @warning If the lines are parallel this function returns a distance of zero. /// @param ea0 The first vertex of the edge defining the first line. /// @param ea1 The second vertex of the edge defining the first line. -/// @param ea0 The first vertex of the edge defining the second line. -/// @param ea1 The second vertex of the edge defining the second line. +/// @param eb0 The first vertex of the edge defining the second line. +/// @param eb1 The second vertex of the edge defining the second line. /// @return The distance between the two lines. double line_line_distance( Eigen::ConstRef ea0, @@ -23,8 +23,8 @@ double line_line_distance( /// @warning If the lines are parallel this function returns a distance of zero. /// @param ea0 The first vertex of the edge defining the first line. /// @param ea1 The second vertex of the edge defining the first line. -/// @param ea0 The first vertex of the edge defining the second line. -/// @param ea1 The second vertex of the edge defining the second line. +/// @param eb0 The first vertex of the edge defining the second line. +/// @param eb1 The second vertex of the edge defining the second line. /// @return The gradient of the distance wrt ea0, ea1, eb0, and eb1. Vector12d line_line_distance_gradient( Eigen::ConstRef ea0, @@ -37,8 +37,8 @@ Vector12d line_line_distance_gradient( /// @warning If the lines are parallel this function returns a distance of zero. /// @param ea0 The first vertex of the edge defining the first line. /// @param ea1 The second vertex of the edge defining the first line. -/// @param ea0 The first vertex of the edge defining the second line. -/// @param ea1 The second vertex of the edge defining the second line. +/// @param eb0 The first vertex of the edge defining the second line. +/// @param eb1 The second vertex of the edge defining the second line. /// @return The hessian of the distance wrt ea0, ea1, eb0, and eb1. Matrix12d line_line_distance_hessian( Eigen::ConstRef ea0, diff --git a/src/ipc/ipc.hpp b/src/ipc/ipc.hpp index bf00409e4..518cf4d21 100644 --- a/src/ipc/ipc.hpp +++ b/src/ipc/ipc.hpp @@ -19,7 +19,7 @@ namespace ipc { /// @param vertices_t0 Surface vertex vertices at start as rows of a matrix. /// @param vertices_t1 Surface vertex vertices at end as rows of a matrix. /// @param min_distance The minimum distance allowable between any two elements. -/// @param broad_phase_method The broad phase method to use. +/// @param broad_phase The broad phase method to use. /// @param narrow_phase_ccd The narrow phase CCD algorithm to use. /// @returns True if any collisions occur. bool is_step_collision_free( @@ -36,7 +36,7 @@ bool is_step_collision_free( /// @param vertices_t0 Vertex vertices at start as rows of a matrix. Assumes vertices_t0 is intersection free. /// @param vertices_t1 Surface vertex vertices at end as rows of a matrix. /// @param min_distance The minimum distance allowable between any two elements. -/// @param broad_phase_method The broad phase method to use. +/// @param broad_phase The broad phase method to use. /// @param narrow_phase_ccd The narrow phase CCD algorithm to use. /// @returns A step-size \f$\in [0, 1]\f$ that is collision free. A value of 1.0 if a full step and 0.0 is no step. double compute_collision_free_stepsize( @@ -53,7 +53,7 @@ double compute_collision_free_stepsize( /// @brief Determine if the mesh has self intersections. /// @param mesh The collision mesh. /// @param vertices Vertices of the collision mesh. -/// @param broad_phase_method The broad phase method to use. +/// @param broad_phase The broad phase method to use. /// @return A boolean for if the mesh has intersections. bool has_intersections( const CollisionMesh& mesh, diff --git a/src/ipc/potentials/barrier_potential.hpp b/src/ipc/potentials/barrier_potential.hpp index c63ad4b54..f054698e3 100644 --- a/src/ipc/potentials/barrier_potential.hpp +++ b/src/ipc/potentials/barrier_potential.hpp @@ -14,12 +14,14 @@ class BarrierPotential : public NormalPotential { public: /// @brief Construct a barrier potential. /// @param dhat The activation distance of the barrier. + /// @param use_physical_barrier Whether to use the physical barrier. explicit BarrierPotential( const double dhat, const bool use_physical_barrier = false); /// @brief Construct a barrier potential. /// @param barrier The barrier function. /// @param dhat The activation distance of the barrier. + /// @param use_physical_barrier Whether to use the physical barrier. BarrierPotential( const std::shared_ptr barrier, const double dhat, diff --git a/src/ipc/potentials/normal_potential.hpp b/src/ipc/potentials/normal_potential.hpp index a305a49a3..22f8c4ef6 100644 --- a/src/ipc/potentials/normal_potential.hpp +++ b/src/ipc/potentials/normal_potential.hpp @@ -53,6 +53,7 @@ class NormalPotential : public Potential { /// @brief Compute the hessian of the potential for a single collision. /// @param collision The collision. /// @param positions The collision stencil's positions. + /// @param project_hessian_to_psd Whether to project the hessian to the positive semi-definite cone. /// @return The hessian of the potential. MatrixMax12d hessian( const NormalCollision& collision, diff --git a/src/ipc/potentials/potential.hpp b/src/ipc/potentials/potential.hpp index d79a90a9f..d66cca617 100644 --- a/src/ipc/potentials/potential.hpp +++ b/src/ipc/potentials/potential.hpp @@ -69,6 +69,7 @@ template class Potential { /// @brief Compute the hessian of the potential for a single collision. /// @param collision The collision. /// @param x The collision stencil's degrees of freedom. + /// @param project_hessian_to_psd Whether to project the hessian to the positive semi-definite cone. /// @return The hessian of the potential. virtual MatrixMax12d hessian( const TCollision& collision, diff --git a/src/ipc/potentials/tangential_potential.hpp b/src/ipc/potentials/tangential_potential.hpp index 7dfa0e9ca..379590a9c 100644 --- a/src/ipc/potentials/tangential_potential.hpp +++ b/src/ipc/potentials/tangential_potential.hpp @@ -92,6 +92,7 @@ class TangentialPotential : public Potential { /// @brief Compute the hessian of the potential for a single collision. /// @param collision The collision /// @param velocities The collision stencil's velocities. + /// @param project_hessian_to_psd Whether to project the hessian to the positive semi-definite cone. /// @return The hessian of the potential. MatrixMax12d hessian( const TangentialCollision& collision, diff --git a/src/ipc/utils/eigen_ext.hpp b/src/ipc/utils/eigen_ext.hpp index 5bedf8083..bf0698245 100644 --- a/src/ipc/utils/eigen_ext.hpp +++ b/src/ipc/utils/eigen_ext.hpp @@ -139,6 +139,7 @@ using ArrayMax4i = ArrayMax4; /// @brief Matrix projection onto positive definite cone /// @param A Symmetric matrix to project +/// @param eps Minimum eigenvalue threshold /// @return Projected matrix template < typename _Scalar, From 531157e7d7db8308c6886dbbb0993eb6e02f01ab Mon Sep 17 00:00:00 2001 From: zachferguson Date: Wed, 21 May 2025 14:58:09 -0400 Subject: [PATCH 2/3] Remove fixed PYTHON_EXECUTABLE --- cmake/recipes/pybind11.cmake | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmake/recipes/pybind11.cmake b/cmake/recipes/pybind11.cmake index 6d9c46eaa..36bf55536 100644 --- a/cmake/recipes/pybind11.cmake +++ b/cmake/recipes/pybind11.cmake @@ -19,11 +19,5 @@ if (NOT DEFINED Python_FIND_FRAMEWORK) set(Python_FIND_FRAMEWORK "LAST") endif () -# Pybind11 still uses the deprecated FindPythonInterp. So let's call CMake's -# new FindPython module and set PYTHON_EXECUTABLE for Pybind11 to pick up. -# This works well with conda environments. -find_package(Python COMPONENTS Interpreter Development.Module REQUIRED) -set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) - include(CPM) CPMAddPackage("gh:pybind/pybind11@2.13.1") From 564a7f6f214ee700da5fdbbd18b7526007720ca1 Mon Sep 17 00:00:00 2001 From: zachferguson Date: Thu, 22 May 2025 10:24:17 -0400 Subject: [PATCH 3/3] Add optimization-based time integration section to simulation documentation --- docs/source/tutorial/simulation.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/source/tutorial/simulation.rst b/docs/source/tutorial/simulation.rst index efb1b5a9c..13c78d039 100644 --- a/docs/source/tutorial/simulation.rst +++ b/docs/source/tutorial/simulation.rst @@ -5,6 +5,21 @@ While the IPC Toolkit provides all the principle components of the IPC algorithm We provide several helper functions to make your job easier. The following examples show how to use these functions. +Optimization-Based Time Integration +----------------------------------- + +IPC defines barrier potential :math:`B(\mathbf{x})` and a friction potential :math:`D(\mathbf{v})`. To add these into a optimization-based time integration, we need to scale the potentials by the time-integrators acceleration scaling. For implicit Euler, this is h^2, where h is the timestep. + +With elasticity :math:`\Psi(\mathbf{x})`, the total optimization problem is: + +.. math:: + \mathbf{x}^{t+1} = \underset{\mathbf{x}}{\arg\min} ~ \tfrac{1}{2} (\mathbf{x} - \hat{\mathbf{x}})^\top\mathbf{M}(\mathbf{x}-\hat{\mathbf{x}})+h^2\Psi(\mathbf{x}) + h^2 \kappa B(\mathbf{x}) + h^2 D(\mathbf{v}(\mathbf{x})) + +where :math:`\hat{\mathbf{x}} = \mathbf{x}^t + h\mathbf{v}^t + h^2\mathbf{g}` is the time integration scheme-specific “predicted positions.” + +.. note:: + In \cite{Li2020}, all the constants are wrapped up into $\kappa$, which is adaptively modified. In follow-up works, we treat the barrier as a physical energy, and so it should have the same multiplier as the elastic energy ($h^2$ for implicit Euler). + Volumetric Meshes -----------------