~fluidity-core/fluidity/sea-ice-branch

« back to all changes in this revision

Viewing changes to tests/bed_shear_from_grad_u_DG/bed_shear_from_grad_u_DG.xml

  • Committer: Simon Mouradian
  • Date: 2012-10-19 10:35:59 UTC
  • mfrom: (3520.32.371 fluidity)
  • Revision ID: simon.mouradian06@imperial.ac.uk-20121019103559-y36qa47phc69q8sc
mergeĀ fromĀ trunk

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>bed_shear_from_grad_u_DG</name>
 
5
  <owner userid="sp911"/>
 
6
  <tags>flml bed_shear_stress test</tags>
 
7
  <problem_definition length="short" nprocs="1">
 
8
    <command_line>fluidity bed_shear_from_grad_u_DG.flml</command_line>
 
9
    <!-- check bed shear stress is as expected for very simple set up -->
 
10
</problem_definition>
 
11
  <variables>   
 
12
    <variable name="SS_min" language="python">
 
13
 
 
14
from vtktools import *
 
15
from numpy import *
 
16
data = vtu('bed_shear_from_grad_u_DG_0.vtu')
 
17
 
 
18
Shear = data.GetField('BedShearStress')
 
19
SS_min = Shear.min()
 
20
 
 
21
    </variable>  
 
22
    <variable name="SS_max" language="python">
 
23
 
 
24
from vtktools import *
 
25
from numpy import *
 
26
data = vtu('bed_shear_from_grad_u_DG_0.vtu')
 
27
 
 
28
Shear = data.GetField('BedShearStress')
 
29
SS_max = Shear.max()
 
30
 
 
31
    </variable>  
 
32
  </variables>
 
33
  <pass_tests>
 
34
    <!-- max shear stress is within 0.001% of 1 -->
 
35
    <test name="kinetic energy source term is as expected, error less than 0.01%" language="python">
 
36
assert(0.9999 &lt; SS_max &lt; 1.0001)
 
37
    </test>
 
38
    <!-- in shear stress is within 0.001% of -1 -->
 
39
    <test name="kinetic energy source term is as expected, error less than 0.01%" language="python">
 
40
assert(-1.0001 &lt; SS_min &lt; 0.9999)
 
41
    </test>
 
42
  </pass_tests>
 
43
  <warn_tests>
 
44
  </warn_tests>
 
45
</testproblem>