Skip to content

Commit e190fb1

Browse files
committed
Small change
1 parent 59550cd commit e190fb1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Setup_geometry.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,11 +1529,8 @@ function find_slab_distance!(ls, d, X,Y,Z, Top, Bottom, trench::Trench)
15291529
poly_z = [pa[2],pb[2],pc[2],pd[2]];
15301530

15311531
# find a sub set of particles
1532-
ymin = minimum(poly_y);
1533-
ymax = maximum(poly_y);
1534-
1535-
zmin = minimum(poly_z);
1536-
zmax = maximum(poly_z);
1532+
ymin,ymax = extrema(poly_y);
1533+
zmin,zmax = extrema(poly_z);
15371534

15381535
ind_s = findall(0.0.<= Xrot.<= xb[1] .&& ymin .<= Yrot .<= ymax .&& zmin .<= Z .<= zmax);
15391536

0 commit comments

Comments
 (0)