~fluidity-core/fluidity/shallow-water-dev

« back to all changes in this revision

Viewing changes to tests/cv_mass_matrix_check_p1/cv_mass_matrix_check_p1.xml

  • Committer: colin.cotter at ac
  • Date: 2012-02-13 14:24:01 UTC
  • mfrom: (3565.1.362 fluidity)
  • Revision ID: colin.cotter@imperial.ac.uk-20120213142401-fz23s9jmvc8jjiy6
MergedĀ fromĀ trunk.

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
 
 
4
<testproblem>
 
5
  <name>cv_mass_matrix_check_p1</name>
 
6
  <owner userid="btollit"/>
 
7
  <tags>flml cv</tags>
 
8
  <problem_definition length="short" nprocs="1">
 
9
    <command_line>
 
10
../../bin/fluidity cv_mass_matrix_check_p1_1d.flml 
 
11
../../bin/fluidity cv_mass_matrix_check_p1_2d.flml 
 
12
../../bin/fluidity cv_mass_matrix_check_p1_3d.flml 
 
13
    </command_line>
 
14
    <!-- One/two/three dimensional problem for using p1 elements to soley check that the CV mass matrix is correct for one element.-->
 
15
  </problem_definition>
 
16
  <variables>
 
17
    <variable name="element_volume_1d" language="python">
 
18
from fluidity_tools import stat_parser as stat
 
19
element_volume_1d = stat("cv_mass_matrix_check_p1_1d.stat")["fluid"]["ElementVolume"]["max"][-1]
 
20
    </variable>
 
21
    <variable name="max_cv_mass_1d" language="python">
 
22
from fluidity_tools import stat_parser as stat
 
23
max_cv_mass_1d = stat("cv_mass_matrix_check_p1_1d.stat")["fluid"]["CVMassMatrix"]["max"][-1]
 
24
    </variable>
 
25
    <variable name="min_cv_mass_1d" language="python">
 
26
from fluidity_tools import stat_parser as stat
 
27
min_cv_mass_1d = stat("cv_mass_matrix_check_p1_1d.stat")["fluid"]["CVMassMatrix"]["min"][-1]
 
28
    </variable>
 
29
    <variable name="sum_cv_mass_1d" language="python">
 
30
from fluidity_tools import stat_parser as stat
 
31
sum_cv_mass_1d = stat("cv_mass_matrix_check_p1_1d.stat")["fluid"]["SumCVMassMatrix"]["max"][-1]
 
32
    </variable>
 
33
    <variable name="max_fe_lumped_mass_1d" language="python">
 
34
from fluidity_tools import stat_parser as stat
 
35
max_fe_lumped_mass_1d = stat("cv_mass_matrix_check_p1_1d.stat")["fluid"]["FELumpedMassMatrix"]["max"][-1]
 
36
    </variable>
 
37
    <variable name="min_fe_lumped_mass_1d" language="python">
 
38
from fluidity_tools import stat_parser as stat
 
39
min_fe_lumped_mass_1d = stat("cv_mass_matrix_check_p1_1d.stat")["fluid"]["FELumpedMassMatrix"]["min"][-1]
 
40
    </variable>
 
41
    <variable name="sum_fe_lumped_mass_1d" language="python">
 
42
from fluidity_tools import stat_parser as stat
 
43
sum_fe_lumped_mass_1d = stat("cv_mass_matrix_check_p1_1d.stat")["fluid"]["SumFELumpedMassMatrix"]["max"][-1]
 
44
    </variable>
 
45
 
 
46
    <variable name="element_volume_2d" language="python">
 
47
from fluidity_tools import stat_parser as stat
 
48
element_volume_2d = stat("cv_mass_matrix_check_p1_2d.stat")["fluid"]["ElementVolume"]["max"][-1]
 
49
    </variable>
 
50
    <variable name="max_cv_mass_2d" language="python">
 
51
from fluidity_tools import stat_parser as stat
 
52
max_cv_mass_2d = stat("cv_mass_matrix_check_p1_2d.stat")["fluid"]["CVMassMatrix"]["max"][-1]
 
53
    </variable>
 
54
    <variable name="min_cv_mass_2d" language="python">
 
55
from fluidity_tools import stat_parser as stat
 
56
min_cv_mass_2d = stat("cv_mass_matrix_check_p1_2d.stat")["fluid"]["CVMassMatrix"]["min"][-1]
 
