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



   1 | include(dom.inc)
   2 | 
   3 |       SUBROUTINE detectpatch(nvert, nodelist, facepatch, nodepatch, nn)
   4 | 
   5 | !     ==================================================================!
   6 | !                                                                       !
   7 | !     detectpatch.F : This subroutine detects wich is the common patch  !
   8 | !                     to all the nodes in a boundary face.              !
   9 | !                                                                       !
  10 | !     in            : The list of the nodes to be tested 'nodelist'     !
  11 | !                     The number of nodes to be tested 'nvert'          !
  12 | !                     The list of the nodes and the associated patches  !
  13 | !                     The total number of nodes 'nn'                    !
  14 | !                                                                       !
  15 | !     out           : 'facepatch' the patch of the evaluated face.      !
  16 | !                                                                       !
  17 | !     author    : J. Amaya (december 2007)                              !
  18 | !                                                                       !
  19 | !     ==================================================================!
  20 | 
  21 |         USE avbp_exBound
  22 | 
  23 |         IMPLICIT NONE
  24 | 
  25 | !       IN
  26 |         DOM_INT                     :: nvert
  27 |         DOM_INT                     :: nn
  28 |         DOM_INT, DIMENSION(nvert)   :: nodelist
  29 |         DOM_INT, DIMENSION(0:exBound_npbound,nn)   :: nodepatch
  30 | 
  31 | !       OUT
  32 |         DOM_INT                     :: facepatch
  33 | 
  34 | !       LOCAL
  35 |         DOM_INT                     :: i, n
  36 |         DOM_INT                     :: thisnode, compare
  37 |         DOM_INT, DIMENSION(nvert)   :: patchesofthisnode
  38 |         DOM_INT, DIMENSION(nvert,3) :: thisnodepatch
  39 | 
  40 | !       ---------------------------------------!
  41 | !       Fill vectors with boundary information !
  42 | !       ---------------------------------------!
  43 | 
  44 |         patchesofthisnode = 0
  45 | 
  46 |         DO i=1, nvert
  47 |           thisnode = nodelist(i)
  48 | 
  49 | !         ----------------------------------------------!
  50 | !         Fill the vector with the patches of this node !
  51 | !         ----------------------------------------------!
  52 | 
  53 |           n = nodepatch(0,thisnode)
  54 |           patchesofthisnode(i) = n
  55 |           thisnodepatch(i,1:n) = nodepatch(1:n,thisnode)
  56 | 
  57 |         ENDDO
  58 | 
  59 | !       -----------------------------------------------!
  60 | !       Recursive search for common patch to all nodes !
  61 | !       -----------------------------------------------!
  62 | 
  63 |         facepatch = 0
  64 | 
  65 |         DO i=1, patchesofthisnode(1)
  66 | 
  67 |           facepatch = facepatch + compare(thisnodepatch(1,i), 2,        &
  68 |      &                patchesofthisnode, thisnodepatch, nvert)
  69 |           IF (facepatch.ne.0) EXIT
  70 | 
  71 |         ENDDO
  72 | 
  73 |       END SUBROUTINE detectpatch


detectpatch.F could be called by:
avbp2dom.F [TOOLS/PREDATAS/INOUT] - 232 - 238 - 244 - 272 - 278 - 284 - 290 - 318 - 324 - 330 - 336 - 364 - 371 - 378 - 385 - 392 - 399
Makefile [TOOLS/PREDATAS] - 99