SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/CurvedScalarWave/Worldtube - PunctureField.hpp Hit Total Coverage
Commit: 3c072f0ce967e2e56649d3fa12aa2a0e4fe2a42e Lines: 3 4 75.0 %
Date: 2024-04-23 20:50:18
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <cstddef>
       7             : 
       8             : #include "DataStructures/DataBox/Prefixes.hpp"
       9             : #include "DataStructures/DataVector.hpp"
      10             : #include "DataStructures/Tensor/Tensor.hpp"
      11             : #include "DataStructures/Variables.hpp"
      12             : #include "Evolution/Systems/CurvedScalarWave/Tags.hpp"
      13             : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
      14             : #include "Utilities/Gsl.hpp"
      15             : 
      16             : namespace CurvedScalarWave::Worldtube {
      17             : /*!
      18             :  * \brief Computes the puncture/singular field \f$\Psi^\mathcal{P}\f$ of a
      19             :  * scalar charge on a generic orbit in Schwarzschild spacetime.
      20             :  * described in \cite Detweiler2003.
      21             :  *
      22             :  * \details The field is computed using a Detweiler-Whiting singular
      23             :  * Green's function and perturbatively expanded in the geodesic distance from
      24             :  * the particle. It solves the inhomogeneous wave equation
      25             :  *
      26             :  * \f{align*}{
      27             :  * \Box \Psi^\mathcal{P} = -4 \pi q \int \sqrt{-g} \delta^4(x^i, z(\tau)) d \tau
      28             :  * \f}
      29             :  *
      30             :  * where \f$q\f$ is the scalar charge and \f$z(\tau)\f$ is the worldline of the
      31             :  * particle. The expression is expanded up to a certain order in geodesic
      32             :  * distance and transformed to Kerr-Schild coordinates.
      33             :  *
      34             :  * The function given here assumes that the particle has scalar charge \f$q=1\f$
      35             :  * and is on a fixed geodesic orbit. It returns the
      36             :  * singular field at the requested coordinates as well as its time and spatial
      37             :  * derivative. For non-geodesic orbits, corresponding acceleration terms have to
      38             :  * be added to the puncture field.
      39             :  *
      40             :  * \note The expressions were computed with Mathematica and optimized by
      41             :  * applying common subexpression elimination with sympy. The memory allocations
      42             :  * of temporaries were optimized manually.
      43             :  */
      44           1 : void puncture_field(
      45             :     gsl::not_null<Variables<tmpl::list<
      46             :         CurvedScalarWave::Tags::Psi, ::Tags::dt<CurvedScalarWave::Tags::Psi>,
      47             :         ::Tags::deriv<CurvedScalarWave::Tags::Psi, tmpl::size_t<3>,
      48             :                       Frame::Inertial>>>*>
      49             :         result,
      50             : 
      51             :     const tnsr::I<DataVector, 3, Frame::Inertial>& centered_coords,
      52             :     const tnsr::I<double, 3>& particle_position,
      53             :     const tnsr::I<double, 3>& particle_velocity,
      54             :     const tnsr::I<double, 3>& particle_acceleration, double bh_mass,
      55             :     size_t order);
      56             : 
      57             : /*!
      58             :  * \brief Computes the puncture/singular field \f$\Psi^\mathcal{P}\f$ of a
      59             :  * scalar charge on a generic orbit in Schwarzschild spacetime.
      60             :  * described in \cite Detweiler2003.
      61             :  */
      62           1 : void puncture_field_0(
      63             :     gsl::not_null<Variables<tmpl::list<
      64             :         CurvedScalarWave::Tags::Psi, ::Tags::dt<CurvedScalarWave::Tags::Psi>,
      65             :         ::Tags::deriv<CurvedScalarWave::Tags::Psi, tmpl::size_t<3>,
      66             :                       Frame::Inertial>>>*>
      67             :         result,
      68             :     const tnsr::I<DataVector, 3, Frame::Inertial>& centered_coords,
      69             :     const tnsr::I<double, 3>& particle_position,
      70             :     const tnsr::I<double, 3>& particle_velocity,
      71             :     const tnsr::I<double, 3>& particle_acceleration, double bh_mass);
      72             : 
      73             : /*!
      74             :  * \brief Computes the puncture/singular field \f$\Psi^\mathcal{P}\f$ of a
      75             :  * scalar charge on a generic orbit in Schwarzschild spacetime.
      76             :  * described in \cite Detweiler2003.
      77             :  */
      78           1 : void puncture_field_1(
      79             :     gsl::not_null<Variables<tmpl::list<
      80             :         CurvedScalarWave::Tags::Psi, ::Tags::dt<CurvedScalarWave::Tags::Psi>,
      81             :         ::Tags::deriv<CurvedScalarWave::Tags::Psi, tmpl::size_t<3>,
      82             :                       Frame::Inertial>>>*>
      83             :         result,
      84             :     const tnsr::I<DataVector, 3, Frame::Inertial>& centered_coords,
      85             :     const tnsr::I<double, 3>& particle_position,
      86             :     const tnsr::I<double, 3>& particle_velocity,
      87             :     const tnsr::I<double, 3>& particle_acceleration, double bh_mass);
      88             : }  // namespace CurvedScalarWave::Worldtube

Generated by: LCOV version 1.14