Skip to content
Snippets Groups Projects
Commit 7ac25704 authored by Matthias Schmiddunser's avatar Matthias Schmiddunser
Browse files

Hotfix: Refine Surface on Outer Edge

parent 65ccea35
No related branches found
No related tags found
No related merge requests found
......@@ -225,17 +225,27 @@ do iedge=1,nedge
if (dist0>distmax) then
!maxdist in right hand triangle
tr1 = ed(iedge)%t1
maxdist1 = maxval( edlen(surface%icon(:,tr1)) )-eps
!If edge is part of the complex hull, one triangle is 0
!If not caught by if-clauses, this will cause segfault
if (tr1>0) then
maxdist1 = maxval( edlen(surface%icon(:,tr1)) )-eps
else
maxdist1 = 0.d0
end if
!maxdist in left hand triangle
tr2 = ed(iedge)%t2
maxdist2 = maxval( edlen(surface%icon(:,tr2)) )-eps
if (tr2>0) then
maxdist2 = maxval( edlen(surface%icon(:,tr2)) )-eps
else
maxdist2 = 0.d0
end if
!Is this edge one of the longest?
if (dist0>=maxdist1 .OR. dist0>=maxdist2) then
refine(iedge) = .true.
!block all edges in both triangles
do k = 1,3
blocked(surface%icon(k,tr1))=.true.
blocked(surface%icon(k,tr2))=.true.
if (tr1>0) blocked(surface%icon(k,tr1))=.true.
if (tr2>0) blocked(surface%icon(k,tr2))=.true.
end do
end if
end if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment