SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/ScalarTensor/BoundaryConditions - Factory.hpp Hit Total Coverage
Commit: 965048f86d23c819715b3af1ca3f880c8145d4bb Lines: 1 4 25.0 %
Date: 2024-05-16 17:00:40
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 "Domain/BoundaryConditions/Periodic.hpp"
       7             : #include "Evolution/Systems/CurvedScalarWave/BoundaryConditions/AnalyticConstant.hpp"
       8             : #include "Evolution/Systems/CurvedScalarWave/BoundaryConditions/DemandOutgoingCharSpeeds.hpp"
       9             : #include "Evolution/Systems/CurvedScalarWave/BoundaryConditions/Factory.hpp"
      10             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/BoundaryCondition.hpp"
      11             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/DemandOutgoingCharSpeeds.hpp"
      12             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/DirichletAnalytic.hpp"
      13             : #include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/Factory.hpp"
      14             : #include "Evolution/Systems/ScalarTensor/BoundaryConditions/BoundaryCondition.hpp"
      15             : #include "Evolution/Systems/ScalarTensor/BoundaryConditions/ProductOfConditions.hpp"
      16             : #include "Utilities/TMPL.hpp"
      17             : 
      18             : namespace ScalarTensor::BoundaryConditions {
      19             : 
      20             : namespace detail {
      21             : 
      22             : // Remove boundary condition products of DemandOutgoingCharSpeeds with
      23             : // other types of boundary conditions
      24             : template <typename DerivedGhCondition, typename DerivedScalarCondition>
      25             : using ProductOfConditionsIfConsistent = tmpl::conditional_t<
      26             :     (DerivedGhCondition::bc_type ==
      27             :      evolution::BoundaryConditions::Type::DemandOutgoingCharSpeeds) xor
      28             :         (DerivedScalarCondition::bc_type ==
      29             :          evolution::BoundaryConditions::Type::DemandOutgoingCharSpeeds),
      30             :     tmpl::list<>,
      31             :     ProductOfConditions<DerivedGhCondition, DerivedScalarCondition>>;
      32             : 
      33             : template <typename GhList, typename ScalarList>
      34             : struct AllProductConditions;
      35             : 
      36             : template <typename GhList, typename... ScalarConditions>
      37             : struct AllProductConditions<GhList, tmpl::list<ScalarConditions...>> {
      38             :   using type = tmpl::flatten<tmpl::list<tmpl::transform<
      39             :       GhList, tmpl::bind<ProductOfConditionsIfConsistent, tmpl::_1,
      40             :                          tmpl::pin<ScalarConditions>>>...>>;
      41             : };
      42             : 
      43             : }  // namespace detail
      44             : 
      45             : /// Typelist of standard BoundaryConditions. For now, we only support a subset
      46             : /// of the available boundary conditions
      47           1 : using subset_standard_boundary_conditions_gh =
      48             :     tmpl::list<gh::BoundaryConditions::DemandOutgoingCharSpeeds<3>,
      49             :                gh::BoundaryConditions::DirichletAnalytic<3>>;
      50             : 
      51           0 : using subset_standard_boundary_conditions_scalar = tmpl::list<
      52             :     CurvedScalarWave::BoundaryConditions::AnalyticConstant<3>,
      53             :     CurvedScalarWave::BoundaryConditions::DemandOutgoingCharSpeeds<3>>;
      54           0 : using standard_boundary_conditions =
      55             :     tmpl::push_back<typename detail::AllProductConditions<
      56             :                         subset_standard_boundary_conditions_gh,
      57             :                         subset_standard_boundary_conditions_scalar>::type,
      58             :                     domain::BoundaryConditions::Periodic<BoundaryCondition>>;
      59             : 
      60             : }  // namespace ScalarTensor::BoundaryConditions

Generated by: LCOV version 1.14