Abstract Calculus Pattern
Table of Contents
1. Overview
The basic idea is to write functions which encapsulate the conceptual mathematics, using the strategy pattern, so different numerical schemes can be used to solve the problem. For example, something like
(defparameter *equation* '(= (d u time) (* -k (laplacian u)))) (defparameter *system* '((:dependent-var (u)) (:independent-var (time x y z)) (:params ((k 1.0d0))))) (solve finite-difference-solver *equation* *system* :initial-cond ...)
2. References
- Damian Rouson, Jim Xia, Xiaofeng Xu, Scientific Software Design: The Object-Oriented Way. Cambridge University Press, 2011; see esp. ch.6