SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GrMhd/GhValenciaDivClean/BoundaryCorrections - BoundaryCorrection.hpp Hit Total Coverage
Commit: d0fc80462417e83e5cddfa1b9901bb4a9b6af4d6 Lines: 2 11 18.2 %
Date: 2024-03-29 00:33: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 <cstddef>
       7             : #include <memory>
       8             : #include <pup.h>
       9             : 
      10             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryCorrections/BoundaryCorrection.hpp"
      11             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/BoundaryCorrections/BoundaryCorrection.hpp"
      12             : #include "Utilities/Gsl.hpp"
      13             : #include "Utilities/Serialization/CharmPupable.hpp"
      14             : #include "Utilities/TMPL.hpp"
      15             : 
      16             : /// Boundary corrections/numerical fluxes
      17           1 : namespace grmhd::GhValenciaDivClean::BoundaryCorrections {
      18             : /// \cond
      19             : template <typename DerivedGhCorrection, typename DerivedValenciaCorrection>
      20             : class ProductOfCorrections;
      21             : /// \endcond
      22             : 
      23             : namespace detail {
      24             : template <typename GhList, typename ValenciaList>
      25             : struct AllProductCorrections;
      26             : 
      27             : template <typename GhList, typename... ValenciaCorrections>
      28             : struct AllProductCorrections<GhList, tmpl::list<ValenciaCorrections...>> {
      29             :   using type = tmpl::flatten<tmpl::list<
      30             :       tmpl::transform<GhList, tmpl::bind<ProductOfCorrections, tmpl::_1,
      31             :                                          tmpl::pin<ValenciaCorrections>>>...>>;
      32             : };
      33             : }  // namespace detail
      34             : 
      35             : /*!
      36             :  * \brief The base class used to make boundary corrections factory createable so
      37             :  * they can be specified in the input file.
      38             :  */
      39           1 : class BoundaryCorrection : public PUP::able {
      40             :  public:
      41           0 :   BoundaryCorrection() = default;
      42           0 :   BoundaryCorrection(const BoundaryCorrection&) = default;
      43           0 :   BoundaryCorrection& operator=(const BoundaryCorrection&) = default;
      44           0 :   BoundaryCorrection(BoundaryCorrection&&) = default;
      45           0 :   BoundaryCorrection& operator=(BoundaryCorrection&&) = default;
      46           0 :   ~BoundaryCorrection() override = default;
      47             : 
      48             :   /// \cond
      49             :   explicit BoundaryCorrection(CkMigrateMessage* msg) : PUP::able(msg) {}
      50             :   WRAPPED_PUPable_abstract(BoundaryCorrection);  // NOLINT
      51             :   /// \endcond
      52             : 
      53           0 :   using creatable_classes = typename detail::AllProductCorrections<
      54             :       typename gh::BoundaryCorrections::BoundaryCorrection<
      55             :           3_st>::creatable_classes,
      56             :       typename grmhd::ValenciaDivClean::BoundaryCorrections::
      57             :           BoundaryCorrection::creatable_classes>::type;
      58             : 
      59           0 :   virtual std::unique_ptr<BoundaryCorrection> get_clone() const = 0;
      60             : };
      61             : }  // namespace grmhd::GhValenciaDivClean::BoundaryCorrections

Generated by: LCOV version 1.14