MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Parallel Processing Toolkit


Hi,

a parallel Runge-Kutta method ?

It is attached.

Regards
  Jens

Blimbaum Jerry DLPC wrote:
> 
>         Does anyone have a notebook (that they could share) with examples of
> how they have used Mathematica's Parallel Processing Toolkit..
> 
>         thanks....jerry blimbaum    NSWC Panama City, Fl

 filename="ParallelDIRKSend.nb"

(***********************************************************************

                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 3.0,
MathReader 3.0, or any compatible application. The data for the notebook 
starts with the line of stars above.

To get the notebook into a Mathematica-compatible application, do one of 
the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the 
word CacheID, otherwise Mathematica-compatible applications may try to 
use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info at wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
***********************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[     34318,        866]*)
(*NotebookOutlinePosition[     34954,        889]*)
(*  CellTagsIndexPosition[     34910,        885]*)
(*WindowFrame->Normal*)



Notebook[{
Cell["\<\
When the steps of the DIRKmethod are evaluated we have to solve \
equations of the form\
\>", "Text"],

Cell[BoxData[
    \(TraditionalForm\`\(\ 
    \[Xi]\_i = \ 
      f \((t + \[Alpha]\ h, y + \[Beta]\ h\ \[Xi]\_i + \[Psi])\)\)\)], 
  "DisplayFormula"],

Cell[TextData[{
  "For the numerical solution we will collect  ",
  Cell[BoxData[
      \(TraditionalForm\`y + \[Psi]\)]],
  " in the y argument of newtonSolve[]."
}], "Text"],

Cell[BoxData[
    \(Needs["\<Parallel`Parallel`\>"]\)], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
    \(p2link = 
      LaunchSlave["\<ilabws.informatik.uni-leipzig.de\>", 
        "\<rsh `1` /home/kuska/bin/math -mathlink\>"]\)], "Input"],

Cell[BoxData[
    \(LinkObject[
      "rsh ilabws.informatik.uni-leipzig.de /home/kuska/bin/math -mathlink", 
      3, 2]\)], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(p2link = LaunchSlave["\<localhost\>", "\<math -mathlink\>"]\)], "Input"],

Cell[BoxData[
    \(LinkObject["math -mathlink", 2, 2]\)], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
    \(Clear[newtonSolve]\n\), 
    \(DIRKNDSolve::newtit = 
      "\<Implicit solution of does not terminate after `1` steps.\>"\n\), 
    \(newtonSolve[t_?NumericQ, h_?NumericQ, \n\t\ \ yn_List, \ f_, \n\t\ \ 
        alpha_, beta_, \n\t\ \ jac_, \n\t\ \ \ maxit_Integer, 
        errPhi_?NumericQ] := \n
      Module[{xi, b, delta, ludecomp, i, tau, arg}, \n\t\t\ \ xi = yn; \n
        \t\t\ tau = t + alpha*h; \n\t\ti = 0; \n\t\t
        While[\(i++\) < maxit, \n\t\t\targ = yn + beta*h*xi; \n\t\t\t
          ludecomp = 
            LUDecomposition[
              IdentityMatrix[Length[xi]] - beta*h*jac[tau, arg]]; \n\t\t\t\ 
          b = xi - f[tau, arg]; \n\t\t\t\ 
          delta = LUBackSubstitution[ludecomp, b]; \n\t\t\t\ xi -= delta; \n
          \t\t\t\ If[\(errPhi > Sqrt[Dot[#, #]]&\)[delta], \n\t\t\t\t\ \ 
            \(Return[xi]; \)\n\t\t\t\t]\n\t\t\t]; \n\t\t
        Message[DIRKNDSolve::newtit, i]; \n\t\txi\n\t]\n\t\)}], "Input"],

Cell[BoxData[
    \("Implicit solution of does not terminate after `1` steps."\)], "Output"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(beta\)\" is similar to \
existing symbol \"\!\(Beta\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(arg\)\" is similar to \
existing symbol \"\!\(Arg\)\"."\)], "Message"]
}, Open  ]],

Cell[BoxData[
    \(DIRKErrorEstimate[h_, y1_, yEstimate_, errY_] := \n\t
      Module[{errEst, hFac}, \n\t\t\ \ 
        If[{} != yEstimate, \n\t\t\t\ \ 
          errEst = 
            \(Plus\ @@\ #/Length[#]\ &\)\ [Abs\ /@\ \((y1 - yEstimate)\)], \n
          \t\t\t\ \ errEst = 100. *$MachineEpsilon\n\t\t\t\t]; \n\t\t\ \ 
        If[Abs[errEst] <= $MachineEpsilon, errEst = 10.  $MachineEpsilon]; \n
        \t\t\thFac = Min[5.0, \(($SaveFactor*errY/errEst)\)^\((1/4)\)]; \n
        \t\t\ \ hFac*h\n\t\t]\)], "Input"],

Cell[BoxData[
    \(\(\nDIRKPredictY[y0_, h_, tau_, xi1_, xi2_, xi3_, xi4_] := \n\t\ \ 
      Module[{b1, b2, b3, b4}, \n
        \t\t\t\t\ {b1, b2, b3, b4} = {
            tau*\((\(-28\)/5\  + \ \((69/5\  - \ \((46*tau)\)/5)\)*tau)\), 
            \ \ \n\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ tau*\((3\  + \ tau*\((\(-15\)/2\  + \ 6*tau)\))\), 
            \ \n\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ 
            tau*\((\(-12\)/5\  + \ \((21/5\  - \ \((14*tau)\)/5)\)*tau)\), \ 
            \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
            tau*\((6\  + \ tau*\((\(-21\)/2\  + \ 6*tau)\))\)}; \n\t\t\t\ \ 
        y0 + h*\((b1*xi1 + b2*xi2 + b3*xi3 + b4*xi4)\)\n\t\t\ \ ]\)\)], 
  "Input"],

Cell[CellGroupData[{

Cell[BoxData[{
    \(Clear[DIRKSerial]\n\), 
    \($SaveFactor = 0.8; \n$RightHandSide = Null; 
    \  (*\ f[t, y]\ of\ the\ differential\ equations\ as\ pure\ function\ *) 
      \n$Jacobian = Null; 
    \ \ \ \ \ \ \ \ \ \ \ \  (*\ 
      D[f, y]\ of\ the\ system\ as\ pure\ function\ *) \n\n
    DIRKSerial[t_, y0_List, h_, maxit_Integer, errPhi_?NumericQ, 
        errY_?NumericQ, yEstimate_List] := \n\t
      Module[{xi1, xi2, xi3, xi4, psi3, psi4, y1, y1Estimate, hNext, tau}, \n
        \t\t\ \ xi1 = 
          newtonSolve[t, h, y0, $RightHandSide, 1/2, 1/2, $Jacobian, maxit, 
            errPhi]; \n\t\t\ \ 
        xi2 = newtonSolve[t, h, y0, $RightHandSide, 2/3, 2/3, $Jacobian, 
            maxit, errPhi]; \n\t\t\ \ psi3 = y0 + 5*h*\((\(-xi1\) + xi2)\)/2; 
        \n\t\t\ \ psi4 = y0 + h*\((\(-5\)*xi1 + 4*xi2)\)/3; \n\t\t\ \ 
        xi3 = newtonSolve[t, h, psi3, $RightHandSide, 1/2, 1/2, $Jacobian, 
            maxit, errPhi]; \n\t\t\ \ 
        xi4 = newtonSolve[t, h, psi4, $RightHandSide, 1/3, 2/3, $Jacobian, 
            maxit, errPhi]; \n\t\t\ \ 
        y1 = y0 + h*\((3*\((xi2 + xi4)\)/2 - xi1 - xi3)\); \n
        \t\t (*\ Now\ we\ estimate\ the\ error\ from\ the\ prediction\ of\ the
              \ last\ step\  ... *) \n\t\t\ \ 
        hNext = DIRKErrorEstimate[h, y1, yEstimate, errY]; \n\t\t\ \ 
        tau = 1.  + hNext/h; \n
        \t\t\t (*\ and\ predict\ the\ y - values\ for\ t + h + hNext\ *) 
          \t\t\t\t\n\ \ \ \ \ \ \ 
        y1Estimate = DIRKPredictY[y0, h, tau, xi1, xi2, xi3, xi4]; \n
        \ \ \ \ \ \ \ {y1, hNext, y1Estimate}\n\t\t]\)}], "Input"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\($Jacobian\)\" is \
similar to existing symbol \"\!\(Jacobian\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(y1Estimate\)\" is \
similar to existing symbol \"\!\(yEstimate\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(hNext\)\" is similar to \
existing symbol \"\!\(Next\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"stop" \( : \ \) 
      "Further output of \!\(General :: \"spell1\"\) will be suppressed \
during this calculation."\)], "Message"]
}, Open  ]],

Cell[BoxData[{
    \($DIRKLinkP2 = Null; \n\n
    ParallelDIRKAlgorithmQ[DIRKParallel\ , lnk_] := 
      If[Head[lnk] === LinkObject, True, False]\n\), 
    \(ParallelDIRKAlgorithmQ[DIRKSerial\ , lnk_] := False\n\), 
    \(ParallelDIRKAlgorithmQ[meth_Symbol, lnk_] := 
      If[meth === DIRKParallel\  && \ Head[lnk] === LinkObject, True, False]\n
    \), 
    \(ParallelDIRKAlgorithmQ[meth_Symbol, Null] := False\n\), 
    \(DIRKGetVector[lnk_]\  := \n\ \ \ 
      Module[{pkt, \ i}, \n\ \ \ \ \ \ \ \ i\  = \ 0; \ \n\ \ \ \ \ \ \ \ \ 
        While[\(i++\)\  < \ $IterationLimit, \n\t\ \ \ \ \ 
          pkt\  = \ LinkRead[lnk]; \n\t\ \ \ \ \ 
          If[VectorQ[pkt, \ NumericQ], \ Return[pkt]]; \n
          \ \ \ \ \ \ \ \ \ \ \ \ \ \ Pause[1]; \n\ \ \ \ \ \ \ \ \ \ \ \ ]; 
        \n\ \ ]\n\n (*\ 
      A\ condition\ is\ added\ to\ the\ function\ to\ prevent\ the\ evaluation
          \ inside\ DIRKParallel . \n\t\ \ the\ DIRKNDSolve[]\ function\ will
          \ export\ $DIRKLinkP2 = 
        Null\ to\ P2\ and\ than\ set\ \n\t\t\ \ the\ value\ of\ $DIRKLinkP2\ 
          to\ a\ \(LinkObject[] . \)\ *) \n\n\), 
    \(DIRKParallelOnP2[t_?NumericQ, y0_List, h_?NumericQ, maxit_Integer, 
          errPhi_?NumericQ] /; \ $DIRKLinkP2 === Null := \n\t\ \ 
      Module[{xi1, xi2, psi4, xi4}, \t\t\ \n\t\t\t\ 
        xi2 = newtonSolve[t, h, y0, $RightHandSide, 2/3, 2/3, $Jacobian, 
            maxit, errPhi]; \n\t\t\t\ \ LinkWrite[$ParentLink, xi2]; \n
        \ \ \ \ \ \ \ \ \ xi1 = DIRKGetVector[$ParentLink]; \n\t\t\ \ \ \ 
        psi4 = y0 + h*\((\(-5\)*xi1 + 4*xi2)\)/3; \n\t\t\ \ \ \ 
        xi4 = newtonSolve[t, h, psi4, $RightHandSide, 1/3, 2/3, $Jacobian, 
            maxit, errPhi]; \n\ \ \ \ \ \ \ \ \ LinkWrite[$ParentLink, xi4]; 
        \n\t\t\ \ ]\n\n\), 
    \(DIRKParallel[t_, y0_List, h_, maxit_Integer, errPhi_?NumericQ, 
        errY_?NumericQ, yEstimate_List] := \n\t
      Module[{xi1, xi2, xi3, xi4, psi3, y1, y1Estimate, hNext, tau}, \n
        \t\t\ \ LinkWrite[$DIRKLinkP2, 
          EvaluatePacket[DIRKParallelOnP2[t, y0, h, maxit, errPhi]]]; \n
        \t\t\ \ xi1 = 
          newtonSolve[t, h, y0, $RightHandSide, 1/2, 1/2, $Jacobian, maxit, 
            errPhi]; \n\t\t\txi2 = DIRKGetVector[$DIRKLinkP2]; \n\t\t\ \ 
        LinkWrite[$DIRKLinkP2, xi1]; \n\t\t\ \ 
        psi3 = y0 + 5*h*\((\(-xi1\) + xi2)\)/2; \n\t\t\ \ 
        xi3 = newtonSolve[t, h, psi3, $RightHandSide, 1/2, 1/2, $Jacobian, 
            maxit, errPhi]; \n\t\t\ \ xi4 = DIRKGetVector[$DIRKLinkP2]; \n
        \t\t\ \ While[LinkReadyQ[$DIRKLinkP2], \  (*\ Clean\ the\ link\ *) \n
          \t\t\t\ \ \ \ \ LinkRead[$DIRKLinkP2]\n\t\t\t\ \ ]; \n\t\t\ \ 
        y1 = y0 + h*\((3*\((xi2 + xi4)\)/2 - xi1 - xi3)\); \n
        \t\t (*\ Now\ we\ estimate\ the\ error\ from\ the\ prediction\ of\ the
              \ last\ step\  ... *) \n\t\t\ \ 
        hNext = DIRKErrorEstimate[h, y1, yEstimate, errY]; \n\t\t\ \ 
        tau = 1.  + hNext/h; \n
        \t\t\t (*\ and\ predict\ the\ y - values\ for\ t + h + hNext\ *) 
          \t\t\t\t\n\ \ \ \ \ \ \ 
        y1Estimate = DIRKPredictY[y0, h, tau, xi1, xi2, xi3, xi4]; \n
        \ \ \ \ \ \ \ {y1, hNext, y1Estimate}\n\t\t]\)}], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
    \(DIRKNDSolve::mxst = 
      "\<Maximum number of `1` steps reached at the point `2`==`3`.\>"\)], 
  "Input"],

Cell[BoxData[
    \("Maximum number of `1` steps reached at the point `2`==`3`."\)], 
  "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
    \(Clear[DIRKIntegrate]\n\t\), 
    \(DIRKIntegrate[tsym_, t0_, t1_, yInit_, \n\ \ \ \ hInit_, errImplicit_, 
        errY_, \n\t\ maxIterations_Integer, \n\tmaxSteps_, \n\tdirkmethod_\n
        \ \ \ ] := \n\t
      Module[{posneg, t, y, yEstimate, h, hNext, i, outsave}, \n\t\t\ \ 
        posNeg = Sign[t1 - t0]; \n\t\t\ \ t = t0; \n\t\t\ \ y = yInit; \n
        \t\t\ \ yEstimate = {}; \n\t\t\ \ h = \(hNext = hInit*posNeg\); \n
        \t\t\ i = 0; \n\t\t\ outsave = {{t0, yInit}}; \n\t\t\ 
        While[True, \n\t\t\t\ \ \ 
          If[\((t - t1)\)*posNeg + $MachineEpsilon > 0.0, \ Break[]]; \n
          \t\t\t\ \ \ If[\((t + h - t1)\)*posNeg > 0.0, \ h = t1 - t]; 
          \  (*\ cut\ if\ overshoot\ the\ end\ point\ *) \n
          \t\t\t\ \ \ {y, hNext, yEstimate} = \n\t\t\t\t\ \ \ \ \ \ 
            dirkmethod[t, y, h, \n\t\t\t\t\t\ \ \ \ \ \ \ \ maxIterations, 
              errImplicit, errY, yEstimate]; \n\t\t\t\ \ \ \ t += h; \n
          \t\t\t\ \ \ \ h = hNext; \n\t\t\t\ \ \ 
          outsave = Join[outsave, {{t, y}}]; \n\t\t\t\ \ \ 
          If[\(++i\)\  > \ maxSteps, \n\t\t\t\t\ \ \ \ 
            Message[DIRKNDSolve::mxst, maxSteps, tsym, t]; \n\t\t\t\t\ \ \ \ 
            Break[]; \n\t\t\t\t]\n\t\t\ \ \ ]; \n\t\t\ \ outsave\n\t\t]\)}], 
  "Input"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(hInit\)\" is similar to \
existing symbol \"\!\(yInit\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(maxIterations\)\" is \
similar to existing symbol \"\!\(MaxIterations\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(maxSteps\)\" is similar \
to existing symbol \"\!\(MaxSteps\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"stop" \( : \ \) 
      "Further output of \!\(General :: \"spell1\"\) will be suppressed \
during this calculation."\)], "Message"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
    \(\nClear[dirkMakeFun]\n
    \n (*\ We\ must\ wrap\ a\ Hold[]\ around\ the\ Part[new, _]\ to\ \ \n
        \t\t\tprevent\ that\ the\ part\ of\ a\ symbol\ is\ serached\ *) \n\t\t
    \), 
    \(dirkMakeVars[y_List, new_Symbol] := \n\t
      Module[{x, i}, \n\t\ \ 
        Thread[y -> Table[Hold[new[\([x]\)]]\  /. \ x -> i, {i, Length[y]}]]\n
        \t\t]\n\), 
    \(DIRKNDSolve::noexpl = 
      "\<No explicit solution found for equations `1`.\>"\n\n\t\), 
    \(dirkMakeFun[eqn : {_Equal .. }, y_List, t_Symbol, compile_:  True] := \n
      \tModule[{sol, f, jac, rules, newsym, fj}, \n\t\t\ \ 
        sol = \ Solve[eqn, \(D[#, t]\ &\)\ /@\ y]; \n\t\t\ 
        If[sol == {}, \n\t\t\t\ \ Message[DIRKNDSolve::noexpl, eqn]; \n
          \t\t\t\ \ Return[$Failed]; \n\t\t\t]; \n\t\t\ \ 
        f = D[y, t]\  /. \ sol; \  (*\ explicit\ solution\ *) \n\t\t\ 
        jac = \(Outer[D[#1, #2]\ &, #, y]\ &\)\ /@\ f; \n\t\t
        newsym = Unique[]; \n\t\trules = \ dirkMakeVars[y, newsym]; \n\t\t
        fj = Transpose[{f, jac}] /. \ \ rules; \n\t\t
        If[compile, \n
          \t\t\t (*\ 
            at\ first\ we\ add\ the\ function\ arguments\ for\ compile\n
              \t\t\t\t\t\twith\ an\ evaluated\ newsym, \ 
            than\ Hold[]\ is\ wrapped\n\t\t\t\t\t\tand\ the\ Hold[part[_]]\ 
              are\ removed\ with\ the\ last\n\t\t\t\t\t\tReplace[]\ *) \n\t\t
          fj = Map[Hold, 
                Map[{{{t, _Real}, {newsym, _Real, 1}}, #}\ &\ , fj, {2}]\ , {
                  2}] /. \ Hold[a_Part] :> \ a; \n
          \t\t\t (*\ 
            Now\ we\ can\ start\ with\ compile . \ To\ prevent\ a\ early\n
              \t\t\t\t\t\tevaluation\ of\ the\ Part[]\ function\ in\ the\ 
              Apply[]\ call\ an\ Unevaluated[]\ is\ needed\ *) \n\t\t\t
          fj\  /. \ Hold[l_]\  :> \ Apply[Compile, Unevaluated[l]]\n
          \t\t\t (*\ Else\ *) , \n\t\t\t
          ReleaseHold[Map[Function[Evaluate[{t, newsym}], #]\ \ &, fj, {2}]]\n
          \t\t\t]\n\t]\)}], "Input"],

Cell[BoxData[
    \("No explicit solution found for equations `1`."\)], "Output"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(compile\)\" is similar \
to existing symbol \"\!\(Compile\)\"."\)], "Message"]
}, Open  ]],

Cell[BoxData[
    \(\(DIRKMakeInterpolation[tsym_Symbol, l : {{_, _List} .. }] := \n\t\ \ 
      Module[{t, y}, \n\t\ \ \ \ {t, y} = \ Transpose[l]; \n\t\t\ \ 
        \(\(Interpolation[Transpose[{t, #}]]\)[tsym]\ &\)\ /@\ Transpose[y]\n
        \ \ ]\t\t\)\)], "Input"],

Cell[CellGroupData[{

Cell[BoxData[{
    \(\nOptions[DIRKNDSolve] = {MaxSteps -> 4000, MaxIterations -> 20, 
        ImplicitError -> Automatic, Compiled -> True, LocalError -> 0.1*^-5, 
        \n\t\ \ Method -> DIRKSerial, DIRKSlave -> Null}; \n\n
    \n$DIRKMethods = {DIRKSerial, DIRKParallel}; \n\n
    DIRKNDSolve::noninit = 
      "\<Initial values `3` are not numbers at `1`==`2`.\>"\), 
    \(DIRKNDSolve::nonrhs = 
      "\<Right hand side of `1` does not evaluate to numbers at `2`==`3`.\>"\ 
    \), 
    \(DIRKNDSolve::ivmeth = 
      "\<Invalid solution method `1` given. Method must be one of `2`.\>"\), 
    \(DIRKNDSolve::invp2 = 
      "\<DIRKSlave must be a LinkObject[] for parallel evaluation instead of \
`1`. Proceed with serial algorithm.\>"\n\), 
    \(DIRKNDSolve[deqn : {_Equal .. }, 
        y_List, {t_Symbol, t0_?NumericQ, t1_?NumericQ}, opts___] := \n\t
      Module[{compile, maxit, maxsteps, y0, fj, fun, jac, errPhi, locError, 
          hinit, ndsdata, meth, p2slave}, \n
        \t\t\ \ {compile, maxit, maxsteps, errPhi, locError} = 
          \({Compiled, MaxIterations, MaxSteps, ImplicitError, LocalError} /. 
              \ {opts}\) /. \ Options[DIRKNDSolve]; \n
        \t\t\ \ {meth, p2slave} = 
          \({Method, DIRKSlave}\  /. \ {opts}\)\  /. \ Options[DIRKNDSolve]; 
        \n\t\t\tIf[\(! MemberQ[$DIRKMethods, meth]\), \n\t\t\t\t\ \ 
          Message[DIRKNDSolve::ivmeth, meth, $DIRKMethods]; \n\t\t\t\t\ \ 
          Return[$Failed]; \n\t\t\t\t]; \n\t\t\ 
        If[Automatic === errPhi, \n\t\t\t\ \ \(errPhi = locError/10. ; \)\n
          \t\t\t]; \n\t\t\ \ y0 = y\  /. \ t -> \ t0; \n\t\t\ \ 
        y0 = N[y0 /. Solve[deqn, y0]]; \n\t\t\ 
        If[And\ @@\((\(\(! VectorQ[#, NumericQ]\)\ &\)/@\ y0)\), \n\t\t\t\ \ 
          Message[DIRKNDSolve::noninit, t, t0, y0]; \n\t\t\t\ \ 
          Return[$Failed]; \n\t\t\t]; \n\t\t\ 
        fj = dirkMakeFun[deqn, y, t, compile]; \n\t\t\ 
        If[\(! VectorQ[
              Flatten[Function[z, \ Map[#[t0, z]\ &, fj, {2}]]\ /@\ y0], 
              NumericQ]\), \n\t\t\t\ \ 
          Message[DIRKNDSolve::nonrhs, deqn, t, t0]; \n\t\t\t\ \ 
          Return[$Failed]; \n\t\t\t]; \n\t\t{fun, jac} = fj[\([1]\)]; \n
        \t\t\ $RightHandSide = fun; \  (*\ Assign\ the\ globals\ *) \n
        \t\t\ \ $Jacobian = jac; \n\t\t\t
        If[ParallelDIRKAlgorithmQ[meth, p2slave], \n\t\t\t\ \ 
          ExportEnvironment[{newtonSolve, DIRKGetVector, 
              DIRKParallelOnP2, $RightHandSide, $Jacobian, $DIRKLinkP2}]; \n
          \t\t\t\ \ While[LinkReadyQ[p2slave], LinkRead[p2slave]]; \n
          \t\t\t\ \ $DIRKLinkP2 = p2slave, \n\t\t\t (*\ Else\ *) \n\t\t\t\ \ 
          If[meth === DIRKParallel\  && \ Head[p2slave] =!= LinkObject, \n
            \t\t\t\t\ \ $DIRKLinkP2 = Null; \n\t\t\t\ \ \ \ 
            Message[DIRKNDSolve::invp2, p2slave]; \n\t\t\t\t\ \ 
            meth = DIRKSerial; \n\t\t\t\t]\n\t\t\t\ ]; \n\t\t
        y0 = y0[\([1]\)]; \n\t\t\ hinit = N[\((t1 - t0)\)/maxsteps]; \n\t\t
        ndsdata = 
          DIRKIntegrate[t, t0, t1, y0, 0.01, errPhi, locError, maxit, 
            maxsteps, meth]; \n\t\t\ $DIRKLinkP2 = Null; \n\t\t\ 
        Thread[y -> DIRKMakeInterpolation[t, ndsdata]]\n\t\t]\)}], "Input"],

Cell[BoxData[
    \("Initial values `3` are not numbers at `1`==`2`."\)], "Output"],

Cell[BoxData[
    \("Right hand side of `1` does not evaluate to numbers at `2`==`3`."\)], 
  "Output"],

Cell[BoxData[
    \("Invalid solution method `1` given. Method must be one of `2`."\)], 
  "Output"],

Cell[BoxData[
    \("DIRKSlave must be a LinkObject[] for parallel evaluation instead of \
`1`. Proceed with serial algorithm."\)], "Output"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(deqn\)\" is similar to \
existing symbol \"\!\(eqn\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(maxsteps\)\" is similar \
to existing symbol \"\!\(maxSteps\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(hinit\)\" is similar to \
existing symbol \"\!\(hInit\)\"."\)], "Message"],

Cell[BoxData[
    \(General::"stop" \( : \ \) 
      "Further output of \!\(General :: \"spell1\"\) will be suppressed \
during this calculation."\)], "Message"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(Timing[
      dirksolp = 
        DIRKNDSolve[{\(y[1]'\)[t] == \(y[2]\)[t], 
            \(y[2]'\)[t] == \(-\(y[1]\)[t]\), \(y[1]\)[0] == 0, 
            \(y[2]\)[0] == 1}, {\(y[1]\)[t], \(y[2]\)[t]}, {t, 0, 8  \[Pi]}, 
          MaxSteps -> 1000, Method -> DIRKParallel, DIRKSlave -> p2link, 
          Compiled -> False]]\)], "Input"],

Cell[BoxData[
    RowBox[{"{", 
      RowBox[{\(14.2799999999999975`\ Second\), ",", 
        RowBox[{"{", 
          RowBox[{
            RowBox[{\(\(y[1]\)[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 25.1327412287183449`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}], ",", 
            RowBox[{\(\(y[2]\)[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 25.1327412287183449`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}]}], "}"}]}], "}"}]], 
  "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(Timing[
      dirksols = 
        DIRKNDSolve[{\(y[1]'\)[t] == \(y[2]\)[t], 
            \(y[2]'\)[t] == \(-\(y[1]\)[t]\), \(y[1]\)[0] == 0, 
            \(y[2]\)[0] == 1}, {\(y[1]\)[t], \(y[2]\)[t]}, {t, 0, 8  \[Pi]}, 
          MaxSteps -> 1000, Compiled -> False]]\)], "Input"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(dirksols\)\" is similar \
to existing symbol \"\!\(dirksolp\)\"."\)], "Message"],

