Chapter 3.13

Scientific Computing

"In this complex world, science, the scientific method, and the consequences of the scientific method are central to everything the human race is doing and to wherever we are going."

Robert A. Heinlein, The Pragmatics of Patriotism

Scientific computing, also known as Computational Science, is now considered a third mode of science in addition to the traditional two modes of observation/experimentation and theory, and is thus an essential basic skill for researchers of every scientific field. Typically, computational scientists favour R, Mathematica, MATLAB, Python's SciPy and PDL libraries, C, or Fortran to implement highly optimized numerical simulations; but Common Lisp has significant advantages over all these technologies for implementing robust, optimized, distributed algorithms for modelling scientific problems, running simulations, and further optimizing scenarios.

At the most basic level, computational science requires featureful and fast algebra and plotting libraries; but advanced use-cases and computationally expensive simulations require massive concurrency, and resource intensive floating-point calculations. Using LParallel, CL-GPU, GSLL, CL-PLPlot, and the optimization techniques you've already learned, you can beat the performance of other platforms and technologies, and take advantage of all of Common Lisp's other intrinsic features, such as interactive programming at the REPL, for rapid prototyping of solutions to many of the most important problems in computational science.

In this chapter we will review the Lisp syntax of the math necessary to model problems in computational science, translate a selection of problems in computational science from pseudo-code to Common Lisp, work heavily from the REPL to model systems interactively in real-time, graph and plot our results, and run exhaustive tests and benchmarks against other platforms as part of the optimization process, to prove to yourself and others that Common Lisp is the ideal platform for Scientific Computing.

Exercise 3.13.1

The Math of Scientific Computing



Exercise 3.13.2

GSLL



Exercise 3.13.3

Leveraging Massive Concurrency



Exercise 3.13.4

Floating-Point Calculations using CL-GPU



Exercise 3.13.5

Plotting Your Results



Exercise 3.13.6

Performance Testing and Optimization



Exercise 3.13.7

Proofing Results



Project 3.13.8

A Scientific Computing Application



results matching ""

    No results matching ""