<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE simulation [
<!ENTITY SimulationCode SYSTEM "lorenz_code.txt" >
]>
<simulation xmds-version="2">
  <name>lorenz</name>
  
  <!-- While not strictly necessary, the following two tags are handy. -->
  <author>Graham Dennis</author>
  <description>
    The Lorenz Attractor, an example of chaos.
  </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 sigma = 10.0;
        real b = 8.0/3.0;
        real r = 28.0;
        ]]>
     </globals>
   </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>
  </geometry>
  
  <!-- 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>5000</samples>
      <operators>
        <integration_vectors>position</integration_vectors>
              &SimulationCode;
      </operators>
    </integrate>
  </sequence>
  
  <!-- This part defines what data will be saved in the output file -->
  <output>
    <sampling_group initial_sample="yes">
      <moments>xR yR zR</moments>
      <dependencies>position</dependencies>
      <![CDATA[
        xR = x;
        yR = y;
        zR = z;
      ]]>
    </sampling_group>
  </output>
</simulation>
