File: integer_dimensions.xmds

package info (click to toggle)
xmds2 3.0.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 52,068 kB
  • sloc: python: 63,652; javascript: 9,230; cpp: 3,929; ansic: 1,463; makefile: 121; sh: 54
file content (66 lines) | stat: -rw-r--r-- 1,795 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8"?>
<simulation xmds-version="2">
  <testing>
    <arguments>--j_max 4</arguments>
    <xsil_file name="integer_dimensions.xsil" expected="../geometry/integer_dimensions_expected.xsil" absolute_tolerance="1e-7" relative_tolerance="1e-5" />
  </testing>
  
  <name>integer_dimensions</name>
  <author>Graham Dennis</author>
  <description>
    xpdeint script to test integer dimensions.
  </description>
  
  <features>
    <benchmark />
    <bing />
	<validation kind="run-time" />
	<arguments>
		<argument name="j_max" type="integer" default_value="100" />
	</arguments>
  </features>
  
  <geometry>
    <propagation_dimension> t </propagation_dimension>
    <transverse_dimensions>
      <dimension name="j" type="integer" domain="(0, j_max)" />
    </transverse_dimensions>
  </geometry>
  
  <vector name="main" type="complex">
    <components>
      x
    </components>
    <initialisation>
      <![CDATA[
      x(j => j) = 1.0e-3;
      x(j => 0) = 1.0;
      ]]>
    </initialisation>
  </vector>
  
  <sequence>
    <integrate algorithm="RK4" interval="60.0" steps="25000">
      <samples>100</samples>
      <operators>
        <integration_vectors>main</integration_vectors>
        <![CDATA[
        long j_minus_one = (j-1) % _lattice_j;
        if (j_minus_one < 0)
          j_minus_one += _lattice_j;
        long j_plus_one  = (j+1) % _lattice_j;
        dx_dt(j => j) = x(j => j)*(x(j => j_minus_one) - x(j => j_plus_one));
        ]]>
      </operators>
    </integrate>
  </sequence>
  <output format="binary">
      <sampling_group basis="j" initial_sample="yes">
        <moments>xR</moments>
        <dependencies>main</dependencies>
        <![CDATA[
          xR = x.Re();
        ]]>
      </sampling_group>
  </output>
</simulation>