printfacesinfo.F [SRC] [CPP] [JOB] [SCAN]
TOOLS / PREDATAS / INOUT



   1 | include(dom.inc)
   2 |       SUBROUTINE printfacesinfo
   3 | 
   4 | !       ================================================================!
   5 | !                                                                       !
   6 | !       printfacesinfo.F : Prints information about the created faces   !
   7 | !                                                                       !
   8 | !       author           : J. AMAYA (avril 2007)                        !
   9 | !                                                                       !
  10 | !       ================================================================!
  11 | 
  12 |         USE datas
  13 |         IMPLICIT NONE
  14 | 
  15 | !       LOCAL
  16 |         type(face), pointer :: face_pt
  17 |         DOM_INT :: n1, n2, n3, n4
  18 |         DOM_INT :: m1, m2, m3, m4
  19 | 
  20 |         face_pt => face_list
  21 |         WRITE(*,*) "--- Faces info: ---"
  22 | 
  23 |         DO WHILE (ASSOCIATED(face_pt))
  24 | 
  25 | !         --------------!
  26 | !         Get face info !
  27 | !         --------------!
  28 |           WRITE(*,*) "Face id: ", face_pt%face_id
  29 |           WRITE(*,*) "Parents: ", face_pt%i_nbparents
  30 |           WRITE(*,*) "Nodes  : ", face_pt%i_nbnodes
  31 |           n1 = face_pt%face_point(1,1)
  32 |           n2 = face_pt%face_point(2,1)
  33 |           IF (face_pt%i_nbnodes.ge.3) THEN 
  34 |              n3 = face_pt%face_point(3,1)
  35 |           ENDIF
  36 | 
  37 | !         ---------------!
  38 | !         If its a quad: !
  39 | !         ---------------!
  40 |           IF (face_pt%i_nbnodes.ge.4) THEN
  41 |             n4 = face_pt%face_point(4,1)
  42 |           ENDIF
  43 | 
  44 | !         ---------------------------------!
  45 | !         if the face has a second parent: !
  46 | !         ---------------------------------!
  47 |           IF (face_pt%i_nbparents.eq.2) THEN
  48 |             m1 = face_pt%face_point(1,2)
  49 |             m2 = face_pt%face_point(2,2)
  50 | 
  51 |             IF (face_pt%i_nbnodes.ge.3) THEN
  52 |               m3 = face_pt%face_point(3,2)
  53 |             ENDIF
  54 | 
  55 |             IF (face_pt%i_nbnodes.ge.4) THEN
  56 |               m4 = face_pt%face_point(4,2)
  57 |             ENDIF
  58 | 
  59 |           ENDIF
  60 | 
  61 | !         -----------------------------------!
  62 | !         Print nodes in the original order: !
  63 | !         -----------------------------------!
  64 |           WRITE(*,*) "nodes - 1st parent: ", n1, n2, n3, n4
  65 |           IF (face_pt%i_nbparents.eq.2) THEN
  66 |             WRITE(*,*) "nodes - 2nd parent: ", m1, m2, m3, m4
  67 |           ENDIF
  68 | 
  69 | !         ------------------------------------------!
  70 | !         Print the normal and the area of the face !
  71 | !         ------------------------------------------!
  72 | !          WRITE(*,'(A,4f9.5)') " Normal - 1st parent: ",                &
  73 |           WRITE(*,*) " Normal - 1st parent: ",                          &
  74 |      &                             face_pt%face_normal(1,1),            &
  75 |      &                             face_pt%face_normal(2,1),            &
  76 |      &                             face_pt%face_normal(3,1),            &
  77 |      &                             face_pt%face_normal(4,1)
  78 | 
  79 | 
  80 |           WRITE(*,'(A,1f9.5)') " Area: ", face_pt%area
  81 | 
  82 |           WRITE(*,*)
  83 | 
  84 | !         ----------!
  85 | !         Next face !
  86 | !         ----------!
  87 |           face_pt => face_pt%next_face
  88 | 
  89 |         ENDDO
  90 | 
  91 |       END SUBROUTINE printfacesinfo


printfacesinfo.F could be called by:
avbptest.F [TOOLS/PREDATAS/EXAMPLES] - 43
ptrtest.F [TOOLS/PREDATAS/EXAMPLES] - 154