1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE testproblem SYSTEM "regressiontest.dtd">
5
<name>cv_mass_matrix_check_p2</name>
6
<owner userid="btollit"/>
8
<problem_definition length="short" nprocs="1">
10
../../bin/fluidity cv_mass_matrix_check_p2_1d.flml
11
../../bin/fluidity cv_mass_matrix_check_p2_2d.flml
12
../../bin/fluidity cv_mass_matrix_check_p2_3d.flml
14
<!-- One/two/three dimensional problem for using p2 elements to soley check that the CV mass matrix is correct for one element.-->
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_p2_1d.stat")["fluid"]["ElementVolume"]["max"][-1]
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_p2_1d.stat")["fluid"]["CVMassMatrix"]["max"][-1]
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_p2_1d.stat")["fluid"]["CVMassMatrix"]["min"][-1]
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_p2_1d.stat")["fluid"]["SumCVMassMatrix"]["max"][-1]
33
<variable name="sum_fe_lumped_mass_1d" language="python">
34
from fluidity_tools import stat_parser as stat
35
sum_fe_lumped_mass_1d = stat("cv_mass_matrix_check_p2_1d.stat")["fluid"]["SumFELumpedMassMatrix"]["max"][-1]
38
<variable name="element_volume_2d" language="python">
39
from fluidity_tools import stat_parser as stat
40
element_volume_2d = stat("cv_mass_matrix_check_p2_2d.stat")["fluid"]["ElementVolume"]["max"][-1]
42
<variable name="max_cv_mass_2d" language="python">
43
from fluidity_tools import stat_parser as stat
44
max_cv_mass_2d = stat("cv_mass_matrix_check_p2_2d.stat")["fluid"]["CVMassMatrix"]["max"][-1]
46
<variable name="min_cv_mass_2d" language="python">
47
from fluidity_tools import stat_parser as stat
48
min_cv_mass_2d = stat("cv_mass_matrix_check_p2_2d.stat")["fluid"]["CVMassMatrix"]["min"][-1]
50
<variable name="sum_cv_mass_2d" language="python">
51
from fluidity_tools import stat_parser as stat
52
sum_cv_mass_2d = stat("cv_mass_matrix_check_p2_2d.stat")["fluid"]["SumCVMassMatrix"]["max"][-1]
54
<variable name="sum_fe_lumped_mass_2d" language="python">
55
from fluidity_tools import stat_parser as stat
56
sum_fe_lumped_mass_2d = stat("cv_mass_matrix_check_p2_2d.stat")["fluid"]["SumFELumpedMassMatrix"]["max"][-1]
59
<variable name="element_volume_3d" language="python">
60
from fluidity_tools import stat_parser as stat
61
element_volume_3d = stat("cv_mass_matrix_check_p2_3d.stat")["fluid"]["ElementVolume"]["max"][-1]
63
<variable name="max_cv_mass_3d" language="python">
64
from fluidity_tools import stat_parser as stat
65
max_cv_mass_3d = stat("cv_mass_matrix_check_p2_3d.stat")["fluid"]["CVMassMatrix"]["max"][-1]
67
<variable name="min_cv_mass_3d" language="python">
68
from fluidity_tools import stat_parser as stat
69
min_cv_mass_3d = stat("cv_mass_matrix_check_p2_3d.stat")["fluid"]["CVMassMatrix"]["min"][-1]
71
<variable name="sum_cv_mass_3d" language="python">
72
from fluidity_tools import stat_parser as stat
73
sum_cv_mass_3d = stat("cv_mass_matrix_check_p2_3d.stat")["fluid"]["SumCVMassMatrix"]["max"][-1]
75
<variable name="sum_fe_lumped_mass_3d" language="python">
76
from fluidity_tools import stat_parser as stat
77
sum_fe_lumped_mass_3d = stat("cv_mass_matrix_check_p2_3d.stat")["fluid"]["SumFELumpedMassMatrix"]["max"][-1]
81
<test name="check that the sum of the CV mass matrix is the element volume for 1d to tolerance 1.0e-10 " language="python">
82
print "Difference of element volume to integral CV mass for 1d: ",abs(element_volume_1d - sum_cv_mass_1d)
83
assert abs(element_volume_1d - sum_cv_mass_1d) < 1e-10
85
<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">
86
print "Difference of element volume to integral FE lumped mass for 1d: ",abs(element_volume_1d - sum_fe_lumped_mass_1d)
87
assert abs(element_volume_1d - sum_fe_lumped_mass_1d) < 1e-10
89
<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">
90
print "Difference of element volume divided by 2 to max CV mass for 1d: ",abs((element_volume_1d/2.0) - max_cv_mass_1d)
91
assert abs((element_volume_1d/2.0) - max_cv_mass_1d) < 1e-10
93
<test name="check that the max of the CV mass matrix is equal to the min of the CV mass matrix times 2 for 1d to tolerance 1.0e-10 " language="python">
94
print "Difference of max CV mass matrix to min CV mass matrix times 2 for 1d: ",abs(max_cv_mass_1d - 2*min_cv_mass_1d)
95
assert abs(max_cv_mass_1d - 2*min_cv_mass_1d) < 1e-10
98
<test name="check that the sum of the CV mass matrix is the element volume for 2d to tolerance 1.0e-10 " language="python">
99
print "Difference of element volume to integral CV mass for 2d: ",abs(element_volume_2d - sum_cv_mass_2d)
100
assert abs(element_volume_2d - sum_cv_mass_2d) < 1e-10
102
<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">
103
print "Difference of element volume to integral FE lumped mass for 2d: ",abs(element_volume_2d - sum_fe_lumped_mass_2d)
104
assert abs(element_volume_2d - sum_fe_lumped_mass_2d) < 1e-10
106
<test name="check that the max of the CV mass matrix is the element volume divided by 4 for 2d to tolerance 1.0e-10 " language="python">
107
print "Difference of element volume divided by 4 to max CV mass for 2d: ",abs((element_volume_2d/4.0) - max_cv_mass_2d)
108
assert abs((element_volume_2d/4.0) - max_cv_mass_2d) < 1e-10
110
<test name="check that the max of the CV mass matrix is equal to the min of the CV mass matrix times 3 for 2d to tolerance 1.0e-10 " language="python">
111
print "Difference of max CV mass matrix to min CV mass matrix times 3 for 2d: ",abs(max_cv_mass_2d - 3*min_cv_mass_2d)
112
assert abs(max_cv_mass_2d - 3*min_cv_mass_2d) < 1e-10
115
<test name="check that the sum of the CV mass matrix is the element volume for 3d to tolerance 1.0e-10 " language="python">
116
print "Difference of element volume to integral CV mass for 3d: ",abs(element_volume_3d - sum_cv_mass_3d)
117
assert abs(element_volume_3d - sum_cv_mass_3d) < 1e-10
119
<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">
120
print "Difference of element volume to integral FE lumped mass for 3d: ",abs(element_volume_3d - sum_fe_lumped_mass_3d)
121
assert abs(element_volume_3d - sum_fe_lumped_mass_3d) < 1e-10
123
<test name="check that the max of the CV mass matrix is the element volume times by 7/48 for 3d to tolerance 1.0e-10 " language="python">
124
print "Difference of element volume times by 7/48 to max CV mass for 3d: ",abs((element_volume_3d*7/48) - max_cv_mass_3d)
125
assert abs((element_volume_3d*7/48) - max_cv_mass_3d) < 1e-10
127
<test name="check that the max of the CV mass matrix is equal to the min of the CV mass matrix times 7/1.5 for 3d to tolerance 1.0e-10 " language="python">
128
print "Difference of max CV mass matrix to min CV mass matrix times 7/1.5 for 3d: ",abs(max_cv_mass_3d - min_cv_mass_3d*7/1.5)
129
assert abs(max_cv_mass_3d - min_cv_mass_3d*7/1.5) < 1e-10