xx TwoPuncturesX

TwoPuncturesX

Marcus Ansorg <marcus.ansorg@aei.mpg.de> Erik Schnetter <schnetter@cct.lsu.edu>

May 12 2026

Abstract

TwoPuncturesX generates binary black hole initial data using the puncture method with the Bowen-York extrinsic curvature ansatz. It implements exactly the same spectral algorithm as the companion thorn TwoPunctures [3] but targets the CarpetX (AMReX-based) infrastructure: it inherits from ADMBaseX and CoordinatesX rather than from ADMBase and StaticConformal, and the setup computation is protected by an OpenMP critical section so that it executes correctly when called from within a threaded CarpetX loop. TwoPunctures (EinsteinInitialData/TwoPunctures) must be present in the same build because TwoPuncturesX reuses the solver source files from that thorn.

1 Introduction

TwoPuncturesX is the CarpetX port of TwoPunctures. It provides identical physics and parameters; the differences are entirely in the Cactus infrastructure layer:

ADMBaseX instead of ADMBase: metric and extrinsic curvature are stored as CCTKxREAL grid functions under the ADMBaseX interface (gxx, kxx, alp, etc.).

CoordinatesX for coordinates: the physical grid coordinates vcoordx, vcoordy, vcoordz are obtained from CoordinatesX rather than from the Carpet grid.

Thread safety: CarpetX may call a scheduled function concurrently from multiple OpenMP threads. The one-time spectral solve is guarded by a named OpenMP critical section so that it is performed exactly once regardless of how many threads enter the function simultaneously.

Physical metric storage: TwoPuncturesX always fills the physical (non-conformal) metric. The conformal factor and its derivatives that TwoPunctures optionally stores via StaticConformal are not available under CarpetX.

For full details of the underlying physics and algorithm, see the TwoPunctures documentation and [3].

2 Physical System

The physics is identical to TwoPunctures. The conformal decomposition

is used, where are the bare masses of the two punctures at , are distances from the respective punctures, and is a smooth correction solved spectrally. The Bowen-York extrinsic curvature [1] encodes linear momenta and spins.

The output metric is the physical metric (conformally flat), not the conformal metric.

3 Numerical Implementation

3.1 Shared Solver

TwoPuncturesX reuses the spectral solver from TwoPunctures by including the header TPxGuts.h directly into the scheduling function body. This header contains the full solve-and-interpolate logic. Because TwoPunctures must be present in the same build, the compiler sees both thorns’ object files and can share the Newton solver and spectral machinery.

3.2 Thread Safety

Under CarpetX, the scheduled function TwoPuncturesX may be invoked from within an OpenMP parallel region. The expensive spectral solve must run exactly once. This is guaranteed by a static boolean flag didxsetup and a named OpenMP critical section:

#pragmaxompxcritical(TwoPunctures_setup)
xxifx(!did_setup)x{
xxxx//x...xperformxspectralxsolvex...
xxxxdid_setupx=xtrue;
xx}

Using a named critical section avoids interference with the unnamed critical section inside Newton’s parallel reduction loop in Newton.cc.

3.3 Grid Fill

After the spectral solve the 3D grid is filled point-by-point using the same interpolation path as TwoPunctures

(gridxsetupxmethod = "Taylor expansion" or "evaluation"). The inner loop is parallelized with #pragma
omp parallel for.

3.4 Scalar Grid Functions

CarpetX resets grid scalars at the start of each scheduled call. TwoPuncturesX therefore saves the computed scalars (mp, mm, mpxadm, mmxadm, E, J1, J2, J3) into static variables during setup and restores them on every call so that they remain available to other thorns.

4 Using This Thorn 4.1 Requirements

EinsteinInitialData/TwoPunctures must be compiled into the same executable. TwoPuncturesX includes header files from that thorn and will fail to compile otherwise.

The CarpetX infrastructure thorns (CarpetX, ADMBaseX, CoordinatesX) must be present.

4.2 Basic Usage

Add both EinsteinInitialData/TwoPunctures and EinsteinInitialData/TwoPuncturesX to your thorn list,

then set:

