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

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. Program summary

[1]  Jonathan Thornburg,et al.  A Fast Apparent‐Horizon Finder for 3‐Dimensional Cartesian Grids in Numerical Relativity , 2003, gr-qc/0306056.

[2]  John Shalf,et al.  Cactus Tools for Grid Applications , 2001, Cluster Computing.

[3]  Larry Smarr,et al.  Sources of gravitational radiation , 1979 .

[4]  Leonard Parker,et al.  MathTensor - a system for doing Tensor analysis by computer , 1994 .

[5]  Erik Schnetter,et al.  Gauge fixing for the simulation of black hole spacetimes , 2003 .

[6]  R. Penrose,et al.  Spinors and Space‐Time, Volume I: Two‐Spinor Calculus and Relativistic Fields , 1986 .

[7]  D. Raine General relativity , 1980, Nature.

[8]  H. Kreiss,et al.  Time-Dependent Problems and Difference Methods , 1996 .

[9]  Guido Wirtz,et al.  Automatic transformation of high-level object-oriented specifications into parallel programs , 1989, Parallel Comput..

[10]  Gabrielle Allen,et al.  Towards standard testbeds for numerical relativity , 2003, gr-qc/0305023.

[11]  P. Diener A new general purpose event horizon finder for 3D numerical spacetimes , 2003, gr-qc/0305039.

[12]  Janet Bauder Thornburg A PDE compiler for full-metric numerical relativity. , 1989 .

[13]  Lee Samuel Finn,et al.  Frontiers in numerical relativity , 2011 .

[14]  G. O. Cook ALPAL, A PROGRAM TO GENERATE PHYSICS SIMULATION CODES FROM NATURAL DESCRIPTIONS , 1990 .

[15]  E. Mediavilla,et al.  Proceedings of the Spanish Relativity Meeting, Relativistic Astrophysics and Cosmology, La Laguna, Tenerife, Spain, September 4-7, 1995 , 1997 .

[16]  John Shalf,et al.  The Cactus Framework and Toolkit: Design and Applications , 2002, VECPAR.

[17]  J. York,et al.  Kinematics and dynamics of general relativity , 1979 .

[18]  M. Pasquali,et al.  Free surface flows of polymer solutions with models based on the conformation tensor , 2002 .

[19]  Stewart A. Brown,et al.  How symbolic computation boosts productivity in the simulation of partial differential equations , 1991 .

[20]  R. Penrose,et al.  Two-spinor calculus and relativistic fields , 1984 .