57
    </variable>
 
58
    <variable name="sum_cv_mass_2d" language="python">
 
59
from fluidity_tools import stat_parser as stat
 
60
sum_cv_mass_2d = stat("cv_mass_matrix_check_p1_2d.stat")["fluid"]["SumCVMassMatrix"]["max"][-1]
 
61
    </variable>
 
62
    <variable name="max_fe_lumped_mass_2d" language="python">
 
63
from fluidity_tools import stat_parser as stat
 
64
max_fe_lumped_mass_2d = stat("cv_mass_matrix_check_p1_2d.stat")["fluid"]["FELumpedMassMatrix"]["max"][-1]
 
65
    </variable>
 
66
    <variable name="min_fe_lumped_mass_2d" language="python">
 
67
from fluidity_tools import stat_parser as stat
 
68
min_fe_lumped_mass_2d = stat("cv_mass_matrix_check_p1_2d.stat")["fluid"]["FELumpedMassMatrix"]["min"][-1]
 
69
    </variable>
 
70
    <variable name="sum_fe_lumped_mass_2d" language="python">
 
71
from fluidity_tools import stat_parser as stat
 
72
sum_fe_lumped_mass_2d = stat("cv_mass_matrix_check_p1_2d.stat")["fluid"]["SumFELumpedMassMatrix"]["max"][-1]
 
73
    </variable>
 
74
 
 
75
    <variable name="element_volume_3d" language="python">
 
76
from fluidity_tools import stat_parser as stat
 
77
element_volume_3d = stat("cv_mass_matrix_check_p1_3d.stat")["fluid"]["ElementVolume"]["max"][-1]
 
78
    </variable>
 
79
    <variable name="max_cv_mass_3d" language="python">
 
80
from fluidity_tools import stat_parser as stat
 
81
max_cv_mass_3d = stat("cv_mass_matrix_check_p1_3d.stat")["fluid"]["CVMassMatrix"]["max"][-1]
 
82
    </variable>
 
83
    <variable name="min_cv_mass_3d" language="python">
 
84
from fluidity_tools import stat_parser as stat
 
85
min_cv_mass_3d = stat("cv_mass_matrix_check_p1_3d.stat")["fluid"]["CVMassMatrix"]["min"][-1]
 
86
    </variable>
 
87
    <variable name="sum_cv_mass_3d" language="python">
 
88
from fluidity_tools import stat_parser as stat
 
89
sum_cv_mass_3d = stat("cv_mass_matrix_check_p1_3d.stat")["fluid"]["SumCVMassMatrix"]["max"][-1]
 
90
    </variable>
 
91
    <variable name="max_fe_lumped_mass_3d" language="python">
 
92
from fluidity_tools import stat_parser as stat
 
93
max_fe_lumped_mass_3d = stat("cv_mass_matrix_check_p1_3d.stat")["fluid"]["FELumpedMassMatrix"]["max"][-1]
 
94
    </variable>
 
95
    <variable name="min_fe_lumped_mass_3d" language="python">
 
96
from fluidity_tools import stat_parser as stat
 
97
min_fe_lumped_mass_3d = stat("cv_mass_matrix_check_p1_3d.stat")["fluid"]["FELumpedMassMatrix"]["min"][-1]
 
98
    </variable>
 
99
    <variable name="sum_fe_lumped_mass_3d" language="python">
 
100
from fluidity_tools import stat_parser as stat
 
101
sum_fe_lumped_mass_3d = stat("cv_mass_matrix_check_p1_3d.stat")["fluid"]["SumFELumpedMassMatrix"]["max"][-1]
 
102
    </variable>
 
103
  </variables>
 
104
  <pass_tests>
 
105
    <test name="check that the sum of the CV mass matrix is the element volume for 1d to tolerance 1.0e-10 " language="python">
 
106
print "Difference of element volume to integral CV mass for 1d: ",abs(element_volume_1d - sum_cv_mass_1d)
 
107
assert abs(element_volume_1d - sum_cv_mass_1d) &lt; 1e-10
 
108
    </test>
 
109
    <test name="check that the sum of the FE lumped mass matrix is the element volume for 1d to tolerance 1.0e-10 " language="python">
 
110
print "Difference of element volume to integral FE lumped mass for 1d: ",abs(element_volume_1d - sum_fe_lumped_mass_1d)
 