Cell[BoxData[
    RowBox[{"{", 
      RowBox[{\(19.3699999999999974`\ Second\), ",", 
        RowBox[{"{", 
          RowBox[{
            RowBox[{\(\(y[1]\)[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 25.1327412287183449`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}], ",", 
            RowBox[{\(\(y[2]\)[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 25.1327412287183449`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}]}], "}"}]}], "}"}]], 
  "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(Plot[Evaluate[{\(y[1]\)[t], \(y[2]\)[t]}\  /. \ dirksolp], 
      \ {t, 0, 4  \[Pi]}, PlotStyle -> {RGBColor[0, 0, 0], RGBColor[1, 0, 0]}]
      \)], "Input"],

Cell[BoxData[
    TagBox[\(\[SkeletonIndicator]  Graphics  \[SkeletonIndicator]\),
      False,
      Editable->False]], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(Plot[Evaluate[{\(y[1]\)[t], \(y[2]\)[t]}\  /. \ dirksols], 
      \ {t, 0, 4  \[Pi]}, PlotStyle -> {RGBColor[0, 0, 0], RGBColor[1, 0, 0]}]
      \)], "Input"],

Cell[BoxData[
    TagBox[\(\[SkeletonIndicator]  Graphics  \[SkeletonIndicator]\),
      False,
      Editable->False]], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(stiffdeqn = {\(y1'\)[t] == \(-\((0.013 - 1000. *y3[t])\)\)*y1[t], \n\ \ 
        \(y2'\)[t] == \(-2500. \)*y2[t]*y3[t], \n\ 
        \(y3'\)[t] == 
          \(-0.013\)*y1[t] - \((1000. *y1[t] + 2500.  y2[t])\)*y3[t]}\)], 
  "Input"],

Cell[BoxData[
    RowBox[{"{", 
      RowBox[{
        RowBox[{
          RowBox[{
            SuperscriptBox["y1", "\[Prime]",
              MultilineFunction->None], "[", "t", "]"}], "==", 
          \(y1[t]\ \((\(-0.0130000000000000004`\) + 1000.`\ y3[t])\)\)}], 
        ",", 
        RowBox[{
          RowBox[{
            SuperscriptBox["y2", "\[Prime]",
              MultilineFunction->None], "[", "t", "]"}], "==", 
          RowBox[{
            RowBox[{"-", 
              StyleBox["2500.`",
                StyleBoxAutoDelete->True,
                PrintPrecision->4]}], " ", \(y2[t]\), " ", \(y3[t]\)}]}], 
        ",", 
        RowBox[{
          RowBox[{
            SuperscriptBox["y3", "\[Prime]",
              MultilineFunction->None], "[", "t", "]"}], "==", 
          RowBox[{
            RowBox[{
              RowBox[{"-", 
                StyleBox["0.0130000000000000004`",
                  StyleBoxAutoDelete->True,
                  PrintPrecision->2]}], " ", \(y1[t]\)}], "-", 
            RowBox[{
              RowBox[{"(", 
                RowBox[{
                  RowBox[{
                    StyleBox["1000.`",
                      StyleBoxAutoDelete->True,
                      PrintPrecision->4], " ", \(y1[t]\)}], "+", 
                  RowBox[{
                    StyleBox["2500.`",
                      StyleBoxAutoDelete->True,
                      PrintPrecision->4], " ", \(y2[t]\)}]}], ")"}], " ", 
              \(y3[t]\)}]}]}]}], "}"}]], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(initcond = {y1[0] == 1, y2[0] == 1, y3[0] == 0}\)], "Input"],

