Skip to content

Commit 97b4369

Browse files
committed
Fix type errors by reverting to Float64s for now
1 parent 1ff4c6b commit 97b4369

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/nbody_to_ode.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ end
124124
function obtain_data_for_harmonic_bond_interaction(system::WaterSPCFw, p::SPCFwParameters)
125125
neighbouhoods = Dict{Int, Vector{Tuple{Int,Float64}}}()
126126
n = length(system.bodies)
127-
ms = zeros(typeof(first(system.bodies).m), 3 * n)
127+
ms = zeros(3 * n)
128128
for i in 1:n
129129
indO, indH1, indH2 = 3 * (i - 1) + 1, 3 * (i - 1) + 2, 3 * (i - 1) + 3
130130
ms[indO] = system.mO
@@ -162,7 +162,7 @@ end
162162
function obtain_data_for_lennard_jones_interaction(system::WaterSPCFw)
163163
bodies = system.bodies
164164
n = length(bodies)
165-
ms = zeros(typeof(first(bodies).m), 3 * n)
165+
ms = zeros(3 * n)
166166
indxs = zeros(Int, n)
167167
for i = 1:n
168168
indxs[i] = 3 * (i - 1) + 1
@@ -191,8 +191,8 @@ end
191191
function obtain_data_for_electrostatic_interaction(system::WaterSPCFw)
192192
bodies = system.bodies
193193
n = length(bodies)
194-
qs = zeros(typeof(first(bodies).m), 3 * n)
195-
ms = zeros(typeof(first(bodies).m), 3 * n)
194+
qs = zeros(3 * n)
195+
ms = zeros(3 * n)
196196
indxs = collect(1:3*n)
197197
exclude = Dict{Int, Vector{Int}}()
198198
for i = 1:n
@@ -222,7 +222,7 @@ function obtain_data_for_valence_angle_harmonic_interaction(system::WaterSPCFw)
222222
p = system.scpfw_parameters
223223
bonds = Vector{Tuple{Int, Int, Int, Float64, Float64}}()
224224
n = length(system.bodies)
225-
ms = zeros(typeof(first(bodies).m), 3 * n)
225+
ms = zeros(3 * n)
226226
for i = 1:n
227227
indO, indH1, indH2 = 3 * (i - 1) + 1, 3 * (i - 1) + 2, 3 * (i - 1) + 3
228228
ms[indO] = system.mO

0 commit comments

Comments
 (0)