ADMBaseX::initial_dataxx=x"twopunctures"
ADMBaseX::initial_lapsex=x"twopunctures-antisymmetric"
TwoPuncturesX::par_bxxxxxxx=x3.0xxx#xhalfxseparationx(M)
TwoPuncturesX::par_m_plusxx=x0.5
TwoPuncturesX::par_m_minusx=x0.5
TwoPuncturesX::par_P_plus[1]xx=xx0.084
TwoPuncturesX::par_P_minus[1]x=x-0.084
TwoPuncturesX::npoints_Axxx=x30
TwoPuncturesX::npoints_Bxxx=x30
TwoPuncturesX::npoints_phix=x16

The parameter names and semantics are the same as in TwoPunctures (see that thorn’s documentation for a full description of each parameter).

4.3 Lapse Options

The same lapse choices are available as in TwoPunctures: twopunctures-antisymmetric, twopunctures-averaged, psiˆ n, W, and brownsville. See the TwoPunctures documentation for details. Note that the conformal-factor-based lapse options (psiˆ n, brownsville) compute locally during the grid fill; no separate conformal storage thorn is required.

4.4 ADM Mass Iteration

Setting givexbarexmass = no enables iterative determination of bare masses to match target ADM masses targetxMxplus and targetxMxminus, exactly as in TwoPunctures.

4.5 Interaction With Other Thorns

TwoPuncturesX writes to the ADMBaseX grid functions gxx, gyy, gzz, gxy, gxz, gyz, kxx, kyy, kzz, kxy, kxz, kyz, and alp. It also populates the scalar grid functions mp, mm, mpxadm, mmxadm, E, J1, J2, and

J3.

Matter sources can be supplied via the same optional function interfaces SetxRhoxADM and

SetxInitialxGuessxforxu as in TwoPunctures; however, rescalexsources = yes with usexsources = yes is

not yet supported and will trigger a run-time error.

5 History

TwoPuncturesX was derived from TwoPunctures to support the CarpetX AMR framework. The underlying spectral algorithm is unchanged from Ansorg, Brxgmann & Tichy (2004) [3].

References

[1]xxxJ.xM.xBowen and J.xW.xYork, Time-asymmetric initial data for black holes and black-hole collisions, Phys.xRev.xD 21, 2047 (1980).

[2]xxxS.xBrandt and B.xBrxgmann, A simple construction of initial data for multiple black holes, Phys.xRev.xLett.x78, 3606 (1997), gr-qc/9703066.

[3]xxxM.xAnsorg, B.xBrxgmann, and W.xTichy, Single-domain spectral method for black hole puncture data, Phys.xRev.xD 70, 064011 (2004), gr-qc/0404056.

[4]xxxM.xCampanelli, C.xO.xLousto, and Y.xZlochower, Spinning-black-hole binary evolutions, recoil velocities, and spin-orbit effects, Phys.xRev.xD 74, 041501 (2006), gr-qc/0604012.

[5]xxxD.xAlic et al., Constraint-preserving boundary treatment for a harmonic formulation of the Einstein equations, Phys.xRev.xD 110, 064045 (2024), arXiv:2404.01137.

6 Parameters

11 admxtol 10 Scope: restricted01 REAL

11 Description: Tolerance of ADM masses when givexbarexmass=no

11 Range 10 01 Default: 1.0e-10
11 (0:*)  10

11

11 centerxoffset  10 Scope: restricted01  REAL

11 Description: offset b=0 to position (x,y,z)

11 Range 10 01 Default: 0.0
11 (*:*)  10

11

11 doxinitialxdebugxoutput  10 Scope: restricted01  BOOLEAN

11 Description: Output debug information about initial guess

11                           10                01  Default: no

11

11 doxresiduumxdebugxoutput 10 Scope: restricted01  BOOLEAN

11 Description: Output debug information about the residuum

11                           10                01  Default: no

11

11 givexbarexmass  10 Scope: restricted01  BOOLEAN

11 Description: User provides bare masses rather than target ADM masses

11                           10                01  Default: yes

11

11 gridxsetupxmethod  10 Scope: restricted01  KEYWORD

11 Description: How to fill the 3D grid from the spectral grid

11 Range 10 01 Default: Taylor expansion
11 Taylor expansion  10 use a Taylor expansion about the nearest collocation point (fast, but might be inaccurate)
11 evaluation  10 evaluate using all spectral coefficients (slow)

11