Cell[BoxData[
    \({y1[0] == 1, y2[0] == 1, y3[0] == 0}\)], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(Timing[
      dirksolp = 
        DIRKNDSolve[
          Join[stiffdeqn, initcond], {y1[t], y2[t], y3[t]}, {t, 0, 51}, 
          Method -> DIRKParallel, DIRKSlave -> p2link, Compiled -> False]]
      \)], "Input"],

Cell[BoxData[
    RowBox[{"{", 
      RowBox[{\(0.959999999999999964`\ Second\), ",", 
        RowBox[{"{", 
          RowBox[{
            RowBox[{\(y1[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 50.9999999999999964`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}], ",", 
            RowBox[{\(y2[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 50.9999999999999964`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}], ",", 
            RowBox[{\(y3[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 50.9999999999999964`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}]}], "}"}]}], "}"}]], 
  "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(Timing[
      dirksols = 
        DIRKNDSolve[
          Join[stiffdeqn, initcond], {y1[t], y2[t], y3[t]}, {t, 0, 51}, 
          Compiled -> False]]\)], "Input"],

Cell[BoxData[
    \(General::"spell1" \( : \ \) 
      "Possible spelling error: new symbol name \"\!\(dirksols\)\" is similar \
to existing symbol \"\!\(dirksolp\)\"."\)], "Message"],

