In
|
if icell == previous_cells[end] |
to
some weird control flow with the boolean
trybrute.
It appears in multiple mutually exclusive if clauses.
Probably the code should be like
if icell == previous_cells[end]
icell = xFaceCells[2, xCellFaces[facetogo[cEG][imin], icell]]
if icell == 0
if trybrute
return gFindBruteForce!(xref, CF, x; eps)
else
@debug "could not find point in any cell and ended up at boundary of domain (maybe x lies outside of the domain ?)"
return 0
end
end
end
if icell == previous_cells[end - 1]
if trybrute
return gFindBruteForce!(xref, CF, x; eps)
else
@debug "could not find point in any cell and ended up at boundary of domain (maybe x lies outside of the domain ?)"
return 0
end
end
One can maybe put the duplicated if trybrute blocks in a local function.
In
ExtendableGrids.jl/src/cellfinder.jl
Line 161 in 783fdd3
ExtendableGrids.jl/src/cellfinder.jl
Line 177 in 783fdd3
trybrute.It appears in multiple mutually exclusive
ifclauses.Probably the code should be like
One can maybe put the duplicated
if trybruteblocks in a local function.