Skip to content

Commit

Permalink
Merge pull request #10640 from marcosvanella/master
Browse files Browse the repository at this point in the history
FDS Source : Fix issue in ear clipping triangulation for linearized s…
  • Loading branch information
marcosvanella authored May 24, 2022
2 parents 552c16b + 019c59a commit fbf3e11
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Source/geom.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17008,11 +17008,11 @@ SUBROUTINE EAR_CLIP_CFACES(SIZE_CEELEM_SEG_CELL,NSEG,SEG_CELL,XYZVERT,&
COUNT_CEDGE = 0

! Compute segments director unit vectors and normals:
DO ISEG=1,NSEG
DV = XYZVERT(IAXIS:KAXIS,SEG_CELL(NOD2,ISEG)) - XYZVERT(IAXIS:KAXIS,SEG_CELL(NOD1,ISEG))
LEN_SEG(ISEG) = NORM2(DV)
N(IAXIS:KAXIS,ISEG) = 1._EB/LEN_SEG(ISEG) * DV
ENDDO
!DO ISEG=1,NSEG
! DV = XYZVERT(IAXIS:KAXIS,SEG_CELL(NOD2,ISEG)) - XYZVERT(IAXIS:KAXIS,SEG_CELL(NOD1,ISEG))
! LEN_SEG(ISEG) = NORM2(DV)
! N(IAXIS:KAXIS,ISEG) = 1._EB/LEN_SEG(ISEG) * DV
!ENDDO

! First sweep across segments defining triangles for all consecutive segments with same triangle and body:
NFACE = 0
Expand All @@ -17022,6 +17022,11 @@ SUBROUTINE EAR_CLIP_CFACES(SIZE_CEELEM_SEG_CELL,NSEG,SEG_CELL,XYZVERT,&
NSGP = NSG_POLY(IPOLY)
IHI = ILO_POLY(IPOLY)+NSGP
SEG_CELL2(:,1:NSGP) = SEG_CELL(:,ILO:IHI)
DO ISEG=1,NSGP ! Compute segments director unit vectors and normals
DV = XYZVERT(IAXIS:KAXIS,SEG_CELL2(NOD2,ISEG)) - XYZVERT(IAXIS:KAXIS,SEG_CELL2(NOD1,ISEG))
LEN_SEG(ISEG) = NORM2(DV)
N(IAXIS:KAXIS,ISEG) = 1._EB/LEN_SEG(ISEG) * DV
ENDDO
SEG_CELL_AUX(:,COUNT_CEDGE+1:COUNT_CEDGE+NSGP) = SEG_CELL(:,ILO:IHI)
COUNT_CEDGE = COUNT_CEDGE + NSGP
SEG_FLAG(1:NSGP) = .FALSE.
Expand Down

0 comments on commit fbf3e11

Please sign in to comment.