addfatnode.F [SRC] [CPP] [JOB] [SCAN]
TOOLS / PREDATAS / DATAS



   1 | include(dom.inc)
   2 |       SUBROUTINE addfatnode (thisnode)
   3 | 
   4 | !       ================================================================!
   5 | !                                                                       !
   6 | !       addfatnode.F : Adds the 'current_face' to the linked list of    !
   7 | !                      faces 'facesatnode' at wich the node 'thisnode'  !
   8 | !                      is relied                                        !
   9 | !                                                                       !
  10 | !       in           : The number of the node 'thisnode'                !
  11 | !                      The 'current_face' must be  pointed to the face  !
  12 | !                      to link before calling this subroutine.          !
  13 | !       out          : The face is linked to 'facesatnode'              !
  14 | !                                                                       !
  15 | !       author       : J. AMAYA (avril 2007)                            !
  16 | !                                                                       !
  17 | !       ================================================================!
  18 | 
  19 |         USE datas
  20 | 
  21 | !       IN
  22 |         DOM_INT :: thisnode
  23 | 
  24 | !       LOCAL
  25 |         type(fatnode), pointer   :: facetoadd
  26 |         type(fatnode), pointer   :: fat_pt
  27 | 
  28 | !       ----------------------------------------------------!
  29 | !       Allocate new linked face and point at currrent_face !
  30 | !       ----------------------------------------------------!
  31 | 
  32 |         ALLOCATE(facetoadd)
  33 |         NULLIFY(facetoadd%next_fatnode)
  34 |         facetoadd%fatthisnode => current_face
  35 | 
  36 | !       --------------------------!
  37 | !       Link the face to the list !
  38 | !       --------------------------!
  39 | 
  40 | !        print*, "adding fat node ", thisnode
  41 |         IF (ASSOCIATED(facesatnode(thisnode)%fatnode_ptr)) THEN
  42 | 
  43 | !          print*, "  Pointing at first face of this node"
  44 |           fat_pt => facesatnode(thisnode)%fatnode_ptr
  45 | 
  46 |           DO WHILE(ASSOCIATED(fat_pt%next_fatnode))
  47 | 
  48 | !            print*, "    next face..."
  49 |             fat_pt => fat_pt%next_fatnode
  50 | 
  51 |           ENDDO
  52 | 
  53 | !          print*, "  Adding face at the end of the list"
  54 |           fat_pt%next_fatnode => facetoadd
  55 | 
  56 |         ELSE
  57 | 
  58 | !          print*, "  Pointing first face, bcs empty list"
  59 |           facesatnode(thisnode)%fatnode_ptr => facetoadd
  60 | 
  61 |         ENDIF
  62 |         
  63 |       END SUBROUTINE addfatnode


addfatnode.F could be called by:
addface.F [TOOLS/PREDATAS/DATAS] - 109
Makefile [TOOLS/PREDATAS] - 71