testcompare.F [SRC] [CPP] [JOB] [SCAN]
TOOLS / PREDATAS / FUNCTIONS



   1 | include(dom.inc)
   2 |       PROGRAM testcompare
   3 | 
   4 | !       ================================================================!
   5 | !                                                                       !
   6 | !       This test shows how to use the recursive function 'compare'     !
   7 | !       author: J. AMAYA (december 2007)                                !
   8 | !                                                                       !
   9 | !       ================================================================!
  10 | 
  11 |         IMPLICIT NONE
  12 |         DOM_INT, DIMENSION(4)      :: potn
  13 |         DOM_INT, DIMENSION(4,3)    :: nodp
  14 | 
  15 |         DOM_INT                    :: i, facepatch
  16 |         DOM_INT                    :: compare
  17 | 
  18 |         potn= (/ 2, 3, 3, 3 /)
  19 |         nodp(:,1) = (/ 2, 1, 3, 1 /)
  20 |         nodp(:,2) = (/ 5, 5, 5, 3 /)
  21 |         nodp(:,3) = (/ 0, 2, 2, 2 /)
  22 | 
  23 |         facepatch = 0
  24 | 
  25 |         DO i=1, potn(1)
  26 |           print*, " Calling compare: ", nodp(1,i), 2, 4
  27 |           facepatch = facepatch + compare(nodp(1,i), 2, potn, nodp, 4)
  28 |         ENDDO
  29 | 
  30 |         print*, "facepatch : ", facepatch
  31 | 
  32 |       END PROGRAM testcompare


testcompare.F could be called by:
testcompare.F [TOOLS/PREDATAS/FUNCTIONS] - 2