This file is indexed.

/usr/share/axiom-20170501/src/algebra/D02BBFA.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
86
87
88
89
90
91
92
93
94
)abbrev domain D02BBFA d02bbfAnnaType
++ 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{d02bbfAnnaType} is a domain of 
++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
++ for the NAG routine D02BBF, a ODE routine which uses an  
++ Runge-Kutta method to solve a system of differential 
++ equations.  The function \axiomFun{measure} measures the
++ usefulness of the routine D02BBF for the given problem.  The 
++ function \axiomFun{ODESolve} performs the integration by using 
++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.

d02bbfAnnaType() : SIG == CODE where
  -- Runge Kutta

  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
    import AttributeButtons

    accuracyCF(ode:ODEA):F ==
      b := getButtonValue("d02bbf","accuracy")$AttributeButtons
      accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
      accuracyIntensityValue > 0.999 => 0$F
      0.8*exp(-((10*accuracyIntensityValue)**3)$F/266)$F

    stiffnessCF(stiffnessIntensityValue:F):F ==
      b := getButtonValue("d02bbf","stiffness")$AttributeButtons
      0.5*exp(-(2*combineFeatureCompatibility(b,stiffnessIntensityValue))**2)$F

    stabilityCF(stabilityIntensityValue:F):F ==
      b := getButtonValue("d02bbf","stability")$AttributeButtons
      0.5 * cos(combineFeatureCompatibility(b,stabilityIntensityValue))$F

    expenseOfEvaluationCF(ode:ODEA):F ==
      b := getButtonValue("d02bbf","expense")$AttributeButtons
      expenseOfEvaluationIntensityValue := 
        combineFeatureCompatibility(b,expenseOfEvaluationIF(ode))
      0.35+0.2*exp(-(2.0*expenseOfEvaluationIntensityValue)**3)$F
    
    measure(R:RoutinesTable,args:ODEA) ==
      m := getMeasure(R,d02bbf :: Symbol)$RoutinesTable
      ssf := stiffnessAndStabilityOfODEIF args
      m := combineFeatureCompatibility(m,[accuracyCF(args),
              stiffnessCF(ssf.stiffnessFactor),
                expenseOfEvaluationCF(args),
                  stabilityCF(ssf.stabilityFactor)])
      [m,"Runge-Kutta Merson method"]

    ODESolve(ode:ODEA) ==
      i:LDF := ode.intvals
      M := inc(# i)$INT
      irelab := 0$INT
      if positive?(a := ode.abserr) then 
        inc(irelab)$INT
      if positive?(r := ode.relerr) then
        inc(irelab)$INT
      if positive?(a+r) then
        tol:DF := a + r
      else
        tol := float(1,-4,10)$DF
      asp7:Union(fn:FileName,fp:Asp7(FCN)) :=
        [retract(vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
      asp8:Union(fn:FileName,fp:Asp8(OUTPUT)) := 
        [coerce(ldf2vmf(i)$ExpertSystemToolsPackage)$Asp8(OUTPUT)]
      d02bbf(ode.xend,M,# ode.fn,irelab,ode.xinit,matrix([ode.yinit])$MDF,
               tol,-1,asp7,asp8)