File: lorenz_mpi.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 (91 lines) | stat: -rw-r--r-- 2,545 bytes parent folder | download | duplicates (4)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<simulation xmds-version="2">
  <testing>
    <command_line>mpirun -n 1 ./lorenz_mpi</command_line>
    <xsil_file name="lorenz_mpi.xsil" expected="lorenz_mpi_expected.xsil" absolute_tolerance="4e-2" relative_tolerance="4e-2" />
  </testing>
  
  <name>lorenz_mpi</name>
  
  <!-- While not strictly necessary, the following two tags are handy. -->
  <author>Graham Dennis</author>
  <description>
    The Lorenz Attractor, an example of chaos.
    
    This example is designed to check that when the number of processors is of the same order
    as the number of lattice points that things don't go awry
  </description>
  
  <!-- 
  This element defines some constants.  It can be used for other 
  features as well, but we will go into that in more detail later.
  -->
  <features>
    <globals>
        <![CDATA[
        real b = 8.0/3.0;
        real r = 28.0;
        ]]>
     </globals>
     <arguments>
         <![CDATA[
             printf("Hello from rank %i\n", _rank);
         ]]>
     </arguments>
   </features>
   
  <!-- 
  This part defines all of the dimensions used in the problem,
  in this case, only the dimension of 'time' is needed.
  -->
  <geometry>
    <propagation_dimension> t </propagation_dimension>
    <transverse_dimensions>
        <dimension name="sigma" domain="(5.0,15.0)" lattice="10" transform="none"/>
    </transverse_dimensions>
  </geometry>
  
  <driver name="distributed-mpi" />
  
  <!-- A 'vector' describes the variables that we will be evolving. -->
  <vector name="position" type="real">
    <components>
      x y z
    </components>
    <initialisation>
      <![CDATA[
      x = y = z = 1.0;
      ]]>
    </initialisation>
  </vector>
  
  <sequence>
    <!--
    Here we define what differential equations need to be solved
    and what algorithm we want to use.
    -->
    <integrate algorithm="ARK89" interval="20.0" tolerance="1e-7">
      <samples>5</samples>
      <operators>
        <integration_vectors>position</integration_vectors>
        <![CDATA[
        dx_dt = sigma*(y-x);
        dy_dt = r*x - y - x*z;
        dz_dt = x*y - b*z;
        ]]>
      </operators>
    </integrate>
  </sequence>
  
  <!-- This part defines what data will be saved in the output file -->
  <output format="binary">
      <sampling_group basis="sigma" initial_sample="yes">
        <moments>xR yR zR</moments>
        <dependencies>position</dependencies>
        <![CDATA[
          xR = x;
          yR = y;
          zR = z;
        ]]>
      </sampling_group>
  </output>
</simulation>