SpECTRE Documentation Coverage Report
Current view: top level - Elliptic/Systems - GetSourcesComputer.hpp Hit Total Coverage
Commit: 990bc653376fc4a4068db06123ec02659d814816 Lines: 1 2 50.0 %
Date: 2021-05-16 17:17:32
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 <type_traits>
       7             : 
       8             : #include "Utilities/TMPL.hpp"
       9             : 
      10             : namespace elliptic {
      11             : namespace detail {
      12             : template <typename System, typename = std::void_t<>>
      13             : struct sources_computer_linearized {
      14             :   using type = typename System::sources_computer;
      15             : };
      16             : template <typename System>
      17             : struct sources_computer_linearized<
      18             :     System, std::void_t<typename System::sources_computer_linearized>> {
      19             :   using type = typename System::sources_computer_linearized;
      20             : };
      21             : }  // namespace detail
      22             : 
      23             : /// The `System::sources_computer` or the `System::sources_computer_linearized`,
      24             : /// depending on the `Linearized` parameter. If the system has no
      25             : /// `sources_computer_linearized` alias it is assumed to be linear, so the
      26             : /// `System::sources_computer` is returned either way.
      27             : template <typename System, bool Linearized>
      28           1 : using get_sources_computer = tmpl::conditional_t<
      29             :     Linearized, typename detail::sources_computer_linearized<System>::type,
      30             :     typename System::sources_computer>;
      31             : }  // namespace elliptic

Generated by: LCOV version 1.14