-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBRATU2DT.SIF
152 lines (106 loc) · 3.35 KB
/
BRATU2DT.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
***************************
* SET UP THE INITIAL DATA *
***************************
NAME BRATU2DT
* Problem :
* *********
* The 2D Bratu problem on the unit square, using finite differences.
* At the turning point.
* 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 square.
*IE P 7 $-PARAMETER n=P**2 original value
*IE P 10 $-PARAMETER n=P**2
*IE P 22 $-PARAMETER n=P**2
*IE P 32 $-PARAMETER n=P**2
IE P 72 $-PARAMETER n=P**2
* LAMBDA is the Bratu problem parameter. It should be positive.
* There is a branching point in the problem for LAMBDA = 6.80812...
RE LAMBDA 6.80812 $-PARAMETER > 0
* Define a few helpful parameters
RE 1.0 1.0
IE 1 1
IE 2 2
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 square
DO J 1 P
DO I 1 P
X U(I,J)
ND
GROUPS
* Define a group per inner discretized point.
* The linear term shows the Laplace operator.
DO I 2 P-1
IA I+1 I 1
IA I-1 I -1
DO J 2 P-1
IA J+1 J 1
IA J-1 J -1
XE G(I,J) U(I,J) 4.0
XE G(I,J) U(I+1,J) -1.0 U(I-1,J) -1.0
XE G(I,J) U(I,J+1) -1.0 U(I,J-1) -1.0
ND
BOUNDS
FR BRATU2DT 'DEFAULT'
* Fix the variables on the lower and upper edges of the unit square
DO J 1 P
XX BRATU2DT U(1,J) 0.0
XX BRATU2DT U(P,J) 0.0
ND
* Fix the variables on the left and right edges of the unit square
DO I 2 P-1
XX BRATU2DT U(I,P) 0.0
XX BRATU2DT U(I,1) 0.0
ND
START POINT
XV BRATU2DT 'DEFAULT' 0.0
ELEMENT TYPE
EV EXP U
ELEMENT USES
XT 'DEFAULT' EXP
DO I 2 P-1
DO J 2 P-1
ZV A(I,J) U U(I,J)
ND
GROUP USES
DO I 2 P-1
DO J 2 P-1
ZE G(I,J) A(I,J) -C
ND
OBJECT BOUND
* Solution
*LO SOLTN(4) 1.23159D-02
*LO SOLTN(7) 2.24270D-04
*LO SOLTN(10) 1.85347D-05
*LO SOLTN(22) 1.18376D-07
*LO SOLTN(32) 1.27193D-07
*LO SOLTN(72) 1.30497D-06
ENDATA
***********************
* SET UP THE FUNCTION *
* AND RANGE ROUTINES *
***********************
ELEMENTS BRATU2DT
TEMPORARIES
M EXP
R EXPU
INDIVIDUALS
* Parametric exponential
T EXP
A EXPU EXP( U )
F EXPU
G U EXPU
H U U EXPU
ENDATA