xx ADMCoupling

ADMCoupling

Ian Hawke, David Rideout

Date

Abstract

This thorn allows seamless coupling of evolution and analysis thorns to any thorns which contribute matter terms to the stress energy tensor .

1 Purpose

This thorn is completely trivial (there’s already more words in the documentation than in the code). The point is to allow clean coupling of matter thorns and spacetime evolution thorns. By making a spacetime thorn (such as BSSN) a friend of ADMCoupling it can know about the variables of the matter thorns (such as Whisky) as long as they are also friends of ADMCoupling, and then the appropriate stress energy tensor terms can be included through the CalcTmunu interface. This avoids explicit dependencies between the spacetime and matter evolution thorns. Note that we need to do the same for certain analysis thorns, such as

ADMConstraints.

2 CalcTmunu

2.1 Background

So what is this “CalcTmunu”, anyway? CalcTmunu is a general interface which allows any thorn to ‘declare’ that it contains matter variables, by adding terms to the components of the stress energy tensor. This is done using the Cactus include file mechanism, which allows thorns to contribute code to include files, which can then be included by any thorn which wishes to use them. For CalcTmunu there are two include

files1 1There used to be a third, CalcTmunuxrfr.inc, which was a Cactus 3 legacy having to do with the rfr scheduling mechanism. You may safely delete any reference to this file. ,

CalcTmunu.inc and CalcTmunuxtemps.inc.

In CalcTmunu.inc, one can place code of the form

Tttx=xTttx+x...
Ttxx=xTtxx+x...
Ttyx=xTtyx+x...
Ttzx=xTtzx+x...
Txxx=xTxxx+x...
Txyx=xTxyx+x...
Txzx=xTxzx+x...
Tyyx=xTyyx+x...
Tyzx=xTyzx+x...
Tzzx=xTzzx+x...

to add terms to the components . Each of these variables is of type CCTKxREAL. (If you omit the Ttt +, Ttx +, etc. from the right hand sides of these assignment statements then you will be assuming that your thorn is the only one which provides matter degrees of freedom, and excluding contributions from other matter thorns which may be activated.) This code will be executed for each point on the grid, whose indices will be stored in the integers i, j, and k. Currently it must be ‘fixed form’ Fortran code.

CalcTmunuxtemps.inc will be included in the variable declaration section for the block of code which contains the

#includex"CalcTmunu.inc"

One can put local temporary variable declarations needed for the code above into this file. The Ttt, Ttx, etc.xwill be declared within a macro from ADMMacros.

2.2 For matter thorns To make use of the CalcTmunu interface, simply place the lines

INCLUDESxHEADER:x<MyThorn_CalcTmunu_temps.inc>xinxCalcTmunu_temps.inc
INCLUDESxSOURCE:x<MyThorn_CalcTmunu.inc>xinxCalcTmunu.inc

in your thorn’s interface.ccl file, and declare your thorn to be friends with ADMCoupling. Then provide the

files <MyThornxCalcTmunuxtemps.inc> and <MyThornxCalcTmunu.inc> somewhere in your thorn’s source code.

We expect to add a sample matter thorn to CactusEinstein soon, which will illustrate the use of this.

2.3 For thorns which need the stress energy tensor

Spacetime evolution thorns and various analysis thorns (e.g. one which computes the constraints) may need to know the value of the stress-energy tensor. See thorn CactusEinstein/ADM for an example the former.

There the macro KSOURCES (see KSOURCESxdeclare.h and KSOURCESxguts.h) is called from the

various time integration source files DoubleLeap.F, IterativeCN.F, etc., which in turn include the CalcTmunuxtemps.inc and CalcTmunu.inc files. In this example, the temporary variables are provided by

including CactusEinstein/ADMMacros/src/macro/TRTxdeclare.h.

3 Parameters

4 Interfaces

General Implements: admcoupling

5 Schedule This section lists all the variables which are assigned storage by thorn EinsteinBase/ADMCoupling. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage NONE