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



   1 | include(dom.inc)
   2 |       SUBROUTINE printcellsinfo(ndirs)
   3 | 
   4 | !       ================================================================!
   5 | !                                                                       !
   6 | !       printcellsinfo.F : Prints information about the created cells   !
   7 | !       in               : The number of directions 'ndirs'             !
   8 | !                                                                       !
   9 | !       author           : J. AMAYA (avril 2007)                        !
  10 | !                                                                       !
  11 | !       ================================================================!
  12 | 
  13 |         USE datas
  14 |         IMPLICIT NONE
  15 | 
  16 | !       IN
  17 |         DOM_INT :: ndirs
  18 | 
  19 | !       LOCAL
  20 |         type(cell), pointer  :: cell_pt
  21 |         DOM_INT              :: i
  22 | 
  23 |         cell_pt => cell_list
  24 | 
  25 |         WRITE(*,*) " --- Cell info: ---"
  26 | 
  27 |         DO WHILE(ASSOCIATED(cell_pt))
  28 |           WRITE(*,*)
  29 |           WRITE(*,*) "Cell id: ", cell_pt%cell_id
  30 |           WRITE(*,*) "Nb. faces: ", cell_pt%i_nbfaces
  31 | 
  32 |           WRITE(*,*) "Faces: "
  33 | 
  34 |           DO i=1, cell_pt%i_nbfaces
  35 |             WRITE(*,*) "   ",cell_pt%cell_face(i)%face_ptr%face_id
  36 |           ENDDO
  37 | 
  38 |           WRITE(*,*) "Neighbour cells:"
  39 | 
  40 |           DO i=1, ndirs
  41 |             IF (ASSOCIATED(cell_pt%cell_dir(i)%cell_ptr)) THEN
  42 |               WRITE(*,*) "dir ",i,": ",cell_pt%cell_dir(i)%              &
  43 |      &                                cell_ptr%cell_id
  44 |             ENDIF
  45 |           ENDDO
  46 |           WRITE(*,*) "Cell volume: ", cell_pt%volume
  47 | 
  48 |           cell_pt => cell_pt%next_cell
  49 |         ENDDO
  50 | 
  51 |       END SUBROUTINE printcellsinfo


printcellsinfo.F could be called by:
avbptest.F [TOOLS/PREDATAS/EXAMPLES] - 66
ptrtest.F [TOOLS/PREDATAS/EXAMPLES] - 175