1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE testproblem SYSTEM "regressiontest.dtd">
4
<name>Burgers Equation MMS</name>
7
<problem_definition length="medium" nprocs="1">
8
<command_line>burgers_equation mms_A.bml; burgers_equation mms_B.bml; burgers_equation mms_C.bml; burgers_equation mms_D.bml; burgers_equation mms_E.bml</command_line>
11
<variable name="ab_error" language="python">
12
from fluidity_tools import stat_parser as stat
15
a_error = stat("mms_diffusion_adjoint_A.stat")["Fluid"]["Error"]["l2norm"][-1]
16
b_error = stat("mms_diffusion_adjoint_B.stat")["Fluid"]["Error"]["l2norm"][-1]
18
a_error_inf = stat("mms_diffusion_adjoint_A.stat")["Fluid"]["Error"]["max"][-1]
19
b_error_inf = stat("mms_diffusion_adjoint_B.stat")["Fluid"]["Error"]["max"][-1]
21
ab_ratio = a_error / b_error
22
ab_ratio_inf = a_error_inf / b_error_inf
23
ab_error = [log(ab_ratio, 2)]
25
<variable name="bc_error" language="python">
26
from fluidity_tools import stat_parser as stat
29
b_error = stat("mms_diffusion_adjoint_B.stat")["Fluid"]["Error"]["l2norm"][-1]
30
c_error = stat("mms_diffusion_adjoint_C.stat")["Fluid"]["Error"]["l2norm"][-1]
32
b_error_inf = stat("mms_diffusion_adjoint_B.stat")["Fluid"]["Error"]["max"][-1]
33
c_error_inf = stat("mms_diffusion_adjoint_C.stat")["Fluid"]["Error"]["max"][-1]
35
bc_ratio = b_error / c_error
36
bc_ratio_inf = b_error_inf / c_error_inf
37
bc_error = [log(bc_ratio, 2)]
39
<variable name="cd_error" language="python">
40
from fluidity_tools import stat_parser as stat
43
c_error = stat("mms_diffusion_adjoint_C.stat")["Fluid"]["Error"]["l2norm"][-1]
44
d_error = stat("mms_diffusion_adjoint_D.stat")["Fluid"]["Error"]["l2norm"][-1]
46
c_error_inf = stat("mms_diffusion_adjoint_C.stat")["Fluid"]["Error"]["max"][-1]
47
d_error_inf = stat("mms_diffusion_adjoint_D.stat")["Fluid"]["Error"]["max"][-1]
49
cd_ratio = c_error / d_error
50
cd_ratio_inf = c_error_inf / d_error_inf
51
cd_error = [log(cd_ratio, 2)]
53
<variable name="de_error" language="python">
54
from fluidity_tools import stat_parser as stat
57
d_error = stat("mms_diffusion_adjoint_D.stat")["Fluid"]["Error"]["l2norm"][-1]
58
e_error = stat("mms_diffusion_adjoint_E.stat")["Fluid"]["Error"]["l2norm"][-1]
60
d_error_inf = stat("mms_diffusion_adjoint_D.stat")["Fluid"]["Error"]["max"][-1]
61
e_error_inf = stat("mms_diffusion_adjoint_E.stat")["Fluid"]["Error"]["max"][-1]
63
de_ratio = d_error / e_error
64
de_ratio_inf = d_error_inf / e_error_inf
65
de_error = [log(de_ratio, 2)]
67
<variable name="ab_func_error" language="python">
68
truth = -2.00098747251
69
from fluidity_tools import stat_parser as stat
72
a_func = stat("mms_diffusion_adjoint_A_adjoint_time_integral_ad.stat")["time_integral_ad"]["value"][-1]
73
b_func = stat("mms_diffusion_adjoint_B_adjoint_time_integral_ad.stat")["time_integral_ad"]["value"][-1]
75
a_error = abs(truth - a_func)
76
b_error = abs(truth - b_func)
78
ab_func_error = log(a_error/b_error, 2)
80
<variable name="bc_func_error" language="python">
81
truth = -2.00098747251
82
from fluidity_tools import stat_parser as stat
85
b_func = stat("mms_diffusion_adjoint_B_adjoint_time_integral_ad.stat")["time_integral_ad"]["value"][-1]
86
c_func = stat("mms_diffusion_adjoint_C_adjoint_time_integral_ad.stat")["time_integral_ad"]["value"][-1]
88
b_error = abs(truth - b_func)
89
c_error = abs(truth - c_func)
91
bc_func_error = log(b_error/c_error, 2)
93
<variable name="cd_func_error" language="python">
94
truth = -2.00098747251
95
from fluidity_tools import stat_parser as stat
98
c_func = stat("mms_diffusion_adjoint_C_adjoint_time_integral_ad.stat")["time_integral_ad"]["value"][-1]
99
d_func = stat("mms_diffusion_adjoint_D_adjoint_time_integral_ad.stat")["time_integral_ad"]["value"][-1]
101
c_error = abs(truth - c_func)
102
d_error = abs(truth - d_func)
104
cd_func_error = log(c_error/d_error, 2)
106
<variable name="de_func_error" language="python">
107
truth = -2.00098747251
108
from fluidity_tools import stat_parser as stat
111
d_func = stat("mms_diffusion_adjoint_D_adjoint_time_integral_ad.stat")["time_integral_ad"]["value"][-1]
112
e_func = stat("mms_diffusion_adjoint_E_adjoint_time_integral_ad.stat")["time_integral_ad"]["value"][-1]
114
d_error = abs(truth - d_func)
115
e_error = abs(truth - e_func)
117
de_func_error = log(d_error/e_error, 2)
121
<test name="ab_convergence_stat: L2 order > 1.8" language="python">
122
assert 1.8 < ab_error[0]
124
<test name="bc_convergence_stat: L2 order > 1.8" language="python">
125
assert 1.8 < bc_error[0]
127
<test name="cd_convergence_stat: L2 order > 1.8" language="python">
128
assert 1.8 < cd_error[0]
130
<test name="de_convergence_stat: L2 order > 1.8" language="python">
131
assert 1.8 < de_error[0]
133
<test name="ab_func_error: order in [1.8,2.2]" language="python">
134
assert(abs(ab_func_error-2.0) < 0.2)
136
<test name="bc_func_error: order in [1.8,2.2]" language="python">
137
assert(abs(bc_func_error-2.0) < 0.2)
139
<test name="cd_func_error: order in [1.8,2.2]" language="python">
140
assert(abs(cd_func_error-2.0) < 0.2)
142
<test name="de_func_error: order in [1.8,2.2]" language="python">
143
assert(abs(de_func_error-2.0) < 0.2)