File: RELATIVE:/../../../mfix.git/model/check_data/check_numerics.f
1
2
3
4
5
6
7
8
9 SUBROUTINE CHECK_NUMERICS
10
11
12
13
14
15 use run, only: FPFOI
16
17 use run, only: CHI_SCHEME
18
19 use leqsol, only: OPT_PARALLEL
20
21 USE run, only: DISCRETIZE, SHEAR
22
23 use leqsol, only: DO_TRANSPOSE
24
25 use leqsol, only: MINIMIZE_DOTPRODUCTS
26
27 use leqsol, only: SOLVER_STATISTICS
28
29 use run, only: DEBUG_RESID
30
31 use leqsol, only: LEQ_SWEEP
32
33 use leqsol, only: LEQ_METHOD
34
35 use parallel, only: IS_SERIAL
36
37 use param, only: dim_eqs
38
39
40
41
42
43
44
45 use error_manager
46
47
48 IMPLICIT NONE
49
50
51
52
53
54 INTEGER :: L
55
56
57
58
59
60
61 CALL INIT_ERR_MSG("CHECK_NUMERICS")
62
63 DO L = 1,DIM_EQS
64 IF(DISCRETIZE(L) > 9 .OR. DISCRETIZE(L) < 0) THEN
65 WRITE(ERR_MSG,2002) trim(ivar('DISCRETIZE',L)),&
66 trim(ival(DISCRETIZE(L)))
67 CALL FLUSH_ERR_MSG(ABORT=.TRUE.)
68 ENDIF
69 ENDDO
70 2002 FORMAT('Error 2002: Invalid option ', A,' = ', A, '.',/ &
71 'Please correct the mfix.dat file.')
72
73
74
75 IF (FPFOI) THEN
76 DO L = 1,DIM_EQS
77 IF(DISCRETIZE(L) <= 1) THEN
78 WRITE(ERR_MSG,2000)
79 CALL FLUSH_ERR_MSG(ABORT=.TRUE.)
80 ENDIF
81 ENDDO
82 2000 FORMAT('Error 2000: Fourth-order scheme (FPFOI) requires ', &
83 'DISCRETIZE >= 2',/'for all equations. Please correct the ', &
84 'mfix.dat file.')
85 ENDIF
86
87
88
89 IF(CHI_SCHEME)THEN
90 IF(DISCRETIZE(7) .NE. 3 .AND. DISCRETIZE(7).NE.6) THEN
91 WRITE(ERR_MSG,2001)
92 CALL FLUSH_ERR_MSG(ABORT=.TRUE.)
93 2001 FORMAT('Error 2001: CHI_SCHEME for species equations is only ', &
94 'implemented',/'for SMART and MUSCL discretization schemes ', &
95 '[DISCRTIZE(7)].',/'Please correct the mfix.dat file.')
96 ENDIF
97 IF (SHEAR) THEN
98 WRITE(ERR_MSG,2003)
99 CALL FLUSH_ERR_MSG(ABORT=.TRUE.)
100 2003 FORMAT('Error 2003: CHI_SCHEME is currently not implemented ', &
101 'with SHEAR ',/'option. See calc_chi in module chischeme for '&
102 'details.',/'Please correct the mfix.dat file.')
103 ENDIF
104 ENDIF
105
106
107
108 IF (OPT_PARALLEL) THEN
109 IS_SERIAL = .FALSE.
110 DO_TRANSPOSE = .FALSE.
111 MINIMIZE_DOTPRODUCTS = .TRUE.
112 SOLVER_STATISTICS = .TRUE.
113 DEBUG_RESID = .FALSE.
114 LEQ_SWEEP(1:2) = 'ASAS'
115 LEQ_METHOD(1:2) = 2
116 LEQ_METHOD(3:9) = 1
117 ENDIF
118
119
120 CALL FINL_ERR_MSG
121
122 RETURN
123
124 END SUBROUTINE CHECK_NUMERICS
125