~fluidity-core/fluidity/sea-ice-coupling

« back to all changes in this revision

Viewing changes to tests/tracer_inflow_2d_dg_cg_quad/tracer_inflow_2d_dg_cg_quad.xml

  • Committer: Simon Mouradian
  • Date: 2012-10-09 20:00:15 UTC
  • Revision ID: mouradian@gmail.com-20121009200015-7hztzrng2bkqgz1t
revert last trunk merge, something broke

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8" ?>
2
 
 
3
 
<testproblem>
4
 
  <name>tracer_inflow_2d_dg_cg</name>
5
 
  <owner userid="dham"/>
6
 
  <tags>flml</tags>
7
 
  <problem_definition length="short" nprocs="1">
8
 
    <command_line>fluidity  tracer.flml </command_line>
9
 
    <!-- Two dimensional problem in which a pulse of tracer us introduced via a dirichlet boundary condition on the tracer. The tracer then flows out of the domain. This version tests the DG code path on a continuous velocity space.-->
10
 
  </problem_definition>
11
 
  <variables>
12
 
    <variable name="solvers_converged" language="python">
13
 
import os
14
 
files = os.listdir("./")
15
 
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
16
 
    </variable>
17
 
    <variable name="tracer_integral_max" language="python">
18
 
from fluidity_tools import stat_parser
19
 
s = stat_parser("tracer.stat")
20
 
tracer_integral_max = max(s["Water"]["Tracer"]["integral"])
21
 
    </variable>
22
 
    <variable name="tracer_integral_final" language="python">
23
 
from fluidity_tools import stat_parser
24
 
s = stat_parser("tracer.stat")
25
 
tracer_integral_final = s["Water"]["Tracer"]["integral"][-1]
26
 
    </variable>
27
 
  </variables>
28
 
  <pass_tests>
29
 
    <test name="Solvers converged" language="python">
30
 
      assert(solvers_converged)
31
 
    </test>
32
 
    <test name="maximum tracer integral is 20/pi" language="python">
33
 
from math import pi
34
 
assert abs(tracer_integral_max - 20/pi) &lt; 1.5e-2
35
 
    </test>
36
 
    <test name="final tracer integral is 0" language="python">
37
 
assert abs(tracer_integral_final) &lt; 1.0e-2
38
 
    </test>
39
 
  </pass_tests>
40
 
  <warn_tests>
41
 
  </warn_tests>
42
 
</testproblem>