11 initialxlapsexpsixexponent 10 Scope: restricted01  REAL

11 Description: Exponent n for psiˆ- n initial lapse profile

11 Range 10 01 Default: -2.0
11 (*:*)  10 Should be negative

11

11 keepxuxaround  10 Scope: restricted01  BOOLEAN

11 Description: Keep the variable u around after solving

11                           10                01  Default: no

11 multiplyxoldxlapse  10 Scope: restricted01  BOOLEAN

11 Description: Multiply the old lapse with the new one

11                           10                01  Default: no

11

11 newtonxmaxit  10 Scope: restricted01  INT

11 Description: Maximum number of Newton iterations

11  Range  10                01  Default: 5

11 0:*  10

11

11 newtonxtol  10 Scope: restricted01  REAL

11 Description: Tolerance for Newton solver

11 Range 10 01 Default: 1.0e-10
11 (0:*)  10

11

11 npointsxa  10 Scope: restricted01  INT

11 Description: Number of coefficients in the compactified radial direction

11  Range  10                01  Default: 30

11 4:*  10

11

11 npointsxb  10 Scope: restricted01  INT

11 Description: Number of coefficients in the angular direction

11  Range  10                01  Default: 30

11 4:*  10

11

11 npointsxphi  10 Scope: restricted01  INT

11 Description: Number of coefficients in the phi direction

11 Range 10 01 Default: 16
11 4:*:2  10

11

11 parxb  10 Scope: restricted01  REAL

11 Description: x coordinate of the m+ puncture

11 Range 10 01 Default: 1.0
11 (0.0:*)  10

11

11 parxmxminus  10 Scope: restricted01  REAL

11 Description: mass of the m- puncture

11 Range 10 01 Default: 1.0
11 0.0:*)  10

11

11 parxmxplus  10 Scope: restricted01  REAL

11 Description: mass of the m+ puncture

11 Range 10 01 Default: 1.0
11 0.0:*)  10

11

11 parxpxminus  10 Scope: restricted01  REAL

11 Description: momentum of the m- puncture

11 Range 10 01 Default: 0.0
11 (*:*)  10

11

11 parxpxplus  10 Scope: restricted01  REAL

11 Description: momentum of the m+ puncture

11 Range 10 01 Default: 0.0
11 (*:*)  10

11 parxsxminus  10 Scope: restricted01  REAL

11 Description: spin of the m- puncture

11 Range 10 01 Default: 0.0
11 (*:*)  10

11

11 parxsxplus  10 Scope: restricted01  REAL

11 Description: spin of the m+ puncture

11 Range 10 01 Default: 0.0
11 (*:*)  10

11

11 rescalexsources  10 Scope: restricted01  BOOLEAN

11 Description: If sources are used - rescale them after solving?

11                           10                01  Default: yes

11

11 schedulexinxadmbasexinitialdata 10 Scope: restricted01  BOOLEAN

11 Description: Schedule in (instead of after) ADMBasexInitialData

11                           10                01  Default: yes

11

11 solvexmomentumxconstraint 10 Scope: restricted01  BOOLEAN

11 Description: Solve for momentum constraint?

11                           10                01  Default: no

11

11 swapxxz  10 Scope: restricted01  BOOLEAN

11 Description: Swap x and z coordinates when interpolating, so that the black holes are separated in the z direction

11                           10                01  Default: no

11

11 targetxmxminus  10 Scope: restricted01  REAL

11 Description: target ADM mass for m-

11 Range 10 01 Default: 0.5
11 0.0:*)  10

11

11 targetxmxplus  10 Scope: restricted01  REAL

11 Description: target ADM mass for m+

11 Range 10 01 Default: 0.5
11 0.0:*)  10

11

11 tpxepsilon  10 Scope: restricted01  REAL

11 Description: A small number to smooth out singularities at the puncture locations

11  Range  10                01  Default: 0.0

11 0:*  10

11

11 tpxextendxradius  10 Scope: restricted01  REAL

11 Description: Radius of an extended spacetime instead of the puncture

11 Range 10 01 Default: 0.0
11 0:*  10 anything positive, should be smaller than the horizon

11

11 tpxtiny  10 Scope: restricted01  REAL

11 Description: Tiny number to avoid nans near or at the puncture locations

