SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/Cce/InterfaceManagers - GhInterfaceManager.hpp Hit Total Coverage
Commit: a8aa129167b874d133c2ebcaf7e84d0033e6ae07 Lines: 1 10 10.0 %
Date: 2024-04-16 17:18:12
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 <memory>
       7             : #include <optional>
       8             : #include <tuple>
       9             : 
      10             : #include "DataStructures/Tensor/Tensor.hpp"
      11             : #include "DataStructures/Tensor/TypeAliases.hpp"
      12             : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      13             : #include "Options/String.hpp"
      14             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      15             : #include "Time/TimeStepId.hpp"
      16             : #include "Utilities/Serialization/CharmPupable.hpp"
      17             : 
      18             : namespace Cce {
      19           0 : namespace InterfaceManagers {
      20             : 
      21             : /// \cond
      22             : class GhLocalTimeStepping;
      23             : class GhLockstep;
      24             : /// \endcond
      25             : 
      26             : /*!
      27             :  * \brief Abstract base class for storage and retrieval of generalized harmonic
      28             :  * quantities communicated from a Cauchy simulation to the Cce system.
      29             :  *
      30             :  * \details The functions that are required to be overriden in the derived
      31             :  * classes are:
      32             :  * - `GhInterfaceManager::get_clone()`: should return a
      33             :  * `std::unique_ptr<GhInterfaceManager>` with cloned state.
      34             :  * - `GhInterfaceManager::insert_gh_data()`: should store the portions
      35             :  * of the provided generalized harmonic data that are required to provide useful
      36             :  * boundary values for the CCE evolution at requested timesteps.
      37             :  * - `GhInterfaceManager::request_gh_data()`: should register requests
      38             :  * from the CCE evolution for boundary data.
      39             :  * - `GhInterfaceManager::retrieve_and_remove_first_ready_gh_data()`:
      40             :  * should return a `std::optional<std::tuple<TimeStepId,
      41             :  * tnsr::aa<DataVector, 3>, tnsr::iaa<DataVector, 3>, tnsr::aa<DataVector, 3>>>`
      42             :  * containing the boundary data associated with the oldest requested timestep if
      43             :  * enough data has been supplied via `insert_gh_data()` to determine the
      44             :  * boundary data. Otherwise, return a `std::nullopt` to indicate that the CCE
      45             :  * system must continue waiting for generalized harmonic input.
      46             :  * - `GhInterfaceManager::number_of_pending_requests()`: should return
      47             :  * the number of requests that have been registered to the class that do not yet
      48             :  * been retrieved via `retrieve_and_remove_first_ready_gh_data()`.
      49             :  * - `GhInterfaceManager::number_of_gh_times()`: should return the
      50             :  * number of time steps sent to `insert_gh_data()` that have not yet been
      51             :  * retrieved via `retrieve_and_remove_first_ready_gh_data()`.
      52             :  */
      53           1 : class GhInterfaceManager : public PUP::able {
      54             :  public:
      55           0 :   using gh_variables = Variables<
      56             :       tmpl::list<gr::Tags::SpacetimeMetric<DataVector, 3>,
      57             :                  gh::Tags::Pi<DataVector, 3>, gh::Tags::Phi<DataVector, 3>>>;
      58             : 
      59           0 :   WRAPPED_PUPable_abstract(GhInterfaceManager);  // NOLINT
      60             : 
      61           0 :   virtual std::unique_ptr<GhInterfaceManager> get_clone() const = 0;
      62             : 
      63           0 :   virtual void request_gh_data(const TimeStepId&) = 0;
      64             : 
      65           0 :   virtual auto retrieve_and_remove_first_ready_gh_data()
      66             :       -> std::optional<std::tuple<TimeStepId, gh_variables>> = 0;
      67             : 
      68           0 :   virtual size_t number_of_pending_requests() const = 0;
      69             : 
      70           0 :   virtual size_t number_of_gh_times() const = 0;
      71             : };
      72             : 
      73             : }  // namespace InterfaceManagers
      74             : }  // namespace Cce

Generated by: LCOV version 1.14