<?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>
  

<info>
Script compiled with XMDS2 version VERSION_PLACEHOLDER (SUBVERSION_REVISION_PLACEHOLDER)
See http://www.xmds.org for more information.
</info>

<XSIL Name="moment_group_1">
  <Param Name="n_independent">1</Param>
  <Array Name="variables" Type="Text">
    <Dim>2</Dim>
    <Stream><Metalink Format="Text" Delimiter=" \n"/>
t xOut 
    </Stream>
  </Array>
  <Array Name="data" Type="double">
    <Dim>201</Dim>
    <Dim>2</Dim>
    <Stream><Metalink Format="Binary" UnsignedLong="uint64" precision="double" Type="Remote" Encoding="LittleEndian"/>
halt_non_finite_expected_mg0.dat
    </Stream>
  </Array>
</XSIL>
</simulation>