Cell[BoxData[
    RowBox[{"{", 
      RowBox[{\(1.41999999999999992`\ Second\), ",", 
        RowBox[{"{", 
          RowBox[{
            RowBox[{\(y1[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 50.9999999999999964`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}], ",", 
            RowBox[{\(y2[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 50.9999999999999964`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}], ",", 
            RowBox[{\(y3[t]\), "\[Rule]", 
              RowBox[{
                
                TagBox[\(InterpolatingFunction[{{0, 50.9999999999999964`}}, 
                    "<>"]\),
                  False,
                  Editable->False], "[", "t", "]"}]}]}], "}"}]}], "}"}]], 
  "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(Plot[Evaluate[{y1[t], y2[t], 100000*y3[t]}\  /. \ dirksolp], 
      \ {t, 0, 51}, 
      PlotStyle -> {RGBColor[0, 0, 0], RGBColor[1, 0, 0], RGBColor[0, 0, 1]}]
      \)], "Input"],

Cell[BoxData[
    TagBox[\(\[SkeletonIndicator]  Graphics  \[SkeletonIndicator]\),
      False,
      Editable->False]], "Output"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
    \(Plot[Evaluate[{y1[t], y2[t], 100000*y3[t]}\  /. \ dirksols], 
      \ {t, 0, 51}, 
      PlotStyle -> {RGBColor[0, 0, 0], RGBColor[1, 0, 0], RGBColor[0, 0, 1]}]
      \)], "Input"],

