Skip to content

Commit

Permalink
corrected _integrate_along_segments for facets at r=0
Browse files Browse the repository at this point in the history
  • Loading branch information
Da-Be-Ru committed Oct 18, 2024
1 parent 8ba19a0 commit c880997
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/VoronoiFVMExtendableFEMBaseExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ function _integrate_along_segments(p1, p2, hnormal, aug_vec_block::AugmentedFEVe

edge_length = norm(p1 - p2, 2)
avg_r = (p1[1] + p2[1]) / 2
if avg_r < eps()
return 0
end
bp1 = zeros(3)
CF = aug_vec_block.cellfinder
icell::Int = gFindLocal!(bp1, CF, p1; eps=interpolate_eps)
Expand Down Expand Up @@ -198,6 +201,8 @@ function _integrate_along_segments(p1, p2, hnormal, aug_vec_block::AugmentedFEVe
p1_temp[1:2] = p1 + 10 * interpolate_eps * (p2 - p1)
icell_new = gFindLocal!(bp1, CF, p1_temp[1:2]; eps=10 * interpolate_eps, icellstart=icell)
if icell_new == 0
# TODO: test the following
# icell_new = gFindBruteForce!(bp1, CF, p1_temp[1:2])
@warn "icell_new=0!"
end
if icell_new != icell
Expand Down

0 comments on commit c880997

Please sign in to comment.