From ae4eb610300c3f64d88e2445b83016ab7e6d066c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Le=C3=B3n=20Peri=C3=B1=C3=A1n?= Date: Wed, 20 Jan 2021 20:59:52 +0100 Subject: [PATCH] Update CLBacterium.cl Fixed issue with new Nvidia graphics cards, as explained in https://github.com/HaseloffLab/CellModeller/issues/28 --- CellModeller/Biophysics/BacterialModels/CLBacterium.cl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CellModeller/Biophysics/BacterialModels/CLBacterium.cl b/CellModeller/Biophysics/BacterialModels/CLBacterium.cl index f10e096d..b121da0d 100644 --- a/CellModeller/Biophysics/BacterialModels/CLBacterium.cl +++ b/CellModeller/Biophysics/BacterialModels/CLBacterium.cl @@ -132,6 +132,8 @@ void cyl_inertia_tensor(float muA, float l, float4 axis, float4 res[]) { float4 z_axis = {0.f, 0.f, 1.f, 0.f}; float rot_ang = acos(dot(x_axis, axis)); + float4 empty = {0.f, 0.f, 0.f, 0.f}; + float4 y_prime = y_axis; float4 z_prime = z_axis; @@ -144,12 +146,16 @@ void cyl_inertia_tensor(float muA, float l, float4 axis, float4 res[]) { M[0] = axis; M[1] = y_prime; M[2] = z_prime; - M[3] = 0.f; + M[3] = empty; float4 MT[4]; transpose(M, MT); float4 I[4]; + I[0] = empty; + I[1] = empty; + I[2] = empty; + I[3] = empty; I[0].s0 = 0.f; I[1].s1 = diag; I[2].s2 = diag;