Cell[BoxData[
    TagBox[\(\[SkeletonIndicator]  Graphics  \[SkeletonIndicator]\),
      False,
      Editable->False]], "Output"]
}, Open  ]],

Cell[BoxData[
    \(MakeDEqn[n_Integer] := {
        \(y[1]'\)[t] == \(y[1]\)[t]*\((\(y[2]\)[t] - \(y[n]\)[t])\), \n
        \t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ \ 
        Sequence\ @@\ 
          Table[\(y[i]'\)[t] == 
              \(y[i]\)[t]*\((\(y[i + 1]\)[t] - \(y[i - 1]\)[t])\), {i, 2, 
              n - 1}], \n
        \t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \ 
        \(y[n]'\)[t] == \(y[n]\)[t]*\((\(y[1]\)[t] - \(y[n - 1]\)[t])\), \n
        \t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ \ \(y[1]\)[0] == 1, \n
        \t\t\t\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
\ \ \ \ \ \ \ \ Sequence\ @@\ Table[\(y[i]\)[0] == 1/8, {i, 2, n}]}\)], 
  "Input"],

Cell[BoxData[
    \(\(dirksols = 
      DIRKNDSolve[MakeDEqn[32], 
        Table[\(y[i]\)[t], {i, 1, 32}], {t, 0, 2  \[Pi]}, Compiled -> True, 
        Method -> DIRKParallel, DIRKSlave -> p2link]; \)\)], "Input"],

Cell[BoxData[
    \(\(data = 
      Table[Table[\(y[i]\)[t], {i, 1, 32}] /. \ dirksols, {t, 0, 2  \[Pi], 
          \[Pi]/20}]; \)\)], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
    \(ListPlot3D[data, MeshRange -> {{1, 32}, {0, 2  \[Pi]}}, Mesh -> False, 
      AxesLabel -> {HoldForm[n], HoldForm[t], HoldForm[u\_i[t]]}, 
      FormatType -> TraditionalForm, 
      TextStyle -> {FontFamily -> "\<Times\>"}, PlotRange -> All]\)], "Input"],

Cell[BoxData[
    TagBox[\(\[SkeletonIndicator]  SurfaceGraphics  \[SkeletonIndicator]\),
      False,
      Editable->False]], "Output"]
}, Open  ]],

