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

« back to all changes in this revision

Viewing changes to tests/cv_mass_matrix_check_p2/cv_mass_matrix_check_p2.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_p2</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_p2_1d.flml 
 
11
../../bin/fluidity cv_mass_matrix_check_p2_2d.flml 
 
12
../../bin/fluidity cv_mass_matrix_check_p2_3d.flml 
 
13
    </command_line>
 
14
    <!-- One/two/three dimensional problem for using p2 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_p2_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_p2_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_p2_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_p2_1d.stat")["fluid"]["SumCVMassMatrix"]["max"][-1]
 
32
    </variable>
 
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]
 
36
    </variable>
 
37
 
 
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]
 
41
    </variable>
 
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]
 
45
    </variable>
 
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]
 
49
    </variable>
 
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]
 
53
    </variable>
 
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]
 
57
    </variable>
 
58
 
 
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]
 
62
    </variable>
 
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]
 
66
    </variable>
 
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]
 
70
    </variable>
 
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]
 
74
    </variable>
 
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]
 
78
    </variable>
 
79
  </variables>
 
80
  <pass_tests>
 
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) &lt; 1e-10
 
84
    </test>
 
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) &lt; 1e-10
 
88
    </test>
 
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) &lt; 1e-10
 
92
    </test>
 
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) &lt; 1e-10
 
96
    </test>
 
97
 
 
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) &lt; 1e-10
 
101
    </test>
 
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) &lt; 1e-10
 
105
    </test>
 
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) &lt; 1e-10
 
109
    </test>
 
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) &lt; 1e-10
 
113
    </test>
 
114
 
 
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) &lt; 1e-10
 
118
    </test>
 
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) &lt; 1e-10
 
122
    </test>
 
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) &lt; 1e-10
 
126
    </test>
 
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) &lt; 1e-10
 
130
    </test>
 
131
  </pass_tests>
 
132
  <warn_tests>
 
133
  </warn_tests>
 
134
</testproblem>