This is a toy "DA" package which treats third order
polynomials in two variables. Download by clicking here
It purpose is to illustrate the fundamentals of forward automatic differentiation which is what Berz DA-package does. It is also written to explain how operator overloading works. The actual original package of Berz is far more complex and
sophisticated. In addition its overloading requires certain technical tricks
to deal with the fact that Berz's original Fortran77 deals with integer
pointers to a big array where he stores all his polynomials.
(FPP overloads the LBL version of Berz's package, and
not the thing in COSY-INFINITY
Berz's original paper in Particle Accelerator remains a good description
of his DA-package. Later papers contain too many abstractions with little or
no examples. However I can provide example programs to illustrate
Berz's abstractions ("tower of ideals, nilpotency,
λ
depth, contractions, Levi-Cevita
fields, etc...") Many of these concepts are abstractions of
trivialities and serve little purpose in optics even though they may be of
general mathematical interest. Therefore do not get
distracted by this verbiage. We are doing simple algebra on polynomials and
representing functions by polynomials on the computer. |
Overloading standard procedures
INTERFACE EXPUser defined operator
INTERFACE OPERATOR (.MONO.)