File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -138,21 +138,20 @@ function distmesh(fdist::Function,
138
138
move = sqrt (sum ((p[i]- p0). ^ 2 )) # compute movement from the displacement
139
139
d_est = pt_dists[i] + move # apply the movement to our cache point
140
140
d = d_est < - geps ? d_est : fdist (result. points[i]) # determine if we need correct or approximate distance
141
- pt_dists[i] = d # store distance
142
141
143
142
if d < - geps
144
143
maxdp = max (maxdp, setup. deltat* sqrt (sum (dp[i]. ^ 2 )))
145
144
end
146
145
147
146
if d <= setup. iso
147
+ pt_dists[i] = d # store distance
148
148
maxmove = max (move,maxmove)
149
- continue
149
+ else
150
+ # bring points back to boundary if outside using central difference
151
+ p[i] = p[i] .- centraldiff (fdist,p[i]).* (d+ setup. iso)
152
+ maxmove = max (sqrt (sum ((p[i]- p0). ^ 2 )), maxmove)
153
+ pt_dists[i] = setup. iso # ideally
150
154
end
151
-
152
- # bring points back to boundary if outside using central difference
153
- p[i] = p[i] .- centraldiff (fdist,p[i]).* (d+ setup. iso)
154
- maxmove = max (sqrt (sum ((p[i]- p0). ^ 2 )), maxmove)
155
- pt_dists[i] = setup. iso # ideally
156
155
end
157
156
158
157
# increment iteration counter
You can’t perform that action at this time.
0 commit comments