SpECTRE Documentation Coverage Report
Current view: top level - ParallelAlgorithms/ApparentHorizonFinder - KerrSchild.hpp Hit Total Coverage
Commit: c3e43f8d41800b0ecefb9d1393f1de1d5a280c8f Lines: 2 22 9.1 %
Date: 2026-07-24 22:09:25
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 <array>
       7             : #include <cstddef>
       8             : #include <pup.h>
       9             : 
      10             : #include "NumericalAlgorithms/Strahlkorper/InitialShape.hpp"
      11             : #include "NumericalAlgorithms/Strahlkorper/Strahlkorper.hpp"
      12             : #include "Options/Context.hpp"
      13             : #include "Options/String.hpp"
      14             : #include "Utilities/Serialization/CharmPupable.hpp"
      15             : #include "Utilities/TMPL.hpp"
      16             : 
      17           0 : namespace ah::InitialShapes {
      18             : /*!
      19             :  * \ingroup SurfacesGroup
      20             :  * \brief An initial shape for a Strahlkorper corersponding to a Kerr-Schild
      21             :  * black hole.
      22             :  */
      23             : template <typename Frame>
      24           1 : class KerrSchild : public ylm::InitialShape<Frame> {
      25             :  public:
      26           0 :   struct Center {
      27           0 :     using type = std::array<double, 3>;
      28           0 :     static constexpr Options::String help = {
      29             :         "Center of the Strahlkorper expansion"};
      30             :   };
      31           0 :   struct Mass {
      32           0 :     using type = double;
      33           0 :     static constexpr Options::String help = {"Mass of the black hole"};
      34             :   };
      35           0 :   struct Spin {
      36           0 :     using type = std::array<double, 3>;
      37           0 :     static constexpr Options::String help = {"Dimensionless spin vector"};
      38             :   };
      39             : 
      40           0 :   using options = tmpl::list<Center, Mass, Spin>;
      41           0 :   static constexpr Options::String help = {
      42             :       "Construct a Kerr-Schild horizon for the given mass and dimensionless "
      43             :       "spin vector."};
      44           0 :   static std::string name() { return "KerrSchild"; }
      45             : 
      46           0 :   KerrSchild() = default;
      47           0 :   KerrSchild(std::array<double, 3> center, double mass,
      48             :              std::array<double, 3> spin);
      49             : 
      50             :   /// \cond
      51             :   explicit KerrSchild(CkMigrateMessage* msg);
      52             :   using PUP::able::register_constructor;
      53             :   WRAPPED_PUPable_decl_template(KerrSchild);  // NOLINT
      54             :   /// \endcond
      55             : 
      56           1 :   ylm::Strahlkorper<Frame> strahlkorper(
      57             :       size_t l_max, const Options::Context& context) const override;
      58             : 
      59           0 :   void pup(PUP::er& p) override;
      60             : 
      61             :  private:
      62           0 :   std::array<double, 3> center_{};
      63           0 :   double mass_{};
      64           0 :   std::array<double, 3> spin_{};
      65             : };
      66             : }  // namespace ah::InitialShapes

Generated by: LCOV version 1.14