Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit e0c68dc

Browse files
committed
fix python compilation
1 parent 446c384 commit e0c68dc

File tree

12 files changed

+42
-41
lines changed

12 files changed

+42
-41
lines changed

.github/workflows/pypi.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: PyPi Release
22

33
on:
44
workflow_dispatch:
5-
# release:
6-
# types: [published]
7-
# push:
8-
# branches:
9-
# - pypi
10-
# - main
11-
# - python
12-
# pull_request:
13-
# branches:
14-
# - main
5+
release:
6+
types: [published]
7+
push:
8+
branches:
9+
- pypi
10+
- main
11+
- python
12+
pull_request:
13+
branches:
14+
- main
1515

1616
jobs:
1717
build_wheels:

.github/workflows/python.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
name: Python
22

33
on:
4-
# push:
5-
# branches: [main]
6-
# pull_request:
7-
# paths:
8-
# - '.github/workflows/python.yml'
9-
# - 'cmake/**'
10-
# - 'python/src/**'
11-
# - 'python/src/CMakeLists.txt'
12-
# - 'src/**'
13-
# - 'CMakeLists.txt'
14-
# - 'MANIFEST.in'
15-
# - 'pyproject.toml'
16-
# - 'setup.py'
4+
push:
5+
branches: [main]
6+
pull_request:
7+
paths:
8+
- '.github/workflows/python.yml'
9+
- 'cmake/**'
10+
- 'python/src/**'
11+
- 'python/src/CMakeLists.txt'
12+
- 'src/**'
13+
- 'CMakeLists.txt'
14+
- 'MANIFEST.in'
15+
- 'pyproject.toml'
16+
- 'setup.py'
1717

1818
jobs:
1919
Build:

python/src/barrier/adaptive_stiffness.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void define_adaptive_stiffness(py::module_& m)
7272
m.def(
7373
"semi_implicit_stiffness",
7474
static_cast<double (*)(
75-
const CollisionStencil&, Eigen::ConstRef<VectorMax12d>,
75+
const CollisionStencil<4>&, Eigen::ConstRef<VectorMax12d>,
7676
Eigen::ConstRef<VectorMax4d>, Eigen::ConstRef<MatrixMax12d>,
7777
const double)>(&semi_implicit_stiffness),
7878
R"ipc_Qu8mg5v7(

python/src/bindings.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <ccd/bindings.hpp>
88
#include <collisions/bindings.hpp>
99
#include <distance/bindings.hpp>
10-
// #include <friction/bindings.hpp>
10+
#include <friction/bindings.hpp>
1111
#include <implicits/bindings.hpp>
1212
#include <potentials/bindings.hpp>
1313
#include <tangent/bindings.hpp>

python/src/candidates/candidates.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void define_candidates(py::module_& m)
5353
.def("clear", &Candidates::clear)
5454
.def(
5555
"__getitem__",
56-
[](Candidates& self, size_t i) -> CollisionStencil& {
56+
[](Candidates& self, size_t i) -> CollisionStencil<4>& {
5757
return self[i];
5858
},
5959
py::return_value_policy::reference)

python/src/candidates/edge_edge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace ipc;
77

88
void define_edge_edge_candidate(py::module_& m)
99
{
10-
py::class_<EdgeEdgeCandidate, CollisionStencil>(m, "EdgeEdgeCandidate")
10+
py::class_<EdgeEdgeCandidate, CollisionStencil<4>>(m, "EdgeEdgeCandidate")
1111
.def(
1212
py::init<index_t, index_t>(), py::arg("edge0_id"),
1313
py::arg("edge1_id"))

python/src/candidates/edge_vertex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace ipc;
77

88
void define_edge_vertex_candidate(py::module_& m)
99
{
10-
py::class_<EdgeVertexCandidate, CollisionStencil>(m, "EdgeVertexCandidate")
10+
py::class_<EdgeVertexCandidate, CollisionStencil<4>>(m, "EdgeVertexCandidate")
1111
.def(
1212
py::init<index_t, index_t>(), py::arg("edge_id"),
1313
py::arg("vertex_id"))

python/src/candidates/face_vertex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace ipc;
77

88
void define_face_vertex_candidate(py::module_& m)
99
{
10-
py::class_<FaceVertexCandidate, CollisionStencil>(m, "FaceVertexCandidate")
10+
py::class_<FaceVertexCandidate, CollisionStencil<4>>(m, "FaceVertexCandidate")
1111
.def(
1212
py::init<index_t, index_t>(), py::arg("face_id"),
1313
py::arg("vertex_id"))

python/src/candidates/vertex_vertex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace ipc;
77

88
void define_vertex_vertex_candidate(py::module_& m)
99
{
10-
py::class_<VertexVertexCandidate, CollisionStencil>(
10+
py::class_<VertexVertexCandidate, CollisionStencil<4>>(
1111
m, "VertexVertexCandidate")
1212
.def(
1313
py::init<index_t, index_t>(), py::arg("vertex0_id"),

python/src/collisions/normal/normal_collisions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void define_SmoothCollisions(py::module_& m, std::string name)
2222
.def(
2323
"build",
2424
py::overload_cast<
25-
const CollisionMesh&, const Eigen::MatrixXd&, const ParameterType, const bool, const BroadPhaseMethod>(&SmoothCollisions<dim>::build),
25+
const CollisionMesh&, Eigen::ConstRef<Eigen::MatrixXd>, const ParameterType, const bool, std::shared_ptr<BroadPhase>>(&SmoothCollisions<dim>::build),
2626
R"ipc_Qu8mg5v7(
2727
Initialize the set of collisions used to compute the barrier potential.
2828
@@ -34,7 +34,7 @@ void define_SmoothCollisions(py::module_& m, std::string name)
3434
broad_phase: Broad phase method.
3535
)ipc_Qu8mg5v7",
3636
py::arg("mesh"), py::arg("vertices"), py::arg("param"),
37-
py::arg("use_adaptive_dhat") = false, py::arg("broad_phase") = DEFAULT_BROAD_PHASE_METHOD)
37+
py::arg("use_adaptive_dhat") = false, py::arg("broad_phase") = make_default_broad_phase())
3838
.def(
3939
"compute_minimum_distance", &SmoothCollisions<dim>::compute_minimum_distance,
4040
R"ipc_Qu8mg5v7(

0 commit comments

Comments
 (0)