<?xml version="1.0" encoding="UTF-8"?>
<simulation xmds-version="2">
  <testing>
    <xsil_file name="lorenz.xsil" expected="lorenz_expected.xsil" absolute_tolerance="1e-4" relative_tolerance="1e-4" />
  </testing>
  
  <name>lorenz</name>
  <author>Graham Dennis</author>
  <description>
    The Lorenz Attractor, an example of chaos.
  </description>
  
  <features>
    <benchmark />
    <globals>
      <![CDATA[
      double sigma = 10.0;
      double b = 8.0/3.0;
      double r = 28.0;
      ]]>
    </globals>
  </features>
  
  <geometry>
    <propagation_dimension> t </propagation_dimension>
  </geometry>
  
  <vector name="main" type="real">
    <components>
      x y z
    </components>
    <initialisation>
      <![CDATA[
      x = y = z = 1.0;
      ]]>
    </initialisation>
  </vector>
  
  <sequence>
    <integrate algorithm="ARK89" interval="20.0" steps="25000" tolerance="1e-7">
      <samples>500</samples>
      <operators>
        <integration_vectors>main</integration_vectors>
        <![CDATA[
        dx_dt = sigma*(y-x);
        dy_dt = r*x - y - x*z;
        dz_dt = x*y - b*z;
        ]]>
      </operators>
    </integrate>
  </sequence>
  <output format="ascii" filename="lorenz.xsil">
      <sampling_group initial_sample="yes">
        <moments>xR yR zR</moments>
        <dependencies>main</dependencies>
        <![CDATA[
          xR = x;
          yR = y;
          zR = z;
        ]]>
      </sampling_group>
  </output>
</simulation>
