Wolfram Library Archive

Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings

Kranc: a Mathematica package to generate numerical codes for tensorial evolution equations

S Husa
I Hinder
C Lechner
Journal / Anthology

Computer Physics Communications
Year: 2006
Volume: 174
Issue: 12
Page range: 983-1004

We present a suite of Mathematica-based computer-algebra packages, termed "Kranc", which comprise a toolbox to convert certain (tensorial) systems of partial differential evolution equations to parallelized C or Fortran code for solving initial boundary value problems. Kranc can be used as a "rapid prototyping" system for physicists or mathematicians handling very complicated systems of partial differential equations, but through integration into the Cactus computational toolkit we can also produce efficient parallelized production codes. Our work is motivated by the field of numerical relativity, where Kranc is used as a research tool by the authors. In this paper we describe the design and implementation of both the Mathematica packages and the resulting code, we discuss some example applications, and provide results on the performance of an example numerical code for the Einstein equations.

*Mathematics > Calculus and Analysis > Differential Equations
*Wolfram Technology > Programming > Packages and Contexts

evolution equations, Klein-Gordon equations, Maxwell equations, Einstein equations