CanudaX_NPScalars is the CarpetX-compatible version of NPScalars, which computes the Newman-Penrose scalar \(\Psi _{4}\). CanudaX_NPScalars uses finite-difference stencils which are accurate up to 8th order, compared with only 6th order in NPScalars.
NPScalars was introduced in [1] (cf. Appendix C therein for the detailed description) as part of the Lean code, to compute the Newman-Penrose scalar \(\Psi _{4}\) and perform its decomposition into spherical harmonics. It has since been modified to interface instead with the Multipole thorn for this decomposition, and ported to support the CarpetX AMR driver.
In addition, CanudaX_NPScalars can compute \(\Psi _{4}\) with backreaction from matter sources. The matter energy density and momentum fluxes contribute to the gravito-electric and gravito-magnetic fields, which are then used to construct \(\Psi _{4}\) (cf. Eqs. (21a) and (21b) of [3]). The option to enable this backreaction is controlled by the boolean parameter CanudaX_BSSNMoL::stress_energy_state, which adds matter contributions from the stress-energy tensor in TmunuBaseX to the evolution of the spacetime and \(\Psi _{4}\).
The bulk of the code is written in C++ and should be simple to follow – emphasis has been given to readability.
CanudaX_NPScalars and NPScalars are included with the Einstein Toolkit. NPScalars can also be obtained through the Canuda numerical relativity library [2].
[1] U. Sperhake, “Binary black-hole evolutions of excision and puncture data,” Phys. Rev. D 76 (2007), 104015 doi:10.1103/PhysRevD.76.104015 [arXiv:gr-qc/0606079 [gr-qc]].
[2] H. Witek, M. Zilhao, G. Bozzola, C.-H. Cheng, A. Dima, M. Elley, G. Ficarra, T. Ikeda, R. Luna, C. Richards, N. Sanchis-Gual, H. Okada da Silva. “Canuda: a public numerical relativity library to probe fundamental physics,” Zenodo (2023) doi: 10.5281/zenodo.3565474
[3] C. H. Cheng, G. Ficarra and H. Witek, “Dephasing in binary black hole mergers surrounded by scalar wave dark matter clouds,” Phys. Rev. D 113, no.2, 024063 (2026) doi:10.1103/715r-4p7g [arXiv:2510.20037 [gr-qc]].
| calculate_np_every | Scope: private | INT |
| Description: Calculate Psi4 every N iterations
| ||
| Range | Default: 1 | |
| *:* | 0 or negative is never
| |
| np_order | Scope: private | INT |
| Description: Accuracy of finite differences used in computing Psi4
| ||
| Range | Default: 4 | |
| 4 | Fourth order
| |
| 6 | Sixth order
| |
| 8 | Eighth order
| |
| stress_energy_state | Scope: shared from CANUDAX_BSSNMOL | BOOLEAN |
Implements:
canudax_npscalars
Inherits:
admbasex
tmunubasex
| Group Names | Variable Names | Details | |
| nppsi4r_group | compact | 0 | |
| psi4re | description | Real part of Newman-Penrose scalar Psi_4 | |
| dimensions | 3 | ||
| distribution | DEFAULT | ||
| group type | GF | ||
| tags | checkpoint=”no” tensortypealias=”Scalar” tensorweight=0 tensorparity=1 | ||
| timelevels | 1 | ||
| variable type | REAL | ||
| nppsi4i_group | compact | 0 | |
| psi4im | description | Imaginary part of Newman-Penrose scalar Psi_4 | |
| dimensions | 3 | ||
| distribution | DEFAULT | ||
| group type | GF | ||
| tags | checkpoint=”no” tensortypealias=”Scalar” tensorweight=0 tensorparity=-1 | ||
| timelevels | 1 | ||
| variable type | REAL | ||
Uses header:
loop.hxx
loop_device.hxx
evolve_utils.hxx
fd_stencils.hxx
This section lists all the variables which are assigned storage by thorn CanudaX/CanudaX_NPScalars. 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.
| Always: | |
| NPPsi4R_group | |
| NPPsi4I_group | |
CCTK_PARAMCHECK
canudax_npscalars_paramcheck
check canudax_npscalars parameters for consistency
| Language: | c | |
| Type: | function | |
CCTK_POSTINITIAL
canudax_npscalars_calc
calculate newman-penrose scalars
| After: | odesolvers_poststep | |
| Type: | group | |
CCTK_EVOL
canudax_npscalars_calc
calculate newman-penrose scalars
| After: | odesolvers_calledbysolve | |
| Type: | group | |
CanudaX_NPScalars_Calc
canudax_npscalars_calc_psi4
calculate newman-penrose scalar psi4 as a grid function
| Language: | c | |
| Reads: | admbasex::metric(everywhere) | |
| admbasex::curv(everywhere) | ||
| admbasex::lapse(everywhere) | ||
| admbasex::shift(everywhere) | ||
| tmunubasex::ettt(everywhere) | ||
| tmunubasex::etti(everywhere) | ||
| tmunubasex::etij(everywhere) | ||
| Sync: | nppsi4r_group | |
| nppsi4i_group | ||
| Type: | function | |
| Writes: | psi4re(interior) | |
| psi4im(interior) | ||