111
assert abs(element_volume_1d - sum_fe_lumped_mass_1d) &lt; 1e-10
 
112
    </test>
 
113
    <test name="check that the max of the CV mass matrix is the element volume divided by 2 for 1d to tolerance 1.0e-10 " language="python">
 
114
print "Difference of element volume divided by 2 to max CV mass for 1d: ",abs((element_volume_1d/2.0) - max_cv_mass_1d)
 
115
assert abs((element_volume_1d/2.0) - max_cv_mass_1d) &lt; 1e-10
 
116
    </test>
 
117
    <test name="check that the max of the FE lumped mass matrix is the element volume divided by 2 for 1d to tolerance 1.0e-10 " language="python">
 
118
print "Difference of element volume divided by 2 to max FE lumped mass for 1d: ",abs((element_volume_1d/2.0) - max_fe_lumped_mass_1d)
 
119
assert abs((element_volume_1d/2.0) - max_fe_lumped_mass_1d) &lt; 1e-10
 
120
    </test>
 
121
    <test name="check that the max of the CV mass matrix is equal to the min of the CV mass matrix for 1d to tolerance 1.0e-10 " language="python">
 
122
print "Difference of max CV mass matrix to min CV mass matrix for 1d: ",abs(max_cv_mass_1d - min_cv_mass_1d)
 
123
assert abs(max_cv_mass_1d - min_cv_mass_1d) &lt; 1e-10
 
124
    </test>
 
125
    <test name="check that the max of the FE lumped mass matrix is equal to the min of the FE lumped mass matrix for 1d to tolerance 1.0e-10 " language="python">
 
126
print "Difference of max FE lumped mass matrix to min FE lumped mass matrix for 1d: ",abs(max_fe_lumped_mass_1d - min_fe_lumped_mass_1d)
 
127
assert abs(max_fe_lumped_mass_1d - min_fe_lumped_mass_1d) &lt; 1e-10
 
128
    </test>
 
129
    <test name="check that the max of the CV mass matrix is equal to the max of the FE lumped mass matrix for 1d to tolerance 1.0e-10 " language="python">
 
130
print "Difference of max CV mass matrix to max FE lumped mass matrix for 1d: ",abs(max_cv_mass_1d - max_fe_lumped_mass_1d)
 
131
assert abs(max_cv_mass_1d - max_fe_lumped_mass_1d) &lt; 1e-10
 
132
    </test>
 
133
 
 
134
    <test name="check that the sum of the CV mass matrix is the element volume for 2d to tolerance 1.0e-10 " language="python">
 
135
print "Difference of element volume to integral CV mass for 2d: ",abs(element_volume_2d - sum_cv_mass_2d)
 
136
assert abs(element_volume_2d - sum_cv_mass_2d) &lt; 1e-10
 
137
    </test>
 
138
    <test name="check that the sum of the FE lumped mass matrix is the element volume for 2d to tolerance 1.0e-10 " language="python">
 
139
print "Difference of element volume to integral FE lumped mass for 2d: ",abs(element_volume_2d - sum_fe_lumped_mass_2d)
 
140
assert abs(element_volume_2d - sum_fe_lumped_mass_2d) &lt; 1e-10
 
141
    </test>
 
142
    <test name="check that the max of the CV mass matrix is the element volume divided by 3 for 2d to tolerance 1.0e-10 " language="python">
 
143
print "Difference of element volume divided by 3 to max CV mass for 2d: ",abs((element_volume_2d/3.0) - max_cv_mass_2d)
 
144
assert abs((element_volume_2d/3.0) - max_cv_mass_2d) &lt; 1e-10
 
145
    </test>
 
146
    <test name="check that the max of the FE lumped mass matrix is the element volume divided by 3 for 2d to tolerance 1.0e-10 " language="python">
 
147
print "Difference of element volume divided by 3 to max FE lumped mass for 2d: ",abs((element_volume_2d/3.0) - max_fe_lumped_mass_2d)
 
148
assert abs((element_volume_2d/3.0) - max_fe_lumped_mass_2d) &lt; 1e-10
 
149
    </test>
 
150
    <test name="check that the max of the CV mass matrix is equal to the min of the CV mass matrix for 2d to tolerance 1.0e-10 " language="python">
 
151
print "Difference of max CV mass matrix to min CV mass matrix for 2d: ",abs(max_cv_mass_2d - min_cv_mass_2d)
 
