-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBRATU3D.SIF
174 lines (117 loc) · 3.73 KB
/
BRATU3D.SIF
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
***************************
* SET UP THE INITIAL DATA *
***************************
NAME BRATU3D
* Problem :
* *********
* The 3D Bratu problem on the unit cube, using finite differences,
* Source: Problem 3 in
* J.J. More',
* "A collection of nonlinear model problems"
* Proceedings of the AMS-SIAM Summer seminar on the Computational
* Solution of Nonlinear Systems of Equations, Colorado, 1988.
* Argonne National Laboratory MCS-P60-0289, 1989.
* SIF input: Ph. Toint, Dec 1989.
* classification NOR2-MN-V-V
* P is the number of points in one side of the unit cube
* The number of variables is equal to P**3
*IE P 3 $-PARAMETER n = 27 original value
*IE P 5 $-PARAMETER n = 125
*IE P 8 $-PARAMETER n = 512
*IE P 10 $-PARAMETER n = 1000
IE P 17 $-PARAMETER n = 4913
* LAMBDA is the Bratu problem parameter. It should be positive.
RE LAMBDA 6.80812 $-PARAMETER > 0
* Define a few helpful parameters
IE 1 1
IE 2 2
RE 1.0 1.0
IA P-1 P -1
RI RP-1 P-1
R/ H 1.0 RP-1
R* H2 H H
R* C H2 LAMBDA
RM -C C -1.0
VARIABLES
* Define one variable per discretized point in the unit cube
DO J 1 P
DO I 1 P
DO K 1 P
X U(I,J,K)
ND
GROUPS
* Define a group per inner discretized point.
* The linear term shows the Laplace operator.
DO I 2 P-1
IA R I 1
IA S I -1
DO J 2 P-1
IA V J 1
IA W J -1
DO K 2 P-1
IA Y K 1
IA Z K -1
XE G(I,J,K) U(I,J,K) 6.0
XE G(I,J,K) U(R,J,K) -1.0 U(S,J,K) -1.0
XE G(I,J,K) U(I,V,K) -1.0 U(I,W,K) -1.0
XE G(I,J,K) U(I,J,Y) -1.0 U(I,J,Z) -1.0
ND
BOUNDS
FR BRATU3D 'DEFAULT'
* Fix the variables on the lower and upper faces of the unit cube
DO J 1 P
DO K 1 P
XX BRATU3D U(1,J,K) 0.0
XX BRATU3D U(P,J,K) 0.0
ND
* Fix the variables on the left and right faces of the unit cube
DO I 2 P-1
DO K 1 P
XX BRATU3D U(I,P,K) 0.0
XX BRATU3D U(I,1,K) 0.0
ND
* Fix the variables on the front and back faces of the unit cube
DO I 2 P-1
DO J 2 P-1
XX BRATU3D U(I,J,1) 0.0
XX BRATU3D U(I,J,P) 0.0
ND
START POINT
XV BRATU3D 'DEFAULT' 0.0
ELEMENT TYPE
* Exponential element type
EV EXP U
ELEMENT USES
XT 'DEFAULT' EXP
DO I 2 P-1
DO J 2 P-1
DO K 2 P-1
ZV A(I,J,K) U U(I,J,K)
ND
GROUP USES
DO I 2 P-1
DO J 2 P-1
DO K 2 P-1
ZE G(I,J,K) A(I,J,K) -C
ND
OBJECT BOUND
LO BRATU3D 0.0
* Solution
LO SOLTN 0.0
ENDATA
***********************
* SET UP THE FUNCTION *
* AND RANGE ROUTINES *
***********************
ELEMENTS BRATU3D
TEMPORARIES
M EXP
R EXPU
INDIVIDUALS
* Exponential
T EXP
A EXPU EXP( U )
F EXPU
G U EXPU
H U U EXPU
ENDATA