11 Range 10 01 Default: 0.0
11 0:*  10 anything positive, usually very small

11 usexexternalxinitialxguess 10 Scope: restricted01  BOOLEAN

11 Description: Set initial guess by external function?

11                           10                01  Default: no

11

11 usexsources  10 Scope: restricted01  BOOLEAN

11 Description: Use sources?

11                           10                01  Default: no

11

11 verbose  10 Scope: restricted01  BOOLEAN

11 Description: Print screen output while solving

11                           10                01  Default: no

11

11 outxdir  10 Scope: shared from IO01STRING

11

7 Interfaces

General Implements: twopuncturesx

Inherits: admbasex coordinatesx

Grid Variables

7.0.1 PRIVATE GROUPS

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11 puncturexu 10 puncturexu 01 compact 11 0
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01  tags 11 prolongation=”none”
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11  energy  10                    01  compact 11 0
11                    10  E  01 description 11 ADM energy of the Bowen-York spacetime
11                    10                    01 dimensions 11 0
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 SCALAR
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 angularxmomentum 10                    01  compact 11 0
11                    10  J1  01 description 11 Angular momentum of the Bowen-York spacetime
11                    10  J2  01 dimensions 11 0
11                    10  J3  01 distribution 11 CONSTANT
11                    10                    01 group type 11 SCALAR
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL

11

7.0.2 PUBLIC GROUPS

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11  barexmass  10                    01  compact 11 0
11                    10  mp  01 description 11 Bare masses of the punctures
11                    10  mm  01 dimensions 11 0
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 SCALAR
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 puncturexadmxmass 10                    01  compact 11 0
11                    10  mpxadm  01 description 11 ADM masses of the punctures (measured at the other spatial infinities)
11                    10  mmxadm  01 dimensions 11 0
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 SCALAR
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL

11

Uses header: TwoPunctures.h TPxutilities.h TPxparams.h TPxGuts.h

8 Schedule This section lists all the variables which are assigned storage by thorn EinsteinInitialData/TwoPuncturesX. 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 x

11 x 11 Conditional:
11 x 11 energy angularxmomentum puncturexadmxmass barexmass
11 x 11 puncturexu

11 x 11 x

11

Scheduled Functions

CCTKxPARAMCHECK (conditional) x twopuncturesxxparamcheck x check parameters and thorn needs x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

ADMBaseXxInitialData (conditional) x twopuncturesxxgroup x twopuncturesx initial data group x

11 x 11 Type: 11 group

11

CCTKxINITIAL (conditional) x twopuncturesxxgroup x twopuncturesx initial data group x

11 x 11 After: 11 admbasexxinitialdata
11 x 11 x  11 hydrobasexinitial
11 x 11 Before: 11 admbasexxpostinitial
11 x 11 x  11 settmunu
11 x 11 x  11 hydrobasexprim2coninitial
11 x 11 Type: 11 group

11

TwoPuncturesXxGroup (conditional) x twopuncturesx x create puncture black hole initial data

11 x 11 Language: 11 c
11 x 11 Reads:  11 coordinatesx::vertexxcoords(everywhere)
11 x 11 Storage: 11 puncturexu
11 x 11 Type:  11 function
11 x 11 Writes: 11 twopuncturesx::mp(everywhere)
11 x 11 x  11 twopuncturesx::mm(everywhere)
11 x 11 x  11 twopuncturesx::mpxadm(everywhere)
11 x 11 x  11 twopuncturesx::mmxadm(everywhere)
11 x 11 x  11 twopuncturesx::e(everywhere)
11 x 11 x  11 twopuncturesx::j1(everywhere)
11 x 11 x  11 twopuncturesx::j2(everywhere)
11 x 11 x  11 twopuncturesx::j3(everywhere)
11 x 11 x  11 twopuncturesx::puncturexu(everywhere)
11 x 11 x  11 admbasex::alp(everywhere)
11 x 11 x  11 admbasex::metric(everywhere)
11 x 11 x  11 admbasex::curv(everywhere)

11

TwoPuncturesXxGroup (conditional) x twopuncturesxxmetadata x output twopuncturesx metadata x

11 x 11 After:  11 twopuncturesx
11 x 11 Language: 11 c
11 x 11 Options: 11 global
11 x 11 Type:  11 function