Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed May 14, 2024
1 parent 4de539f commit ebe5b33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
4 changes: 1 addition & 3 deletions src/compas_dr/constraints/constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ def get_constraint_cls(geometry, **kwargs):
if cls is not None:
break
if cls is None:
raise GeometryNotRegisteredAsConstraint(
"No constraint is registered for this geometry type: {}".format(gtype)
)
raise GeometryNotRegisteredAsConstraint("No constraint is registered for this geometry type: {}".format(gtype))
return cls

def __new__(cls, *args, **kwargs):
Expand Down
21 changes: 3 additions & 18 deletions src/compas_dr/solvers/dr.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,30 +255,15 @@ def a(t, V):
k1 = [[dt * a1[i][axis] for axis in (0, 1, 2)] for i in range(n)]
a2 = a(
K[2][0] * dt,
[
[V0[i][axis] + K[2][1] * k0[i][axis] + K[2][2] * k1[i][axis] for axis in (0, 1, 2)]
for i in range(n)
],
[[V0[i][axis] + K[2][1] * k0[i][axis] + K[2][2] * k1[i][axis] for axis in (0, 1, 2)] for i in range(n)],
)
k2 = [[dt * a2[i][axis] for axis in (0, 1, 2)] for i in range(n)]
a3 = a(
K[3][0] * dt,
[
[
V0[i][axis] + K[3][1] * k0[i][axis] + K[3][2] * k1[i][axis] + K[3][3] * k2[i][axis]
for axis in (0, 1, 2)
]
for i in range(n)
],
[[V0[i][axis] + K[3][1] * k0[i][axis] + K[3][2] * k1[i][axis] + K[3][3] * k2[i][axis] for axis in (0, 1, 2)] for i in range(n)],
)
k3 = [[dt * a3[i][axis] for axis in (0, 1, 2)] for i in range(n)]
return [
[
B[0] * k0[i][axis] + B[1] * k1[i][axis] + B[2] * k2[i][axis] + B[3] * k3[i][axis]
for axis in (0, 1, 2)
]
for i in range(n)
]
return [[B[0] * k0[i][axis] + B[1] * k1[i][axis] + B[2] * k2[i][axis] + B[3] * k3[i][axis] for axis in (0, 1, 2)] for i in range(n)]

raise NotImplementedError

Expand Down

0 comments on commit ebe5b33

Please sign in to comment.