summaryrefslogtreecommitdiff
path: root/Dragon/src/SENGET.f
blob: c2e8b993258963c778b2c60430f60405172b2fd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
*DECK SENGET
      SUBROUTINE SENGET(IPRINT,NL,NANIS)
*
*-----------------------------------------------------------------------
*
*Purpose:
* To read from the input instructions for the SENS: module.
*
*Copyright:
* Copyright (C) 2011 Ecole Polytechnique de Montreal
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version
*
*Author(s): 
* G. Marleau
*
*Parameters: output
* IPRINT  print level.
* NL      Legendre contribution in scattering on library.
* NANIS   Legendre contribution in scattering for SENS:
*         = 1  only isotropic contribution; 
*         = ilana contribution up to ilana=NL considered
*         (default is ilana=1).
*
*Comments:
* Input data is of the form:
*    [ EDIT iprint ]
*    [ ANIS ilana ]
*
*----------
*
      IMPLICIT         NONE
*----
*  Subroutine arguments
*----
      INTEGER          IPRINT,NL,NANIS
*----
*  Local parameters
*----
      INTEGER          IOUT
      CHARACTER        NAMSBR*6
      PARAMETER       (IOUT=6,NAMSBR='SENGET')
*----
*  Variables for input via REDGET
*----
      INTEGER          ITYPLU,INTLIR
      CHARACTER        CARLIR*72
      REAL             REALIR
      DOUBLE PRECISION DBLLIR
*----
*  Initialize default values for IPRINT
*----
      IPRINT=1
*----
*  Get data from input file
*----
 100  CONTINUE
      CALL REDGET(ITYPLU,INTLIR,REALIR,CARLIR,DBLLIR)
      IF(ITYPLU .EQ. 10) GO TO 105
      IF(ITYPLU .NE. 3) CALL XABORT(NAMSBR//
     >': Read error -- Character variable expected')
      IF(CARLIR(1:4) .EQ. ';') THEN
        GO TO 105 
      ELSE IF(CARLIR(1:4) .EQ. 'EDIT') THEN
        CALL REDGET(ITYPLU,INTLIR,REALIR,CARLIR,DBLLIR)
        IF(ITYPLU .NE. 1) CALL XABORT(NAMSBR//
     >  ': Read error -- print level expected after EDIT.')
        IPRINT=INTLIR
      ELSE IF(CARLIR(1:5) .EQ. 'ANIS') THEN
        CALL REDGET(ITYPLU,INTLIR,REALIR,CARLIR,DBLLIR)
        IF(ITYPLU .NE. 1) CALL XABORT(NAMSBR//
     >  ': Read error -- scattering order expected')
        IF(INTLIR .LE. 1) THEN
          NANIS=1 
        ELSE 
          NANIS=MIN(NL,INTLIR)
        ENDIF
      ELSE
        CALL XABORT(NAMSBR//': Keyword '//CARLIR(1:5)//' is invalid.')
      ENDIF
      GO TO 100
 105  CONTINUE
*----
*  Processing finished, return
*----
      RETURN 
      END