Location: CellML 2.0 testing @ a984419d72b5 / parabolic_approx_sin.xml

Author:
David Nickerson <nickerso@users.sourceforge.net>
Date:
2017-08-31 11:16:51+12:00
Desc:
adding initial set of test models used in libcellml
Permanent Source URI:
https://models.cellml.org/workspace/4b1/rawfile/a984419d72b5dc4ef514f02defb70308fa57b09c/parabolic_approx_sin.xml

<?xml version="1.0" encoding="UTF-8"?><model xmlns="http://www.cellml.org/cellml/2.0#" xmlns:cellml="http://www.cellml.org/cellml/2.0#" xmlns:xlink="http://www.w3.org/1999/xlink" name="parabolic_approx_sin" id="parabolic_approx_sin">
  

  <component name="sin" id="sin">
    <variable id="x" name="x" interface="public_and_private"/>
    <variable id="sin" name="sin" interface="public_and_private"/>
    <variable name="k2_oPi" interface="public_and_private"/>
    <variable name="k2Pi" interface="public_and_private"/>
    <variable name="kPi_2" interface="public_and_private"/>
    <variable name="kPi" interface="public_and_private"/>
    <variable name="kPi_32" interface="public_and_private"/>
    <variable name="z" interface="public_and_private"/>
    <variable name="C" interface="public_and_private"/>
    <math xmlns="http://www.w3.org/1998/Math/MathML">
      <apply id="k2_oPi"><eq/>
        <ci>k2_oPi</ci>
        <apply><divide/>
          <cn cellml:units="dimensionless">2.0</cn>
          <pi/>
        </apply>
      </apply>
      <apply id="k2Pi"><eq/>
        <ci>k2Pi</ci>
        <apply><times/>
          <cn cellml:units="dimensionless">2.0</cn>
          <pi/>
        </apply>
      </apply>
      <apply id="kPi_2"><eq/>
        <ci>kPi_2</ci>
        <apply><divide/>
          <pi/>
          <cn cellml:units="dimensionless">2.0</cn>
        </apply>
      </apply>
      <apply id="kPi"><eq/>
        <ci>kPi</ci>
        <pi/>
      </apply>
      <apply id="kPi_32"><eq/>
        <ci>kPi_32</ci>
        <apply><divide/>
          <apply><times/>
            <cn cellml:units="dimensionless">3.0</cn>
            <pi/>
          </apply>
          <cn cellml:units="dimensionless">2.0</cn>
        </apply>
      </apply>
      
      <apply id="z"><eq/>
        <ci>z</ci>
        <piecewise>
          <piece>
            <apply><minus/>
              <apply><times/>
                <ci>x</ci>
                <ci>k2_oPi</ci>
              </apply>
              <cn cellml:units="dimensionless">0.5</cn>
            </apply>
            <apply><lt/>
              <ci>x</ci>
              <ci>kPi_2</ci>
            </apply>
          </piece>
          <piece>
            <apply><minus/>
              <apply><times/>
                <apply><minus/>
                  <pi/>
                  <ci>x</ci>
                </apply>
                <ci>k2_oPi</ci>
              </apply>
              <cn cellml:units="dimensionless">0.5</cn>
            </apply>
            <apply><lt/>
              <ci>x</ci>
              <ci>kPi</ci>
            </apply>
          </piece>
          <piece>
            <apply><minus/>
              <apply><times/>
                <apply><minus/>
                  <ci>x</ci>
                  <pi/>
                </apply>
                <ci>k2_oPi</ci>
              </apply>
              <cn cellml:units="dimensionless">0.5</cn>
            </apply>
            <apply><lt/>
              <ci>x</ci>
              <ci>kPi_32</ci>
            </apply>
          </piece>
          <otherwise>
            <apply><minus/>
              <apply><times/>
                <apply><minus/>
                  <ci>k2Pi</ci>
                  <ci>x</ci>
                </apply>
                <ci>k2_oPi</ci>
              </apply>
              <cn cellml:units="dimensionless">0.5</cn>
            </apply>
          </otherwise>
        </piecewise>
      </apply>
      
      <apply id="sin"><eq/>
        <ci>sin</ci>
        <piecewise>
          <piece>
            <apply><plus/>
              <apply><minus/>
                <apply><times/>
                  <ci>z</ci>
                  <ci>z</ci>
                </apply>
              </apply>
              <ci>C</ci>
              <ci>z</ci>
            </apply>
            <apply><lt/>
              <ci>x</ci>
              <ci>kPi_2</ci>
            </apply>
          </piece>
          <piece>
            <apply><plus/>
              <apply><minus/>
                <apply><times/>
                  <ci>z</ci>
                  <ci>z</ci>
                </apply>
              </apply>
              <ci>C</ci>
              <ci>z</ci>
            </apply>
            <apply><lt/>
              <ci>x</ci>
              <ci>kPi</ci>
            </apply>
          </piece>
          <piece>
            <apply><minus/>
              <apply><minus/>
                <apply><times/>
                  <ci>z</ci>
                  <ci>z</ci>
                </apply>
                <ci>C</ci>
              </apply>
              <ci>z</ci>
            </apply>
            <apply><lt/>
              <ci>x</ci>
              <ci>kPi_32</ci>
            </apply>
          </piece>
          <otherwise>
            <apply><minus/>
              <apply><minus/>
                <apply><times/>
                  <ci>z</ci>
                  <ci>z</ci>
                </apply>
                <ci>C</ci>
              </apply>
              <ci>z</ci>
            </apply>
          </otherwise>
        </piecewise>
      </apply>
    </math>
  </component>
  
</model>