Cell[BoxData[
    \(CheckTiming[n_Integer, \ opts___]\  := \n\t\ \ 
      Module[{tp, \ ts, \ yps, \ t1, \ t2}, \n\t\t\ \ \ 
        yps\  = \ Table[\(y[i]\)[t], \ {i, \ 1, \ n}]; \n\t\t\ \ \ 
        t1\  = \ AbsoluteTime[]; \n\ \ \ \ \ \ \ \ 
        ts\  = \ First[
            Timing[DIRKNDSolve[MakeDEqn[n], \ yps, \ {t, \ 0, \ 2  \[Pi]}, \ 
                opts]]]; \n\ \ \ \ \ \ \ \ t2\  = \ AbsoluteTime[]; \n
        \ \ \ \ \ \ \ \ ts\  = \ {ts, \ t2\  - \ t1}; \n\ \ \ \ \ \ \ \ 
        t1\  = \ AbsoluteTime[]; \ \ \n\t\t\ \ \ 
        tp\  = \ First[
            Timing[DIRKNDSolve[MakeDEqn[n], \ yps, \ {t, \ 0, \ 2  \[Pi]}, \n
                \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
                Method\  -> \ DIRKParallel, \ DIRKSlave\  -> \ p2link, \ 
                opts]]]; \n\ \ \ \ \ \ \ \ t2\  = \ AbsoluteTime[]; \n
        \ \ \ \ \ \ \ \ tp\  = \ {tp, \ t2\  - \ t1}; \n\t\t\ \ 
        Print["\<n -> \>", \ n, \ "\< serialTime -> \>", \ ts, \ 
          "\< parallelTime -> \>", \ tp]; \n
        \t\t\ {n, \ ts, \ tp}\  /. \ Second\  -> \ 1\n\t\t]\)], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
    \(CheckTiming\ /@\ {4, 8, 16, 32}\)], "Input"],

