~amcg-stokes/fluidity/remove_rigid_rotation

« back to all changes in this revision

Viewing changes to tests/detectors_parallel_adaptivity/detectors_parallel_adaptivity.xml

  • Committer: Rhodri Davies
  • Date: 2014-05-29 00:28:06 UTC
  • mfrom: (4015.1.312 fluidity)
  • Revision ID: rhodri.davies@imperial.ac.uk-20140529002806-h4l0r5znat7f2wzp
Merge in trunk changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
ElapsedTime=s["ElapsedTime"]["value"]
19
19
    </variable>
20
20
    <variable name="last_locations_error" language="python">
21
 
from readtool import readstat
22
 
last_locations_error = readstat("detectors.detectors")
 
21
from fluidity_tools import stat_parser
 
22
from numpy import zeros,fromfile
 
23
 
 
24
s = stat_parser('detectors.detectors')
 
25
last_locations_error = zeros((2,100))
 
26
X = fromfile('Xvals.txt',sep=' ')
 
27
Y = fromfile('Yvals.txt',sep=' ')
 
28
for i in range(100):
 
29
    name = 'Steve_' + str(i+1).zfill(3)
 
30
    # +0.5 due to domain change from the lagrangian_detectors setup
 
31
    last_locations_error[0,i] = s[name]['position'][0][-1] - X[i] + 0.5
 
32
    last_locations_error[1,i] = s[name]['position'][1][-1] - Y[i] + 0.5
23
33
    </variable>
24
34
  </variables>
25
35
  <pass_tests>