~fluidity-core/fluidity/bug_1183080

« back to all changes in this revision

Viewing changes to tests/Helmholtz-anisotropic-vector-mms-p1p1cg-structured/Helmholtz-anisotropic-vector-mms-p1p1cg-structured.xml

  • Committer: Tim Greaves
  • Date: 2013-04-19 11:53:43 UTC
  • mfrom: (3463.2.94 turbulence-clean)
  • Revision ID: tim.greaves@imperial.ac.uk-20130419115343-qq0m21v905aachuy
This merge is a replay of a previous merge which was reviewed in detail by
Christian Jacobs. There have been no changes since this was approved, hence I'm
fast-tracking this through as the concerns that led to the previous uncommit
have been resolved.

This merge brings in general updates from Jonathan Bull to his turbulence codes
and updates the BFS examples and various related tests to reflect this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" ?>
 
2
<!DOCTYPE testproblem SYSTEM "regressiontest.dtd">
 
3
<testproblem>
 
4
  <name>p1p1-cg structured-mesh inverse Helmholtz filter convergence test</name>
 
5
  <owner userid="jbull"/>
 
6
  <tags>flml</tags>
 
7
  <problem_definition length="short" nprocs="1">
 
8
    <command_line>fluidity -v2 -l MMS_A_structured.flml &amp;&amp; fluidity MMS_B_structured.flml &amp;&amp; fluidity MMS_C_structured.flml &amp;&amp; fluidity MMS_D_structured.flml</command_line>
 
9
  </problem_definition>
 
10
  <variables>
 
11
    <variable name="ab_convergence_vel_f" language="python">
 
12
from fluidity_tools import stat_parser as stat
 
13
from math import log
 
14
output=open('errorconv_structured.log','w')
 
15
errorlog=open('error_structured.log','w')
 
16
 
 
17
a_error_x = stat("MMS_A_structured.stat")["NS"]["AnisoFilterDifference%1"]["l2norm"][-1]
 
18
b_error_x = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%1"]["l2norm"][-1]
 
19
a_error_y = stat("MMS_A_structured.stat")["NS"]["AnisoFilterDifference%2"]["l2norm"][-1]
 
20
b_error_y = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%2"]["l2norm"][-1]
 
21
a_error_norm = stat("MMS_A_structured.stat")["NS"]["AnisoFilterDifference%magnitude"]["l2norm"][-1]
 
22
 
 
23
a_error_inf_x = stat("MMS_A_structured.stat")["NS"]["AnisoFilterDifference%1"]["max"][-1]
 
24
b_error_inf_x = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%1"]["max"][-1]
 
25
a_error_inf_y = stat("MMS_A_structured.stat")["NS"]["AnisoFilterDifference%2"]["max"][-1]
 
26
b_error_inf_y = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%2"]["max"][-1]
 
27
 
 
28
ab_ratio_x = a_error_x / b_error_x
 
29
ab_ratio_y = a_error_y / b_error_y
 