152
assert abs(max_cv_mass_2d - min_cv_mass_2d) &lt; 1e-10
 
153
    </test>
 
154
    <test name="check that the max of the FE lumped mass matrix is equal to the min of the FE lumped mass matrix for 2d to tolerance 1.0e-10 " language="python">
 
155
print "Difference of max FE lumped mass matrix to min FE lumped mass matrix for 2d: ",abs(max_fe_lumped_mass_2d - min_fe_lumped_mass_2d)
 
156
assert abs(max_fe_lumped_mass_2d - min_fe_lumped_mass_2d) &lt; 1e-10
 
157
    </test>
 
158
    <test name="check that the max of the CV mass matrix is equal to the max of the FE lumped mass matrix for 2d to tolerance 1.0e-10 " language="python">
 
159
print "Difference of max CV mass matrix to max FE lumped mass matrix for 2d: ",abs(max_cv_mass_2d - max_fe_lumped_mass_2d)
 
160
assert abs(max_cv_mass_2d - max_fe_lumped_mass_2d) &lt; 1e-10
 
161
    </test>
 
162
 
 
163
    <test name="check that the sum of the CV mass matrix is the element volume for 3d to tolerance 1.0e-10 " language="python">
 
164
print "Difference of element volume to integral CV mass for 3d: ",abs(element_volume_3d - sum_cv_mass_3d)
 
165
assert abs(element_volume_3d - sum_cv_mass_3d) &lt; 1e-10
 
166
    </test>
 
167
    <test name="check that the sum of the FE lumped mass matrix is the element volume for 3d to tolerance 1.0e-10 " language="python">
 
168
print "Difference of element volume to integral FE lumped mass for 3d: ",abs(element_volume_3d - sum_fe_lumped_mass_3d)
 
169
assert abs(element_volume_3d - sum_fe_lumped_mass_3d) &lt; 1e-10
 
170
    </test>
 
171
    <test name="check that the max of the CV mass matrix is the element volume divided by 4 for 3d to tolerance 1.0e-10 " language="python">
 
172
print "Difference of element volume divided by 4 to max CV mass for 3d: ",abs((element_volume_3d/4.0) - max_cv_mass_3d)
 
173
assert abs((element_volume_3d/4.0) - max_cv_mass_3d) &lt; 1e-10
 
174
    </test>
 
175
    <test name="check that the max of the FE lumped mass matrix is the element volume divided by 4 for 3d to tolerance 1.0e-10 " language="python">
 
176
print "Difference of element volume divided by 4 to max FE lumped mass for 3d: ",abs((element_volume_3d/4.0) - max_fe_lumped_mass_3d)
 
177
assert abs((element_volume_3d/4.0) - max_fe_lumped_mass_3d) &lt; 1e-10
 
178
    </test>
 
179
    <test name="check that the max of the CV mass matrix is equal to the min of the CV mass matrix for 3d to tolerance 1.0e-10 " language="python">
 
180
print "Difference of max CV mass matrix to min CV mass matrix for 3d: ",abs(max_cv_mass_3d - min_cv_mass_3d)
 
181
assert abs(max_cv_mass_3d - min_cv_mass_3d) &lt; 1e-10
 
182
    </test>
 
183
    <test name="check that the max of the FE lumped mass matrix is equal to the min of the FE lumped mass matrix for 3d to tolerance 1.0e-10 " language="python">
 
184
print "Difference of max FE lumped mass matrix to min FE lumped mass matrix for 3d: ",abs(max_fe_lumped_mass_3d - min_fe_lumped_mass_3d)
 
185
assert abs(max_fe_lumped_mass_3d - min_fe_lumped_mass_3d) &lt; 1e-10
 
186
    </test>
 
187
    <test name="check that the max of the CV mass matrix is equal to the max of the FE lumped mass matrix for 3d to tolerance 1.0e-10 " language="python">
 
188
print "Difference of max CV mass matrix to max FE lumped mass matrix for 3d: ",abs(max_cv_mass_3d - max_fe_lumped_mass_3d)
 
189
assert abs(max_cv_mass_3d - max_fe_lumped_mass_3d) &lt; 1e-10
 
190
    </test>
 
191
  </pass_tests>
 
192
  <warn_tests>
 
193
  </warn_tests>
 
194
</testproblem>