-
Notifications
You must be signed in to change notification settings - Fork 0
/
AUG2DC.SIF
215 lines (146 loc) · 3.96 KB
/
AUG2DC.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
***************************
* SET UP THE INITIAL DATA *
***************************
NAME AUG2DC
* Problem :
* *********
* An expanded system formulation of a 2-D PDE system.
* A five-point discretization of Laplace's equation in a
* rectangular domain may be expressed in the form
* - M v = b,
* where M = sum a_i a_i^T. Letting A = (a_1 .... a_m),
* this system may be expanded as
* ( I A^T ) (x) = (0),
* ( A 0 ) (v) (b)
* which is then equivalent to solving the EQP
* minimize 1/2 || x ||_2^2 s.t. A x = b
* SIF input: Nick Gould, February 1994
* classification QLR2-AN-V-V
* Number of nodes in x direction
*IE NX 3 $-PARAMETER
*IE NX 10 $-PARAMETER
*IE NX 40 $-PARAMETER
IE NX 100 $-PARAMETER
* Number of nodes in y direction
*IE NY 3 $-PARAMETER
*IE NY 10 $-PARAMETER
*IE NY 40 $-PARAMETER
IE NY 100 $-PARAMETER
* Other useful parameters
IA X+ NX 1
IA X- NX -1
IA Y+ NY 1
IA Y- NY -1
IE 1 1
IE 0 0
* It is easier to describe this problem by columns.
GROUPS
* objective function
DO J 1 Y-
DO I 1 X-
XN OX(I,J)
XN OY(I,J)
ND
DO I 1 X-
XN OX(I,NY)
ND
DO J 1 Y-
XN OY(NX,J)
ND
DO I 1 NX
XN OX(I,0)
XN OX(I,Y+)
ND
DO J 1 NY
XN OY(0,J)
XN OY(X+,J)
ND
* constraints
DO J 1 NY
DO I 1 NX
XE V(I,J)
ND
VARIABLES
* objective function terms
DO J 1 Y-
DO I 1 X-
X X(I,J) OX(I,J) 1.0
X Y(I,J) OY(I,J) 1.0
ND
DO I 1 X-
X X(I,NY) OX(I,NY) 1.0
ND
DO J 1 Y-
X Y(NX,J) OY(NX,J) 1.0
ND
DO I 1 NX
XN X(I,0) OX(I,0) 1.0
XN X(I,Y+) OX(I,Y+) 1.0
ND
DO J 1 NY
XN Y(0,J) OY(0,J) 1.0
XN Y(X+,J) OY(X+,J) 1.0
ND
* constraints : central constraints
DO J 1 Y-
IA J+ J 1
DO I 1 X-
IA I+ I 1
X X(I,J) V(I,J) 1.0 V(I+,J) -1.0
X Y(I,J) V(I,J) 1.0 V(I,J+) -1.0
ND
DO I 1 X-
IA I+ I 1
X X(I,NY) V(I,NY) 1.0 V(I+,NY) -1.0
ND
DO J 1 Y-
IA J+ J 1
X Y(NX,J) V(NX,J) 1.0 V(NX,J+) -1.0
ND
* edge constraints
DO I 1 NX
X X(I,0) V(I,1) 1.0
X X(I,Y+) V(I,NY) 1.0
ND
DO J 1 NY
X Y(0,J) V(1,J) 1.0
X Y(X+,J) V(NX,J) 1.0
ND
CONSTANTS
X AUG2DC 'DEFAULT' 1.0
BOUNDS
FR AUG2DC 'DEFAULT'
GROUP TYPE
GV SQUARE ALPHA
GROUP USES
DO J 1 Y-
DO I 1 X-
XT OX(I,J) SQUARE
XT OY(I,J) SQUARE
ND
DO I 1 X-
XT OX(I,NY) SQUARE
ND
DO J 1 Y-
XT OY(NX,J) SQUARE
ND
DO I 1 NX
XT OX(I,0) SQUARE
XT OX(I,Y+) SQUARE
ND
DO J 1 NY
XT OY(0,J) SQUARE
XT OY(X+,J) SQUARE
ND
ENDATA
***********************
* SET UP THE FUNCTION *
* AND RANGE ROUTINES *
***********************
GROUPS AUG2DC
INDIVIDUALS
T SQUARE
F 5.0D-1 * ALPHA * ALPHA
G ALPHA
H 1.0D+0
ENDATA