This file is indexed.

/usr/share/axiom-20170501/src/algebra/D02CJFA.spad is in axiom-source 20170501-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
)abbrev domain D02CJFA d02cjfAnnaType
++ Author: Brian Dupee
++ Date Created: February 1995
++ Date Last Updated: January 1996
++ References:
++ Dupe95 Using Computer Algebra to Choose and Apply Numerical Routines
++ Dewa92 Using Computer Algebra to Select Numerical Algorithms
++ Description:
++ \axiomType{d02cjfAnnaType} is a domain of 
++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
++ for the NAG routine D02CJF, a ODE routine which uses an  
++ Adams-Moulton-Bashworth method to solve a system of differential 
++ equations.  The function \axiomFun{measure} measures the
++ usefulness of the routine D02CJF for the given problem.  The 
++ function \axiomFun{ODESolve} performs the integration by using 
++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.

d02cjfAnnaType() : SIG == CODE where

  -- Adams
  EDF  ==> Expression DoubleFloat
  LDF  ==> List DoubleFloat
  MDF  ==> Matrix DoubleFloat
  DF  ==> DoubleFloat
  F  ==> Float
  FI  ==> Fraction Integer
  EFI  ==> Expression Fraction Integer
  SOCDF  ==> Segment OrderedCompletion DoubleFloat
  VEDF  ==> Vector Expression DoubleFloat
  VEF  ==> Vector Expression Float
  EF  ==> Expression Float
  VDF  ==> Vector DoubleFloat
  VMF  ==> Vector MachineFloat
  MF  ==> MachineFloat
  ODEA  ==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
                      g:EDF,abserr:DF,relerr:DF)
  RSS  ==> Record(stiffnessFactor:F,stabilityFactor:F)
  INT  ==> Integer
  EF2  ==> ExpressionFunctions2

  SIG ==> OrdinaryDifferentialEquationsSolverCategory 

  CODE ==> Result add 

    import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage

    accuracyCF(ode:ODEA):F ==
      b := getButtonValue("d02cjf","accuracy")$AttributeButtons
      accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
      accuracyIntensityValue > 0.9999 => 0$F
      0.6*(cos(accuracyIntensityValue*(pi()$F)/2)$F)**0.755

    stiffnessCF(ode:ODEA):F ==
      b := getButtonValue("d02cjf","stiffness")$AttributeButtons
      ssf := stiffnessAndStabilityOfODEIF ode
      stiffnessIntensityValue := 
        combineFeatureCompatibility(b,ssf.stiffnessFactor)
      0.5*exp(-(1.1*stiffnessIntensityValue)**3)$F

    measure(R:RoutinesTable,args:ODEA) ==
      m := getMeasure(R,d02cjf :: Symbol)$RoutinesTable
      m := combineFeatureCompatibility(m,[accuracyCF(args), stiffnessCF(args)])
      [m,"Adams method"]

    ODESolve(ode:ODEA) ==
      i:LDF := ode.intvals
      if empty?(i) then
        i := [ode.xend]
      M := inc(# i)$INT
      if positive?((a := ode.abserr)*(r := ode.relerr))$DF then
        ire:String := "D"
      else 
        if positive?(a) then
          ire:String := "A"
        else 
          ire:String := "R"
      tol := max(a,r)$DF
      asp7:Union(fn:FileName,fp:Asp7(FCN)) := 
        [retract(e:VEF := vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
      asp8:Union(fn:FileName,fp:Asp8(OUTPUT)) := 
        [coerce(ldf2vmf(i)$ExpertSystemToolsPackage)$Asp8(OUTPUT)]
      asp9:Union(fn:FileName,fp:Asp9(G)) := 
        [retract(edf2ef(ode.g)$ExpertSystemToolsPackage)$Asp9(G)]
      d02cjf(ode.xend,M,# e,tol,ire,ode.xinit,matrix([ode.yinit])$MDF,
               -1,asp9,asp7,asp8)