SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/Ccz4/BoundaryConditions - DirichletAnalytic.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 2 25 8.0 %
Date: 2025-12-05 05:03:31
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 <pup.h>
       7             : #include <string>
       8             : 
       9             : #include "DataStructures/DataVector.hpp"
      10             : #include "DataStructures/Tensor/Tensor.hpp"
      11             : #include "Domain/CoordinateMaps/CoordinateMap.hpp"
      12             : #include "Domain/CoordinateMaps/Tags.hpp"
      13             : #include "Domain/ElementMap.hpp"
      14             : #include "Domain/FunctionsOfTime/FunctionOfTime.hpp"
      15             : #include "Domain/FunctionsOfTime/Tags.hpp"
      16             : #include "Domain/Structure/Direction.hpp"
      17             : #include "Domain/Tags.hpp"
      18             : #include "Evolution/BoundaryConditions/Type.hpp"
      19             : #include "Evolution/DgSubcell/GhostZoneLogicalCoordinates.hpp"
      20             : #include "Evolution/DgSubcell/Tags/Coordinates.hpp"
      21             : #include "Evolution/DgSubcell/Tags/Mesh.hpp"
      22             : #include "Evolution/Systems/Ccz4/BoundaryConditions/BoundaryCondition.hpp"
      23             : #include "Evolution/Systems/Ccz4/FiniteDifference/Tags.hpp"
      24             : #include "Evolution/Systems/Ccz4/Tags.hpp"
      25             : #include "Evolution/TypeTraits.hpp"
      26             : #include "Options/String.hpp"
      27             : #include "PointwiseFunctions/AnalyticSolutions/AnalyticSolution.hpp"
      28             : #include "PointwiseFunctions/InitialDataUtilities/InitialData.hpp"
      29             : #include "Utilities/Gsl.hpp"
      30             : #include "Utilities/Serialization/CharmPupable.hpp"
      31             : #include "Utilities/TMPL.hpp"
      32             : 
      33             : /// \cond
      34             : namespace Tags {
      35             : struct Time;
      36             : }  // namespace Tags
      37             : /// \endcond
      38             : 
      39             : namespace Ccz4::BoundaryConditions {
      40             : /*!
      41             :  * \brief Sets Dirichlet boundary conditions using the analytic solution or
      42             :  * analytic data.
      43             :  */
      44           1 : class DirichletAnalytic final : public BoundaryCondition {
      45             :  public:
      46             :   /// \brief What analytic solution/data to prescribe.
      47           1 :   struct AnalyticPrescription {
      48           0 :     static constexpr Options::String help =
      49             :         "What analytic solution/data to prescribe.";
      50           0 :     using type = std::unique_ptr<evolution::initial_data::InitialData>;
      51             :   };
      52           0 :   using options = tmpl::list<AnalyticPrescription>;
      53           0 :   static constexpr Options::String help{
      54             :       "DirichletAnalytic boundary conditions using either analytic solution or "
      55             :       "analytic data."};
      56             : 
      57           0 :   DirichletAnalytic() = default;
      58           0 :   DirichletAnalytic(DirichletAnalytic&&) = default;
      59           0 :   DirichletAnalytic& operator=(DirichletAnalytic&&) = default;
      60           0 :   DirichletAnalytic(const DirichletAnalytic&);
      61           0 :   DirichletAnalytic& operator=(const DirichletAnalytic&);
      62           0 :   ~DirichletAnalytic() override = default;
      63             : 
      64           0 :   explicit DirichletAnalytic(CkMigrateMessage* msg);
      65             : 
      66           0 :   explicit DirichletAnalytic(
      67             :       std::unique_ptr<evolution::initial_data::InitialData>
      68             :           analytic_prescription);
      69             : 
      70           0 :   WRAPPED_PUPable_decl_base_template(
      71             :       domain::BoundaryConditions::BoundaryCondition, DirichletAnalytic);
      72             : 
      73           0 :   auto get_clone() const
      74             :       -> std::unique_ptr<
      75             :           domain::BoundaryConditions::BoundaryCondition> override;
      76             : 
      77           0 :   static constexpr evolution::BoundaryConditions::Type bc_type =
      78             :       evolution::BoundaryConditions::Type::Ghost;
      79             : 
      80           0 :   void pup(PUP::er& p) override;
      81             : 
      82           0 :   using fd_interior_evolved_variables_tags = tmpl::list<>;
      83           0 :   using fd_interior_temporary_tags =
      84             :       tmpl::list<evolution::dg::subcell::Tags::Mesh<3>>;
      85           0 :   using fd_interior_primitive_variables_tags = tmpl::list<>;
      86           0 :   using fd_gridless_tags =
      87             :       tmpl::list<::Tags::Time, ::domain::Tags::FunctionsOfTime,
      88             :                  domain::Tags::ElementMap<3, Frame::Grid>,
      89             :                  domain::CoordinateMaps::Tags::CoordinateMap<3, Frame::Grid,
      90             :                                                              Frame::Inertial>,
      91             :                  ::Ccz4::fd::Tags::Reconstructor>;
      92           0 :   void fd_ghost(
      93             :       gsl::not_null<tnsr::ii<DataVector, 3, Frame::Inertial>*>
      94             :           conformal_metric,
      95             :       gsl::not_null<Scalar<DataVector>*> lapse,
      96             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> shift,
      97             :       gsl::not_null<Scalar<DataVector>*> conformal_factor,
      98             :       gsl::not_null<tnsr::ii<DataVector, 3, Frame::Inertial>*> a_tilde,
      99             :       gsl::not_null<Scalar<DataVector>*> trace_extrinsic_curvature,
     100             :       gsl::not_null<Scalar<DataVector>*> theta,
     101             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*> gamma_hat,
     102             :       gsl::not_null<tnsr::I<DataVector, 3, Frame::Inertial>*>
     103             :           auxiliary_shift_b,
     104             :       const Direction<3>& direction,
     105             : 
     106             :       // fd_interior_temporary_tags
     107             :       const Mesh<3>& subcell_mesh,
     108             : 
     109             :       // fd_gridless_tags
     110             :       double time,
     111             :       const std::unordered_map<
     112             :           std::string,
     113             :           std::unique_ptr<::domain::FunctionsOfTime::FunctionOfTime>>&
     114             :           functions_of_time,
     115             :       const ElementMap<3, Frame::Grid>& logical_to_grid_map,
     116             :       const domain::CoordinateMapBase<Frame::Grid, Frame::Inertial, 3>&
     117             :           grid_to_inertial_map,
     118             :       const fd::Reconstructor& reconstructor) const;
     119             : 
     120             :  private:
     121           0 :   std::unique_ptr<evolution::initial_data::InitialData> analytic_prescription_;
     122             : };
     123             : }  // namespace Ccz4::BoundaryConditions

Generated by: LCOV version 1.14