30
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
31
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
32
 
 
33
output.write('ab_convergence_vel_f '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
34
output.close()
 
35
 
 
36
errorlog.write('A_error_norm_aniso '+str(a_error_norm)+'\n')
 
37
errorlog.close()
 
38
 
 
39
ab_convergence_vel_f = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
40
    </variable>
 
41
    <variable name="ab_convergence_vel_if" language="python">
 
42
from fluidity_tools import stat_parser as stat
 
43
from math import log
 
44
output=open('errorconv_structured.log','a')
 
45
errorlog=open('error_structured.log','a')
 
46
 
 
47
a_error_x = stat("MMS_A_structured.stat")["NS"]["IsoFilterDifference%1"]["l2norm"][-1]
 
48
b_error_x = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%1"]["l2norm"][-1]
 
49
a_error_y = stat("MMS_A_structured.stat")["NS"]["IsoFilterDifference%2"]["l2norm"][-1]
 
50
b_error_y = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%2"]["l2norm"][-1]
 
51
a_error_norm = stat("MMS_A_structured.stat")["NS"]["IsoFilterDifference%magnitude"]["l2norm"][-1]
 
52
 
 
53
a_error_inf_x = stat("MMS_A_structured.stat")["NS"]["IsoFilterDifference%1"]["max"][-1]
 
54
b_error_inf_x = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%1"]["max"][-1]
 
55
a_error_inf_y = stat("MMS_A_structured.stat")["NS"]["IsoFilterDifference%2"]["max"][-1]
 
56
b_error_inf_y = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%2"]["max"][-1]
 
57
 
 
58
ab_ratio_x = a_error_x / b_error_x
 
59
ab_ratio_y = a_error_y / b_error_y
 
60
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
61
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
62
 
 
63
output.write('ab_convergence_vel_if '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
64
output.close()
 
65
errorlog.write('A_error_norm_iso '+str(a_error_norm)+'\n')
 
66
errorlog.close()
 
67
 
 
68
ab_convergence_vel_if = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
69
    </variable>
 
70
    <variable name="ab_convergence_vel_mlf" language="python">
 
71
from fluidity_tools import stat_parser as stat
 
72
from math import log
 
73
output=open('errorconv_structured.log','a')
 
74
errorlog=open('error_structured.log','a')
 
75
 
 
76
a_error_x = stat("MMS_A_structured.stat")["NS"]["MLFilterDifference%1"]["l2norm"][-1]
 
77
b_error_x = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%1"]["l2norm"][-1]
 
78
a_error_y = stat("MMS_A_structured.stat")["NS"]["MLFilterDifference%2"]["l2norm"][-1]
 
79
b_error_y = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%2"]["l2norm"][-1]
 
80
a_error_norm = stat("MMS_A_structured.stat")["NS"]["MLFilterDifference%magnitude"]["l2norm"][-1]
 
81
 
 
82
a_error_inf_x = stat("MMS_A_structured.stat")["NS"]["MLFilterDifference%1"]["max"][-1]
 
83
b_error_inf_x = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%1"]["max"][-1]
 
84
a_error_inf_y = stat("MMS_A_structured.stat")["NS"]["MLFilterDifference%2"]["max"][-1]
 
85
b_error_inf_y = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%2"]["max"][-1]
 
86
 
 
87
ab_ratio_x = a_error_x / b_error_x
 
88
ab_ratio_y = a_error_y / b_error_y
 
89
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
90
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
91
 
 
92
output.write('ab_convergence_vel_ml '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
93
output.close()
 
94
errorlog.write('A_error_norm_ml '+str(a_error_norm)+'\n')
 
95
errorlog.close()
 
96
 
 
97
ab_convergence_vel_mlf = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
98
    </variable>
 
99
    <variable name="ab_convergence_vel" language="python">
 
100
from fluidity_tools import stat_parser as stat
 
101
from math import log
 
102
output=open('errorconv_structured.log','a')
 
103
errorlog=open('error_structured.log','a')
 
104
 
 
105
a_error_x = stat("MMS_A_structured.stat")["NS"]["AnalyticalDifference%1"]["l2norm"][-1]
 
106
b_error_x = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%1"]["l2norm"][-1]
 
107
a_error_y = stat("MMS_A_structured.stat")["NS"]["AnalyticalDifference%2"]["l2norm"][-1]
 
108
b_error_y = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%2"]["l2norm"][-1]
 
109
a_error_norm = stat("MMS_A_structured.stat")["NS"]["AnalyticalDifference%magnitude"]["l2norm"][-1]
 
110
 
 
111
a_error_inf_x = stat("MMS_A_structured.stat")["NS"]["AnalyticalDifference%1"]["max"][-1]
 
112
b_error_inf_x = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%1"]["max"][-1]
 
113
a_error_inf_y = stat("MMS_A_structured.stat")["NS"]["AnalyticalDifference%2"]["max"][-1]
 
114
b_error_inf_y = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%2"]["max"][-1]
 
115
 
 
116
ab_ratio_x = a_error_x / b_error_x
 
117
ab_ratio_y = a_error_y / b_error_y
 
118
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
119
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
120
 
 
121
output.write('ab_convergence_vel '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
122
output.close()
 
123
errorlog.write('A_error_norm '+str(a_error_norm)+'\n')
 
124
errorlog.close()
 
125
 
 
126
ab_convergence_vel = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
127
    </variable>
 
128
    <variable name="bc_convergence_vel_f" language="python">
 
129
from fluidity_tools import stat_parser as stat
 
130
from math import log
 
131
output=open('errorconv_structured.log','a')
 
132
errorlog=open('error_structured.log','a')
 
133
 
 
134
a_error_x = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%1"]["l2norm"][-1]
 
135
b_error_x = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%1"]["l2norm"][-1]
 
136
a_error_y = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%2"]["l2norm"][-1]
 
137
b_error_y = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%2"]["l2norm"][-1]
 
138
a_error_norm = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%magnitude"]["l2norm"][-1]
 
139
 
 
140
a_error_inf_x = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%1"]["max"][-1]
 
141
b_error_inf_x = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%1"]["max"][-1]
 
142
a_error_inf_y = stat("MMS_B_structured.stat")["NS"]["AnisoFilterDifference%2"]["max"][-1]
 
143
b_error_inf_y = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%2"]["max"][-1]
 
144
 
 
145
ab_ratio_x = a_error_x / b_error_x
 
146
ab_ratio_y = a_error_y / b_error_y
 
147
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
148
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
149
 
 
150
output.write('bc_convergence_vel_f '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
151
output.close()
 
152
errorlog.write('B_error_norm_aniso '+str(a_error_norm)+'\n')
 
153
errorlog.close()
 
154
 
 
155
bc_convergence_vel_f = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
156
    </variable>
 
157
    <variable name="bc_convergence_vel_if" language="python">
 
158
from fluidity_tools import stat_parser as stat
 
159
from math import log
 
160
output=open('errorconv_structured.log','a')
 
161
errorlog=open('error_structured.log','a')
 
162
 
 
163
a_error_x = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%1"]["l2norm"][-1]
 
164
b_error_x = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%1"]["l2norm"][-1]
 
165
a_error_y = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%2"]["l2norm"][-1]
 
166
b_error_y = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%2"]["l2norm"][-1]
 
167
a_error_norm = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%magnitude"]["l2norm"][-1]
 
168
 
 
169
a_error_inf_x = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%1"]["max"][-1]
 
170
b_error_inf_x = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%1"]["max"][-1]
 
171
a_error_inf_y = stat("MMS_B_structured.stat")["NS"]["IsoFilterDifference%2"]["max"][-1]
 
172
b_error_inf_y = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%2"]["max"][-1]
 
173
 
 
174
ab_ratio_x = a_error_x / b_error_x
 
175
ab_ratio_y = a_error_y / b_error_y
 
176
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
177
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
178
 
 
179
output.write('bc_convergence_vel_if '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
180
output.close()
 
181
errorlog.write('B_error_norm_iso '+str(a_error_norm)+'\n')
 
182
errorlog.close()
 
183
 
 
184
bc_convergence_vel_if = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
185
    </variable>
 
186
    <variable name="bc_convergence_vel_mlf" language="python">
 
187
from fluidity_tools import stat_parser as stat
 
188
from math import log
 
189
output=open('errorconv_structured.log','a')
 
190
errorlog=open('error_structured.log','a')
 
191
 
 
192
a_error_x = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%1"]["l2norm"][-1]
 
193
b_error_x = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%1"]["l2norm"][-1]
 
194
a_error_y = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%2"]["l2norm"][-1]
 
195
b_error_y = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%2"]["l2norm"][-1]
 
196
a_error_norm = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%magnitude"]["l2norm"][-1]
 
197
 
 
198
a_error_inf_x = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%1"]["max"][-1]
 
199
b_error_inf_x = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%1"]["max"][-1]
 
200
a_error_inf_y = stat("MMS_B_structured.stat")["NS"]["MLFilterDifference%2"]["max"][-1]
 
201
b_error_inf_y = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%2"]["max"][-1]
 
202
 
 
203
ab_ratio_x = a_error_x / b_error_x
 
204
ab_ratio_y = a_error_y / b_error_y
 
205
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
206
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
207
 
 
208
output.write('bc_convergence_vel_ml '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
209
output.close()
 
210
errorlog.write('B_error_norm_ml '+str(a_error_norm)+'\n')
 
211
errorlog.close()
 
212
 
 
213
bc_convergence_vel_mlf = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
214
    </variable>
 
215
   <variable name="bc_convergence_vel" language="python">
 
216
from fluidity_tools import stat_parser as stat
 
217
from math import log
 
218
output=open('errorconv_structured.log','a')
 
219
errorlog=open('error_structured.log','a')
 
220
 
 
221
a_error_x = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%1"]["l2norm"][-1]
 
222
b_error_x = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%1"]["l2norm"][-1]
 
223
a_error_y = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%2"]["l2norm"][-1]
 
224
b_error_y = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%2"]["l2norm"][-1]
 
225
a_error_norm = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%magnitude"]["l2norm"][-1]
 
226
 
 
227
a_error_inf_x = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%1"]["max"][-1]
 
228
b_error_inf_x = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%1"]["max"][-1]
 
229
a_error_inf_y = stat("MMS_B_structured.stat")["NS"]["AnalyticalDifference%2"]["max"][-1]
 
230
b_error_inf_y = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%2"]["max"][-1]
 
231
 
 
232
ab_ratio_x = a_error_x / b_error_x
 
233
ab_ratio_y = a_error_y / b_error_y
 
234
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
235
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
236
 
 
237
output.write('bc_convergence_vel '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
238
output.close()
 
239
errorlog.write('B_error_norm '+str(a_error_norm)+'\n')
 
240
errorlog.close()
 
241
 
 
242
bc_convergence_vel = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
243
    </variable>
 
244
    <variable name="cd_convergence_vel_f" language="python">
 
245
from fluidity_tools import stat_parser as stat
 
246
from math import log
 
247
output=open('errorconv_structured.log','a')
 
248
errorlog=open('error_structured.log','a')
 
249
 
 
250
a_error_x = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%1"]["l2norm"][-1]
 
251
b_error_x = stat("MMS_D_structured.stat")["NS"]["AnisoFilterDifference%1"]["l2norm"][-1]
 
252
a_error_y = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%2"]["l2norm"][-1]
 
253
b_error_y = stat("MMS_D_structured.stat")["NS"]["AnisoFilterDifference%2"]["l2norm"][-1]
 
254
a_error_norm = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%magnitude"]["l2norm"][-1]
 
255
 
 
256
a_error_inf_x = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%1"]["max"][-1]
 
257
b_error_inf_x = stat("MMS_D_structured.stat")["NS"]["AnisoFilterDifference%1"]["max"][-1]
 
258
a_error_inf_y = stat("MMS_C_structured.stat")["NS"]["AnisoFilterDifference%2"]["max"][-1]
 
259
b_error_inf_y = stat("MMS_D_structured.stat")["NS"]["AnisoFilterDifference%2"]["max"][-1]
 
260
 
 
261
ab_ratio_x = a_error_x / b_error_x
 
262
ab_ratio_y = a_error_y / b_error_y
 
263
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
264
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
265
 
 
266
output.write('cd_convergence_vel_f '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
267
output.close()
 
268
errorlog.write('C_error_norm_aniso '+str(a_error_norm)+'\n')
 
269
errorlog.close()
 
270
 
 
271
cd_convergence_vel_f = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
272
    </variable>
 
273
    <variable name="cd_convergence_vel_if" language="python">
 
274
from fluidity_tools import stat_parser as stat
 
275
from math import log
 
276
output=open('errorconv_structured.log','a')
 
277
errorlog=open('error_structured.log','a')
 
278
 
 
279
a_error_x = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%1"]["l2norm"][-1]
 
280
b_error_x = stat("MMS_D_structured.stat")["NS"]["IsoFilterDifference%1"]["l2norm"][-1]
 
281
a_error_y = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%2"]["l2norm"][-1]
 
282
b_error_y = stat("MMS_D_structured.stat")["NS"]["IsoFilterDifference%2"]["l2norm"][-1]
 
283
a_error_norm = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%magnitude"]["l2norm"][-1]
 
284
 
 
285
a_error_inf_x = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%1"]["max"][-1]
 
286
b_error_inf_x = stat("MMS_D_structured.stat")["NS"]["IsoFilterDifference%1"]["max"][-1]
 
287
a_error_inf_y = stat("MMS_C_structured.stat")["NS"]["IsoFilterDifference%2"]["max"][-1]
 
288
b_error_inf_y = stat("MMS_D_structured.stat")["NS"]["IsoFilterDifference%2"]["max"][-1]
 
289
 
 
290
ab_ratio_x = a_error_x / b_error_x
 
291
ab_ratio_y = a_error_y / b_error_y
 
292
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
293
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
294
 
 
295
output.write('cd_convergence_vel_if '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
296
output.close()
 
297
errorlog.write('C_error_norm_iso '+str(a_error_norm)+'\n')
 
298
errorlog.close()
 
299
 
 
300
cd_convergence_vel_if = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
301
    </variable>
 
302
    <variable name="cd_convergence_vel_mlf" language="python">
 
303
from fluidity_tools import stat_parser as stat
 
304
from math import log
 
305
output=open('errorconv_structured.log','a')
 
306
errorlog=open('error_structured.log','a')
 
307
 
 
308
a_error_x = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%1"]["l2norm"][-1]
 
309
b_error_x = stat("MMS_D_structured.stat")["NS"]["MLFilterDifference%1"]["l2norm"][-1]
 
310
a_error_y = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%2"]["l2norm"][-1]
 
311
b_error_y = stat("MMS_D_structured.stat")["NS"]["MLFilterDifference%2"]["l2norm"][-1]
 
312
a_error_norm = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%magnitude"]["l2norm"][-1]
 
313
 
 
314
a_error_inf_x = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%1"]["max"][-1]
 
315
b_error_inf_x = stat("MMS_D_structured.stat")["NS"]["MLFilterDifference%1"]["max"][-1]
 
316
a_error_inf_y = stat("MMS_C_structured.stat")["NS"]["MLFilterDifference%2"]["max"][-1]
 
317
b_error_inf_y = stat("MMS_D_structured.stat")["NS"]["MLFilterDifference%2"]["max"][-1]
 
318
 
 
319
ab_ratio_x = a_error_x / b_error_x
 
320
ab_ratio_y = a_error_y / b_error_y
 
321
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
322
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
323
 
 
324
output.write('cd_convergence_vel_ml '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
325
output.close()
 
326
errorlog.write('C_error_norm_ml '+str(a_error_norm)+'\n')
 
327
errorlog.close()
 
328
 
 
329
cd_convergence_vel_mlf = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
330
    </variable>
 
331
    <variable name="cd_convergence_vel" language="python">
 
332
from fluidity_tools import stat_parser as stat
 
333
from math import log
 
334
output=open('errorconv_structured.log','a')
 
335
errorlog=open('error_structured.log','a')
 
336
 
 
337
a_error_x = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%1"]["l2norm"][-1]
 
338
b_error_x = stat("MMS_D_structured.stat")["NS"]["AnalyticalDifference%1"]["l2norm"][-1]
 
339
a_error_y = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%2"]["l2norm"][-1]
 
340
b_error_y = stat("MMS_D_structured.stat")["NS"]["AnalyticalDifference%2"]["l2norm"][-1]
 
341
 
 
342
a_error_inf_x = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%1"]["max"][-1]
 
343
b_error_inf_x = stat("MMS_D_structured.stat")["NS"]["AnalyticalDifference%1"]["max"][-1]
 
344
a_error_inf_y = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%2"]["max"][-1]
 
345
b_error_inf_y = stat("MMS_D_structured.stat")["NS"]["AnalyticalDifference%2"]["max"][-1]
 
346
 
 
347
a_error_norm = stat("MMS_C_structured.stat")["NS"]["AnalyticalDifference%magnitude"]["l2norm"][-1]
 
348
b_error_norm = stat("MMS_D_structured.stat")["NS"]["AnalyticalDifference%magnitude"]["l2norm"][-1]
 
349
b1_error_norm = stat("MMS_D_structured.stat")["NS"]["MLFilterDifference%magnitude"]["l2norm"][-1]
 
350
b2_error_norm = stat("MMS_D_structured.stat")["NS"]["IsoFilterDifference%magnitude"]["l2norm"][-1]
 
351
b3_error_norm = stat("MMS_D_structured.stat")["NS"]["AnisoFilterDifference%magnitude"]["l2norm"][-1]
 
352
 
 
353
ab_ratio_x = a_error_x / b_error_x
 
354
ab_ratio_y = a_error_y / b_error_y
 
355
ab_ratio_inf_x = a_error_inf_x / b_error_inf_x
 
356
ab_ratio_inf_y = a_error_inf_y / b_error_inf_y
 
357
 
 
358
output.write('cd_convergence_vel '+str(log(ab_ratio_x, 2))+' '+str(log(ab_ratio_inf_x, 2))+' '+str(log(ab_ratio_y, 2))+' '+str(log(ab_ratio_inf_y, 2))+'\n')
 
359
output.close()
 
360
errorlog.write('C_error_norm '+str(a_error_norm)+'\n')
 
361
errorlog.write('D_error_norm_aniso '+str(b3_error_norm)+'\n')
 
362
errorlog.write('D_error_norm_iso '+str(b2_error_norm)+'\n')
 
363
errorlog.write('D_error_norm_ml '+str(b1_error_norm)+'\n')
 
364
errorlog.write('D_error_norm '+str(b_error_norm)+'\n')
 
365
errorlog.close()
 
366
 
 
367
cd_convergence_vel = [[log(ab_ratio_x, 2), log(ab_ratio_inf_x, 2)], [log(ab_ratio_y, 2), log(ab_ratio_inf_y, 2)]]
 
368
    </variable>
 
369
    <variable name="ab_convergence_isocomm" language="python">
 
370
from fluidity_tools import stat_parser as stat
 
371
from math import log
 
372
convlog=open('commconv_structured.log','w')
 
373
commlog=open('commerror_structured.log','w')
 
374
 
 
375
a_error_norm = stat("MMS_A_structured.stat")["NS"]["IsoCommError%magnitude"]["l2norm"][-1]
 
376
b_error_norm = stat("MMS_B_structured.stat")["NS"]["IsoCommError%magnitude"]["l2norm"][-1]
 
377
a_error_inf = stat("MMS_A_structured.stat")["NS"]["IsoCommError%magnitude"]["max"][-1]
 
378
b_error_inf = stat("MMS_B_structured.stat")["NS"]["IsoCommError%magnitude"]["max"][-1]
 
379
 
 
380
ab_ratio_norm = a_error_norm / b_error_norm
 
381
ab_ratio_inf = a_error_inf / b_error_inf
 
382
 
 
383
convlog.write('AB_comm_norm_conv_iso '+str(log(ab_ratio_norm,2))+' '+str(log(ab_ratio_inf,2))+'\n')
 
384
commlog.write('A_comm_error_iso '+str(a_error_norm)+' '+str(a_error_inf)+'\n')
 
385
convlog.close()
 
386
commlog.close()
 
387
ab_convergence_isocomm = [[log(ab_ratio_norm, 2), log(ab_ratio_inf, 2)]]
 
388
    </variable>
 
389
    <variable name="ab_convergence_anisocomm" language="python">
 
390
from fluidity_tools import stat_parser as stat
 
391
from math import log
 
392
convlog=open('commconv_structured.log','a')
 
393
commlog=open('commerror_structured.log','a')
 
394
 
 
395
a_error_norm = stat("MMS_A_structured.stat")["NS"]["AnisoCommError%magnitude"]["l2norm"][-1]
 
396
b_error_norm = stat("MMS_B_structured.stat")["NS"]["AnisoCommError%magnitude"]["l2norm"][-1]
 
397
a_error_inf = stat("MMS_A_structured.stat")["NS"]["AnisoCommError%magnitude"]["max"][-1]
 
398
b_error_inf = stat("MMS_B_structured.stat")["NS"]["AnisoCommError%magnitude"]["max"][-1]
 
399
 
 
400
ab_ratio_norm = a_error_norm / b_error_norm
 
401
ab_ratio_inf = a_error_inf / b_error_inf
 
402
 
 
403
convlog.write('AB_comm_norm_conv_aniso '+str(log(ab_ratio_norm,2))+' '+str(log(ab_ratio_inf,2))+'\n')
 
404
commlog.write('A_comm_error_aniso '+str(a_error_norm)+' '+str(a_error_inf)+'\n')
 
405
convlog.close()
 
406
commlog.close()
 
407
ab_convergence_anisocomm = [[log(ab_ratio_norm, 2), log(ab_ratio_inf, 2)]]
 
408
    </variable>
 
409
    <variable name="bc_convergence_isocomm" language="python">
 
410
from fluidity_tools import stat_parser as stat
 
411
from math import log
 
412
convlog=open('commconv_structured.log','a')
 
413
commlog=open('commerror_structured.log','a')
 
414
 
 
415
a_error_norm = stat("MMS_B_structured.stat")["NS"]["IsoCommError%magnitude"]["l2norm"][-1]
 
416
b_error_norm = stat("MMS_C_structured.stat")["NS"]["IsoCommError%magnitude"]["l2norm"][-1]
 
417
a_error_inf = stat("MMS_B_structured.stat")["NS"]["IsoCommError%magnitude"]["max"][-1]
 
418
b_error_inf = stat("MMS_C_structured.stat")["NS"]["IsoCommError%magnitude"]["max"][-1]
 
419
 
 
420
ab_ratio_norm = a_error_norm / b_error_norm
 
421
ab_ratio_inf = a_error_inf / b_error_inf
 
422
 
 
423
convlog.write('BC_comm_norm_conv_iso '+str(log(ab_ratio_norm,2))+' '+str(log(ab_ratio_inf,2))+'\n')
 
424
commlog.write('B_comm_error_iso '+str(a_error_norm)+' '+str(a_error_inf)+'\n')
 
425
convlog.close()
 
426
commlog.close()
 
427
bc_convergence_isocomm = [[log(ab_ratio_norm, 2), log(ab_ratio_inf, 2)]]
 
428
    </variable>
 
429
    <variable name="bc_convergence_anisocomm" language="python">
 
430
from fluidity_tools import stat_parser as stat
 
431
from math import log
 
432
convlog=open('commconv_structured.log','a')
 
433
commlog=open('commerror_structured.log','a')
 
434
 
 
435
a_error_norm = stat("MMS_B_structured.stat")["NS"]["AnisoCommError%magnitude"]["l2norm"][-1]
 
436
b_error_norm = stat("MMS_C_structured.stat")["NS"]["AnisoCommError%magnitude"]["l2norm"][-1]
 
437
a_error_inf = stat("MMS_B_structured.stat")["NS"]["AnisoCommError%magnitude"]["max"][-1]
 
438
b_error_inf = stat("MMS_C_structured.stat")["NS"]["AnisoCommError%magnitude"]["max"][-1]
 
439
 
 
440
ab_ratio_norm = a_error_norm / b_error_norm
 
441
ab_ratio_inf = a_error_inf / b_error_inf
 
442
 
 
443
convlog.write('BC_comm_norm_conv_aniso '+str(log(ab_ratio_norm,2))+' '+str(log(ab_ratio_inf,2))+'\n')
 
444
commlog.write('B_comm_error_aniso '+str(a_error_norm)+' '+str(a_error_inf)+'\n')
 
445
convlog.close()
 
446
commlog.close()
 
447
bc_convergence_anisocomm = [[log(ab_ratio_norm, 2), log(ab_ratio_inf, 2)]]
 
448
    </variable>
 
449
    <variable name="cd_convergence_isocomm" language="python">
 
450
from fluidity_tools import stat_parser as stat
 
451
from math import log
 
452
convlog=open('commconv_structured.log','a')
 
453
commlog=open('commerror_structured.log','a')
 
454
 
 
455
a_error_norm = stat("MMS_C_structured.stat")["NS"]["IsoCommError%magnitude"]["l2norm"][-1]
 
456
b_error_norm = stat("MMS_D_structured.stat")["NS"]["IsoCommError%magnitude"]["l2norm"][-1]
 
457
a_error_inf = stat("MMS_C_structured.stat")["NS"]["IsoCommError%magnitude"]["max"][-1]
 
458
b_error_inf = stat("MMS_D_structured.stat")["NS"]["IsoCommError%magnitude"]["max"][-1]
 
459
 
 
460
ab_ratio_norm = a_error_norm / b_error_norm
 
461
ab_ratio_inf = a_error_inf / b_error_inf
 
462
 
 
463
convlog.write('CD_comm_norm_conv_iso '+str(log(ab_ratio_norm,2))+' '+str(log(ab_ratio_inf,2))+'\n')
 
464
commlog.write('C_comm_error_iso '+str(a_error_norm)+' '+str(a_error_inf)+'\n')
 
465
convlog.close()
 
466
commlog.close()
 
467
cd_convergence_isocomm = [[log(ab_ratio_norm, 2), log(ab_ratio_inf, 2)]]
 
468
    </variable>
 
469
    <variable name="cd_convergence_anisocomm" language="python">
 
470
from fluidity_tools import stat_parser as stat
 
471
from math import log
 
472
convlog=open('commconv_structured.log','a')
 
473
commlog=open('commerror_structured.log','a')
 
474
 
 
475
a_error_norm = stat("MMS_C_structured.stat")["NS"]["AnisoCommError%magnitude"]["l2norm"][-1]
 
476
b_error_norm = stat("MMS_D_structured.stat")["NS"]["IsoCommError%magnitude"]["l2norm"][-1]
 
477
b2_error_norm = stat("MMS_D_structured.stat")["NS"]["AnisoCommError%magnitude"]["l2norm"][-1]
 
478
a_error_inf = stat("MMS_C_structured.stat")["NS"]["AnisoCommError%magnitude"]["max"][-1]
 
479
b_error_inf = stat("MMS_D_structured.stat")["NS"]["IsoCommError%magnitude"]["max"][-1]
 
480
b2_error_inf = stat("MMS_D_structured.stat")["NS"]["AnisoCommError%magnitude"]["max"][-1]
 
481
 
 
482
ab_ratio_norm = a_error_norm / b_error_norm
 
483
ab_ratio_inf = a_error_inf / b_error_inf
 
484
 
 
485
convlog.write('CD_comm_norm_conv_aniso '+str(log(ab_ratio_norm,2))+' '+str(log(ab_ratio_inf,2))+'\n')
 
486
commlog.write('C_comm_error_aniso '+str(a_error_norm)+' '+str(a_error_inf)+'\n')
 
487
commlog.write('D_comm_error_iso '+str(b_error_norm)+' '+str(b_error_inf)+'\n')
 
488
commlog.write('D_comm_error_aniso '+str(b2_error_norm)+' '+str(b2_error_inf)+'\n')
 
489
convlog.close()
 
490
commlog.close()
 
491
cd_convergence_anisocomm = [[log(ab_ratio_norm, 2), log(ab_ratio_inf, 2)]]
 
492
    </variable>
 
493
    <variable name="a_zdiff" language="python">
 
494
from fluidity_tools import stat_parser as stat
 
495
a_zdiff = stat("MMS_A_structured.stat")["NS"]["ZeroFilterDifference%magnitude"]["l2norm"][-1]
 
496
    </variable>
 
497
    <variable name="b_zdiff" language="python">
 
498
from fluidity_tools import stat_parser as stat
 
499
b_zdiff = stat("MMS_B_structured.stat")["NS"]["ZeroFilterDifference%magnitude"]["l2norm"][-1]
 
500
    </variable>
 
501
    <variable name="c_zdiff" language="python">
 
502
from fluidity_tools import stat_parser as stat
 
503
c_zdiff = stat("MMS_C_structured.stat")["NS"]["ZeroFilterDifference%magnitude"]["l2norm"][-1]
 
504
    </variable>
 
505
    <variable name="d_zdiff" language="python">
 
506
from fluidity_tools import stat_parser as stat
 
507
d_zdiff = stat("MMS_D_structured.stat")["NS"]["ZeroFilterDifference%magnitude"]["l2norm"][-1]
 
508
    </variable>
 
509
  </variables>
 
510
  <pass_tests>
 
511
    <test name="ab_convergence_vel_f_x: L2 order > 1.5" language="python">
 
512
assert(ab_convergence_vel_f[0][0] &gt; 1.5)
 
513
    </test>
 
514
    <test name="ab_convergence_vel_f_y: L2 order > 1.5" language="python">
 
515
assert(ab_convergence_vel_f[1][0] &gt; 1.5)
 
516
    </test>
 
517
    <test name="bc_convergence_vel_f_x: L2 order > 1.8" language="python">
 
518
assert(bc_convergence_vel_f[0][0] &gt; 1.8)
 
519
    </test>
 
520
    <test name="bc_convergence_vel_f_y: L2 order > 1.8" language="python">
 
521
assert(bc_convergence_vel_f[1][0] &gt; 1.8)
 
522
    </test>
 
523
    <test name="cd_convergence_vel_f_x: L2 order > 1.9" language="python">
 
524
assert(cd_convergence_vel_f[0][0] &gt; 1.9)
 
525
    </test>
 
526
    <test name="cd_convergence_vel_f_y: L2 order > 1.9" language="python">
 
527
assert(cd_convergence_vel_f[1][0] &gt; 1.9)
 
528
    </test>
 
529
    <test name="ab_convergence_vel_if_x: L2 order > 1.6" language="python">
 
530
assert(ab_convergence_vel_if[0][0] &gt; 1.6)
 
531
    </test>
 
532
    <test name="ab_convergence_vel_if_y: L2 order > 1.6" language="python">
 
533
assert(ab_convergence_vel_if[1][0] &gt; 1.6)
 
534
    </test>
 
535
    <test name="bc_convergence_vel_if_x: L2 order > 1.8" language="python">
 
536
assert(bc_convergence_vel_if[0][0] &gt; 1.8)
 
537
    </test>
 
538
    <test name="bc_convergence_vel_if_y: L2 order > 1.8" language="python">
 
539
assert(bc_convergence_vel_if[1][0] &gt; 1.8)
 
540
    </test>
 
541
    <test name="cd_convergence_vel_if_x: L2 order > 1.9" language="python">
 
542
assert(cd_convergence_vel_if[0][0] &gt; 1.9)
 
543
    </test>
 
544
    <test name="cd_convergence_vel_if_y: L2 order > 1.9" language="python">
 
545
assert(cd_convergence_vel_if[1][0] &gt; 1.9)
 
546
    </test>
 
547
    <test name="ab_convergence_vel_ml_x: L2 order > 1.4" language="python">
 
548
assert(ab_convergence_vel_f[0][0] &gt; 1.4)
 
549
    </test>
 
550
    <test name="ab_convergence_vel_ml_y: L2 order > 1.4" language="python">
 
551
assert(ab_convergence_vel_f[1][0] &gt; 1.4)
 
552
    </test>
 
553
    <test name="bc_convergence_vel_ml_x: L2 order > 1.5" language="python">
 
554
assert(bc_convergence_vel_f[0][0] &gt; 1.5)
 
555
    </test>
 
556
    <test name="bc_convergence_vel_ml_y: L2 order > 1.5" language="python">
 
557
assert(bc_convergence_vel_f[1][0] &gt; 1.5)
 
558
    </test>
 
559
    <test name="cd_convergence_vel_ml_x: L2 order > 1.5" language="python">
 
560
assert(cd_convergence_vel_f[0][0] &gt; 1.5)
 
561
    </test>
 
562
    <test name="cd_convergence_vel_ml_y: L2 order > 1.5" language="python">
 
563
assert(cd_convergence_vel_f[1][0] &gt; 1.5)
 
564
    </test>
 
565
    <test name="ab_convergence_isocomm: L2 order > 1.4" language="python">
 
566
assert(ab_convergence_isocomm[0][0] &gt; 1.4)
 
567
    </test>
 
568
    <test name="ab_convergence_anisocomm: L2 order > 1.4" language="python">
 
569
assert(ab_convergence_anisocomm[0][0] &gt; 1.4)
 
570
    </test>
 
571
    <test name="bc_convergence_isocomm: L2 order > 1.4" language="python">
 
572
assert(bc_convergence_isocomm[0][0] &gt; 1.4)
 
573
    </test>
 
574
    <test name="bc_convergence_anisocomm: L2 order > 1.4" language="python">
 
575
assert(bc_convergence_anisocomm[0][0] &gt; 1.4)
 
576
    </test>
 
577
    <test name="cd_convergence_isocomm: L2 order > 1.4" language="python">
 
578
assert(cd_convergence_isocomm[0][0] &gt; 1.4)
 
579
    </test>
 
580
    <test name="cd_convergence_anisocomm: L2 order > 2.2" language="python">
 
581
assert(cd_convergence_anisocomm[0][0] &gt; 2.2)
 
582
    </test>
 
583
    <test name="checking zero-filtered vel A with tolerance 1.0e-07" language="python">
 
584
assert(a_zdiff &lt; 1.E-7)
 
585
    </test>
 
586
    <test name="checking zero-filtered vel B with tolerance 1.0e-07" language="python">
 
587
assert(b_zdiff &lt; 1.E-7)
 
588
    </test>
 
589
    <test name="checking zero-filtered vel C with tolerance 1.0e-07" language="python">
 
590
assert(c_zdiff &lt; 1.E-7)
 
591
    </test>
 
592
    <test name="checking zero-filtered vel D with tolerance 1.0e-07" language="python">
 
593
assert(d_zdiff &lt; 1.E-7)
 
594
    </test>
 
595
    <test name="ab_convergence_vel_x: L2 order > 2.2" language="python">
 
596
assert(ab_convergence_vel[0][0] &gt; 2.2)
 
597
    </test>
 
598
    <test name="ab_convergence_vel_y: L2 order > 1.6" language="python">
 
599
assert(ab_convergence_vel[1][0] &gt; 1.6)
 
600
    </test>
 
601
    <test name="bc_convergence_vel_x: L2 order > 2.2" language="python">
 
602
assert(bc_convergence_vel[0][0] &gt; 2.2)
 
603
    </test>
 
604
    <test name="bc_convergence_vel_y: L2 order > 1.7" language="python">
 
605
assert(bc_convergence_vel[1][0] &gt; 1.7)
 
606
    </test>
 
607
    <test name="cd_convergence_vel_x: L2 order > 2.1" language="python">
 
608
assert(cd_convergence_vel[0][0] &gt; 2.1)
 
609
    </test>
 
610
    <test name="cd_convergence_vel_y: L2 order > 1.7" language="python">
 
611
assert(cd_convergence_vel[1][0] &gt; 1.7)
 
612
    </test>
 
613
  </pass_tests>
 
614
  <warn_tests>
 
615
  </warn_tests>
 
616
</testproblem>
 
617