Hi

How do you clear this error please do help me at the earliest.

gmsh.initialize(ARGS)

gmsh.option.setNumber(“General.Terminal”, 1)

gmsh.model.add(“Jayanth model”)

using LinearAlgebra

gmsh.initialize(ARGS)

gmsh.option.setNumber(“General.Terminal”, 1)

gmsh.model.add(“Jayanth model”)

#Diemensions of the RVE_Box

x1 = 0.0; y1 = 0.0; z1 = 0.0;

l1 = 10.0; l2 = 10.0; l3 = 10.0;

gr = 1 # Graphite radius

fr = 1.1 # Ferrite radius

# x[v] = x[i];

toler = 2 * fr # tolerance value assumed

n = 5 # Number of nodules

g = zeros(n,1)

f = zeros(n,1)

b = gmsh.model.occ.addBox(x1, y1, z1, l1, l2, l3)

```
gmsh.model.occ.synchronize()
box = gmsh.model.addPhysicalGroup(3, [b], 1000)
gmsh.model.setPhysicalName(3, box, "Box")
gmsh.model.occ.synchronize()
p = 1
x = zeros(n,1);
y = zeros(n,1);
z = zeros(n,1);
```

for i = 1:n

global p,x,y,z,d,v

# global b

x[i] = norm(l1*rand(1));
y[i] = norm(l2*rand(1));

z[i] = norm(l3*rand(1));

if i == 1

d = zeros(n,n)

x_new = zeros(n,1);

y_new = zeros(n,1);

z_new = zeros(n,1);

```
v = zeros(n,n)
#q = zeros(n,n)
```

end

```
for j = 1:n
d[i,j] = sqrt((x[i]-x[j])^2+(y[i]-y[j])^2+(z[i]-z[j])^2);
if d[i,j] > toler
#q[i,j] = i
v[i,j] = j
else
#q[i,j] = 0
v[i,j] = 0
end
end
#y[v] = y[i];
# z[v] = z[i];
# i[v] = i;
#j[v] = j;
```

g[i] = gmsh.model.occ.addSphere(x, y, z, gr, (2*i-1)+1+p, -π/2, π/2, 2*π)

#println(“Graphite nodule number “,i,” is created.”)

gmsh.model.occ.synchronize()

f[i] = gmsh.model.occ.addSphere(x, y, z, fr, 2*i+1+p, -π/2, π/2, 2*π)

#println(“Ferrite number “,i,” is created.”)

gmsh.model.occ.synchronize()

end

LoadError: MethodError: Cannot `convert`

an object of type Array{Float64,2} to an object of type Float64

Closest candidates are:

convert(::Type{T}, ::T) where T<:Number at number.jl:6

convert(::Type{T}, ::Number) where T<:Number at number.jl:7

convert(::Type{T}, ::Base.TwicePrecision) where T<:Number at twiceprecision.jl:250