Cell[BoxData[
    InterpretationBox[
      \("n -> "\[InvisibleSpace]4
        \[InvisibleSpace]" serialTime -> "\[InvisibleSpace]{
          4.45000000000004547`\ Second, 5.`6.4185}
          \[InvisibleSpace]" parallelTime -> "\[InvisibleSpace]{
          3.17000000000007275`\ Second, 5.`6.4185}\),
      SequenceForm[ "n -> ", 4, " serialTime -> ", {
        Times[ 4.4500000000000455, Second], 5.}, " parallelTime -> ", {
        Times[ 3.1700000000000728, Second], 5.}],
      Editable->False]], "Print"],

Cell[BoxData[
    InterpretationBox[
      \("n -> "\[InvisibleSpace]8
        \[InvisibleSpace]" serialTime -> "\[InvisibleSpace]{
          6.76999999999998181`\ Second, 7.`6.5647}
          \[InvisibleSpace]" parallelTime -> "\[InvisibleSpace]{
          4.60999999999989995`\ Second, 8.`6.6227}\),
      SequenceForm[ "n -> ", 8, " serialTime -> ", {
        Times[ 6.7699999999999818, Second], 7.}, " parallelTime -> ", {
        Times[ 4.6099999999999, Second], 8.}],
      Editable->False]], "Print"],

Cell[BoxData[
    InterpretationBox[
      \("n -> "\[InvisibleSpace]16
        \[InvisibleSpace]" serialTime -> "\[InvisibleSpace]{
          17.9200000000000736`\ Second, 19.`6.9983}
          \[InvisibleSpace]" parallelTime -> "\[InvisibleSpace]{
          12.6600000000000822`\ Second, 19.`6.9983}\),
      SequenceForm[ "n -> ", 16, " serialTime -> ", {
        Times[ 17.920000000000073, Second], 19.}, " parallelTime -> ", {
        Times[ 12.660000000000082, Second], 19.}],
      Editable->False]], "Print"],

Cell[BoxData[
    InterpretationBox[
      \("n -> "\[InvisibleSpace]32
        \[InvisibleSpace]" serialTime -> "\[InvisibleSpace]{
          72.4399999999998289`\ Second, 76.`7.6004}
          \[InvisibleSpace]" parallelTime -> "\[InvisibleSpace]{
          54.6100000000001273`\ Second, 74.`7.5888}\),
      SequenceForm[ "n -> ", 32, " serialTime -> ", {
        Times[ 72.439999999999827, Second], 76.}, " parallelTime -> ", {
        Times[ 54.610000000000127, Second], 74.}],
      Editable->False]], "Print"],

Cell[BoxData[
    \({{4, {4.45000000000004547`, 5.`6.4185}, {3.17000000000007275`, 
          5.`6.4185}}, {
        8, {6.76999999999998181`, 7.`6.5647}, {4.60999999999989995`, 
          8.`6.6227}}, {
        16, {17.9200000000000736`, 19.`6.9983}, {12.6600000000000822`, 
          19.`6.9983}}, {
        32, {72.4399999999998289`, 76.`7.6004}, {54.6100000000001273`, 
          74.`7.5888}}}\)], "Output"]
}, Open  ]],

