Skip to content

Commit

Permalink
Merge pull request #9539 from marcosvanella/master
Browse files Browse the repository at this point in the history
FDS Source : Add normal probes to CFACE file.
  • Loading branch information
marcosvanella authored May 26, 2021
2 parents 9999c5b + 60b85fa commit 5a1ff7e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Source/dump.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5107,6 +5107,12 @@ SUBROUTINE DUMP_CFACES_GEOM(FUNIT,STIME)
REAL(FB), ALLOCATABLE, DIMENSION(:) :: VERTS
INTEGER, ALLOCATABLE, DIMENSION(:) :: FACES, LOCATIONS,SURFIND,GEOMIND

!#define TEST_NORMAL_PROBE
#ifdef TEST_NORMAL_PROBE
INTEGER :: ICF, IND1, IND2
REAL(EB):: XLOC(1:6)
#endif

CALL GET_GEOMSIZES('INBOUND_FACES',0,0,0,0,0,0,NVERTS,NVERTS_CUTCELLS,NFACES,NFACES_CUTCELLS)

IF (NVERTS>0 .AND. NFACES>0) THEN
Expand Down Expand Up @@ -5138,6 +5144,22 @@ SUBROUTINE DUMP_CFACES_GEOM(FUNIT,STIME)
WRITE(FUNIT) (GEOMIND(I),I=1,NFACES)
ENDIF

#ifdef TEST_NORMAL_PROBE
IF (N_CFACE_CELLS>0) THEN
IF (ALLOCATED(VERTS)) DEALLOCATE(VERTS)
ALLOCATE(VERTS(1:6*N_CFACE_CELLS))
WRITE(FUNIT) N_CFACE_CELLS
DO ICF=1,N_CFACE_CELLS
IND1 = CFACE(ICF)%CUT_FACE_IND1
IND2 = CFACE(ICF)%CUT_FACE_IND2
XLOC(1:3) = (/ CFACE(ICF)%X, CFACE(ICF)%Y, CFACE(ICF)%Z /)
XLOC(4:6) = XLOC(1:3) + CUT_FACE(IND1)%INT_XN(1,IND2)*CFACE(ICF)%NVEC(IAXIS:KAXIS)
VERTS(6*(ICF-1)+1:6*ICF) = REAL(XLOC(1:6),FB)
ENDDO
WRITE(FUNIT) VERTS(1:6*N_CFACE_CELLS)
ENDIF
#endif

IF (NVERTS>0 .AND. NFACES>0) THEN
DEALLOCATE(VERTS)
DEALLOCATE(FACES)
Expand Down

0 comments on commit 5a1ff7e

Please sign in to comment.