<?xml version="1.0" encoding="UTF-8"?>
<simulation xmds-version="2">
  <testing>
    <xsil_file name="halt_non_finite.xsil" expected="halt_non_finite_expected.xsil" absolute_tolerance="1e-7" relative_tolerance="1e-5" />
  </testing>
  
  <name>halt_non_finite</name>
  <author>Gabriel McManus</author>
  <description>
    An ODE with NaN derivatives.
    Used to test the halt_non_finite feature.
  </description>
  
  <features>
    <benchmark />
    <halt_non_finite />
    <globals>
      <![CDATA[
      const real x0 = 1.0;
      const real t0 = 1.0123456789;
      ]]>
    </globals>
  </features>
  
  <geometry>
    <propagation_dimension> t </propagation_dimension>
  </geometry>
  
  <vector name="main" type="real">
    <components> x </components>
    <initialisation>
      <![CDATA[
      x = x0;
      ]]>
    </initialisation>
  </vector>
  
  <sequence>
    <integrate algorithm="RK4" interval="2" steps="1000">
      <samples>200</samples>
      <operators>
        <integration_vectors>main</integration_vectors>
        <![CDATA[
          dx_dt = sqrt(t0 - t);
        ]]>
      </operators>
    </integrate>
  </sequence>
  
  <output format="binary">
      <sampling_group initial_sample="yes">
        <moments>xOut</moments>
        <dependencies>main</dependencies>
        <![CDATA[
          xOut = x;
        ]]>
      </sampling_group>
  </output>
  
</simulation>