Cell[BoxData[
    \(CloseSlave[p2link]\)], "Input"]
},
FrontEndVersion->"X 3.0",
ScreenRectangle->{{0, 1280}, {0, 1024}},
WindowSize->{905, 897},
WindowMargins->{{172, Automatic}, {8, Automatic}}
]


(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not using
Mathematica, you must remove the line containing CacheID at the top of 
the file.  The cache data will then be recreated when you save this file 
from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{}
*)

(*CellTagsIndex
CellTagsIndex->{}
*)

(*NotebookFileOutline
Notebook[{
Cell[1709, 49, 111, 3, 32, "Text"],
Cell[1823, 54, 151, 4, 24, "DisplayFormula"],
Cell[1977, 60, 175, 5, 32, "Text"],
Cell[2155, 67, 64, 1, 27, "Input"],

Cell[CellGroupData[{
Cell[2244, 72, 155, 3, 27, "Input"],
Cell[2402, 77, 135, 3, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[2574, 85, 92, 1, 27, "Input"],
Cell[2669, 88, 68, 1, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[2774, 94, 969, 17, 443, "Input"],
Cell[3746, 113, 92, 1, 27, "Output"],
Cell[3841, 116, 175, 3, 23, "Message"],
Cell[4019, 121, 173, 3, 23, "Message"]
}, Open  ]],
Cell[4207, 127, 522, 9, 171, "Input"],
Cell[4732, 138, 851, 14, 155, "Input"],

Cell[CellGroupData[{
Cell[5608, 156, 1608, 28, 363, "Input"],
Cell[7219, 186, 184, 3, 23, "Message"],
Cell[7406, 191, 186, 3, 23, "Message"],
Cell[7595, 196, 176, 3, 23, "Message"],
Cell[7774, 201, 161, 3, 23, "Message"]
}, Open  ]],
Cell[7950, 207, 3210, 53, 907, "Input"],

Cell[CellGroupData[{
Cell[11185, 264, 127, 3, 27, "Input"],
Cell[11315, 269, 97, 2, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[11449, 276, 1303, 21, 523, "Input"],
Cell[12755, 299, 177, 3, 23, "Message"],
Cell[12935, 304, 193, 3, 39, "Message"],
Cell[13131, 309, 183, 3, 23, "Message"],
Cell[13317, 314, 161, 3, 23, "Message"]
}, Open  ]],

Cell[CellGroupData[{
Cell[13515, 322, 2026, 36, 635, "Input"],
Cell[15544, 360, 81, 1, 27, "Output"],
Cell[15628, 363, 181, 3, 23, "Message"]
}, Open  ]],
Cell[15824, 369, 270, 4, 91, "Input"],

Cell[CellGroupData[{
Cell[16119, 377, 3230, 54, 923, "Input"],
Cell[19352, 433, 83, 1, 27, "Output"],
Cell[19438, 436, 103, 2, 27, "Output"],
Cell[19544, 440, 100, 2, 27, "Output"],
Cell[19647, 444, 141, 2, 27, "Output"],
Cell[19791, 448, 174, 3, 23, "Message"],
Cell[19968, 453, 183, 3, 23, "Message"],
Cell[20154, 458, 177, 3, 23, "Message"],
Cell[20334, 463, 161, 3, 23, "Message"]
}, Open  ]],

Cell[CellGroupData[{
Cell[20532, 471, 356, 7, 43, "Input"],
Cell[20891, 480, 714, 19, 43, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[21642, 504, 300, 6, 43, "Input"],
Cell[21945, 512, 183, 3, 23, "Message"],
Cell[22131, 517, 714, 19, 43, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[22882, 541, 178, 3, 27, "Input"],
Cell[23063, 546, 130, 3, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[23230, 554, 178, 3, 27, "Input"],
Cell[23411, 559, 130, 3, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[23578, 567, 253, 5, 59, "Input"],
Cell[23834, 574, 1500, 40, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[25371, 619, 80, 1, 27, "Input"],
Cell[25454, 622, 70, 1, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[25561, 628, 234, 6, 43, "Input"],
Cell[25798, 636, 978, 26, 43, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[26813, 667, 182, 5, 27, "Input"],
Cell[26998, 674, 183, 3, 23, "Message"],
Cell[27184, 679, 977, 26, 43, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[28198, 710, 200, 4, 43, "Input"],
Cell[28401, 716, 130, 3, 27, "Output"]
}, Open  ]],

Cell[CellGroupData[{
Cell[28568, 724, 200, 4, 43, "Input"],
Cell[28771, 730, 130, 3, 27, "Output"]
}, Open  ]],
Cell[28916, 736, 836, 16, 91, "Input"],
Cell[29755, 754, 213, 4, 43, "Input"],
Cell[29971, 760, 143, 3, 27, "Input"],

Cell[CellGroupData[{
Cell[30139, 767, 275, 4, 43, "Input"],
Cell[30417, 773, 137, 3, 27, "Output"]
}, Open  ]],
Cell[30569, 779, 1115, 18, 251, "Input"],

Cell[CellGroupData[{
Cell[31709, 801, 64, 1, 27, "Input"],
Cell[31776, 804, 510, 10, 23, "Print"],
Cell[32289, 816, 507, 10, 23, "Print"],
Cell[32799, 828, 516, 10, 23, "Print"],
Cell[33318, 840, 516, 10, 23, "Print"],
Cell[33837, 852, 411, 8, 43, "Output"]
}, Open  ]],
Cell[34263, 863, 51, 1, 27, "Input"]
}
]
*)




(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)




  • Prev by Date: Re: RGBColor to Hue?
  • Next by Date: Re: convert .EPS to .GIF or .JPEG
  • Previous by thread: Parallel Processing Toolkit
  • Next by thread: Limits to RSolve