From 032c006035e746eb96826ebb28b78b405d221cfb Mon Sep 17 00:00:00 2001 From: FantasyVR Date: Fri, 8 Oct 2021 16:29:14 +0800 Subject: [PATCH] format --- examples/simulation/implicit_mass_spring.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/simulation/implicit_mass_spring.py b/examples/simulation/implicit_mass_spring.py index 2dd8093324caf..da743c34fb101 100644 --- a/examples/simulation/implicit_mass_spring.py +++ b/examples/simulation/implicit_mass_spring.py @@ -130,7 +130,8 @@ def compute_Jacobians(self): l = dx.norm() if l != 0.0: l = 1.0 / l - self.Jx[i] = (I - self.rest_len[i] * l * (I - dxtdx * l**2)) * self.ks + self.Jx[i] = (I - self.rest_len[i] * l * + (I - dxtdx * l**2)) * self.ks self.Jv[i] = self.kd * I @ti.kernel @@ -185,7 +186,7 @@ def assemble_D(self, D: ti.sparse_matrix_builder()): def updatePosVel(self, h: ti.f32, dv: ti.ext_arr()): for i in self.pos: if self.invMass[i] != 0.0: - self.vel[i] += ti.Vector([dv[2*i], dv[2*i+1]]) + self.vel[i] += ti.Vector([dv[2 * i], dv[2 * i + 1]]) self.pos[i] += h * self.vel[i] def update(self, h):