createdirections.F [SRC] [CPP] [JOB] [SCAN]
TOOLS / PREDATAS / QUADRATURE



   1 | include(dom.inc)
   2 | 
   3 |       SUBROUTINE createdirections(quadtype,quadorder,inpath,ndirs,si)
   4 | 
   5 | !       ===============================================================!
   6 | !                                                                      !
   7 | !       createdirections.F: Sets up the directions for pre processing  !
   8 | !                                                                      !
   9 | !       in                : The quadrature files and quadrature type.  !
  10 | !                                                                      !
  11 | !       out               : The total number of directions: ndirs and  !
  12 | !                           the vector si(4,ndirs) that contains all   !
  13 | !                           directions components si(1:3,i), plus the  !
  14 | !                           quadrature weight si(4,i) for each         !
  15 | !                           direction i                                !
  16 | !                                                                      !
  17 | !       author            : J. AMAYA (December 2007)                   !
  18 | !                                                                      !
  19 | !       ===============================================================!
  20 | 
  21 |         IMPLICIT NONE
  22 | 
  23 |         include 'dom_constants.h'
  24 | 
  25 | !       IN
  26 |         CHARACTER*80           :: quadtype, inpath
  27 |         DOM_INT                :: quadorder
  28 |         DOM_INT                :: ndirs
  29 | 
  30 | !       OUT
  31 |         DOM_REAL, DIMENSION(4,ndirs) :: si
  32 | 
  33 | !       LOCAL
  34 |         DOM_INT                :: i
  35 | 
  36 | !       -----------------------------------------------------!
  37 | !       Calculate the number of directions for Sn quadrature !
  38 | !       -----------------------------------------------------!
  39 | 
  40 |         IF (quadtype.eq.SNDOM) THEN
  41 |           SELECT CASE (quadorder)
  42 |           CASE(2)
  43 |             OPEN (UNIT=21, FILE=trim(inpath)//"/S2.dat")
  44 |             DO i=1,ndirs
  45 |               READ(21,*) si(1,i),si(2,i),si(3,i),si(4,i)
  46 |             ENDDO
  47 |             CLOSE(21)
  48 |           CASE(4)
  49 |             OPEN (UNIT=21, FILE=trim(inpath)//"/S4.dat")
  50 |             DO i=1,ndirs
  51 |               READ(21,*) si(1,i),si(2,i),si(3,i),si(4,i)
  52 |             ENDDO
  53 |             CLOSE(21)
  54 |           CASE(6)
  55 |             OPEN (UNIT=21, FILE=trim(inpath)//"/S6.dat")
  56 |             DO i=1,ndirs
  57 |               READ(21,*) si(1,i),si(2,i),si(3,i),si(4,i)
  58 |             ENDDO
  59 |             CLOSE(21)
  60 |           CASE(12)
  61 |             OPEN (UNIT=21, FILE=trim(inpath)//"/S12.dat")
  62 |             DO i=1,ndirs
  63 |               READ(21,*) si(1,i),si(2,i),si(3,i),si(4,i)
  64 |             ENDDO
  65 |             CLOSE(21)
  66 |           CASE(8)
  67 |             OPEN (UNIT=21, FILE=trim(inpath)//"/S8.dat")
  68 |             DO i=1,ndirs
  69 |               READ(21,*) si(1,i),si(2,i),si(3,i),si(4,i)
  70 |             ENDDO
  71 |             CLOSE(21)       
  72 |           CASE(9)
  73 |             ndirs=ndirs-3
  74 |             OPEN (UNIT=21, FILE=trim(inpath)//"/LC11.dat")
  75 |             DO i=1,ndirs
  76 |               READ(21,*) si(1,i),si(2,i),si(3,i),si(4,i)
  77 |             ENDDO
  78 |             CLOSE(21)      
  79 |          END SELECT
  80 |        ENDIF
  81 | 
  82 |       END SUBROUTINE createdirections


createdirections.F could be called by:
2dptrtest.F [TOOLS/PREDATAS/EXAMPLES] - 79
Makefile [TOOLS/PREDATAS] - 95
predatas.F [TOOLS/PREDATAS/SRC] - 60