-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathparticle_diagnostic_fields.xml
More file actions
148 lines (146 loc) · 4.81 KB
/
particle_diagnostic_fields.xml
File metadata and controls
148 lines (146 loc) · 4.81 KB
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
<?xml version="1.0" encoding="UTF-8" ?>
<testproblem>
<name>Testing of particle diagnostic fields in serial, particles check changes in the temperature field and their position relative to the last timestep. Variables are tested against diagnostics from a successful run.</name>
<owner userid="drhodrid"/>
<tags>flml</tags>
<problem_definition length="short" nprocs="1">
<command_line>
../../bin/fluidity -v3 -l particle-diagnostic-fields.flml
</command_line>
</problem_definition>
<variables>
<variable name="MaxXtest" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
MaxXtest= s['BoussinesqFluid']['XChange']['max'][-1]
print ("max X",MaxXtest)
</variable>
<variable name="MinXtest" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
MinXtest= s['BoussinesqFluid']['XChange']['min'][-1]
print ("min X",MinXtest)
</variable>
<variable name="Xl2norm" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
Xl2norm= s['BoussinesqFluid']['XChange']['l2norm'][-1]
print ("X l2norm",Xl2norm)
</variable>
<variable name="Xintegral" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
Xintegral= s['BoussinesqFluid']['XChange']['integral'][-1]
print ("X integral",Xintegral)
</variable>
<variable name="MaxYtest" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
MaxYtest= s['BoussinesqFluid']['YChange']['max'][-1]
print ("max Y",MaxYtest)
</variable>
<variable name="MinYtest" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
MinYtest= s['BoussinesqFluid']['YChange']['min'][-1]
print ("min Y",MinYtest)
</variable>
<variable name="Yl2norm" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
Yl2norm= s['BoussinesqFluid']['YChange']['l2norm'][-1]
print ("Y l2norm",Yl2norm)
</variable>
<variable name="Yintegral" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
Yintegral= s['BoussinesqFluid']['YChange']['integral'][-1]
print ("Y integral",Yintegral)
</variable>
<variable name="MaxTemptest" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
MaxTemptest= s['BoussinesqFluid']['TempChange']['max'][-1]
print ("max Temp",MaxTemptest)
</variable>
<variable name="MinTemptest" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
MinTemptest= s['BoussinesqFluid']['TempChange']['min'][-1]
print ("min Temp",MinTemptest)
</variable>
<variable name="Templ2norm" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
Templ2norm= s['BoussinesqFluid']['TempChange']['l2norm'][-1]
print ("Temp l2norm",Templ2norm)
</variable>
<variable name="Tempintegral" language="python">
import numpy as np
from fluidity_tools import stat_parser
s = stat_parser("particle_attributes.stat")
Tempintegral= s['BoussinesqFluid']['TempChange']['integral'][-1]
print ("Temp integral",Tempintegral)
</variable>
<variable name="Walltime" language="python">
from fluidity_tools import stat_parser
import numpy as np
s = stat_parser('particle_attributes.stat')
Walltime = s['ElapsedWallTime']["value"][-1]
print ("Total wall time", Walltime)
</variable>
</variables>
<pass_tests>
<test name="MaxX" language="python">
assert MaxXtest > 0.99
</test>
<test name="MinX" language="python">
assert MinXtest < 0.01
</test>
<test name="Xl2" language="python">
assert Xl2norm > 0.98
</test>
<test name="Xint" language="python">
assert Xintegral < 1e-3
</test>
<test name="MaxY" language="python">
assert MaxYtest > 0.99
</test>
<test name="MinY" language="python">
assert MinYtest < 0.01
</test>
<test name="Yl2" language="python">
assert Yl2norm > 0.98
</test>
<test name="Yint" language="python">
assert Yintegral < 1e-3
</test>
<test name="MaxTemp" language="python">
assert MaxTemptest > 0.8
</test>
<test name="MinTemp" language="python">
assert MinTemptest < 0.01
</test>
<test name="Templ2" language="python">
assert Templ2norm > 0.12
assert Templ2norm < 0.14
</test>
<test name="Tempint" language="python">
assert Tempintegral > 0.03
assert Tempintegral < 0.05
</test>
</pass_tests>
<warn_tests>
</warn_tests>
</testproblem>