SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/ScalarWave - System.hpp Hit Total Coverage
Commit: b1342d46f40e2d46bbd11d0cef68fd973031a24b Lines: 1 15 6.7 %
Date: 2020-09-24 20:24:42
Legend: Lines: hit not hit

          Line data    Source code
       1           1 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : /// \file
       5             : /// Defines class ScalarWaveSystem.
       6             : 
       7             : #pragma once
       8             : 
       9             : #include <cstddef>
      10             : 
      11             : #include "DataStructures/Tensor/EagerMath/Magnitude.hpp"
      12             : #include "DataStructures/VariablesTag.hpp"
      13             : #include "Evolution/Systems/ScalarWave/Characteristics.hpp"
      14             : #include "Evolution/Systems/ScalarWave/Equations.hpp"
      15             : #include "Evolution/Systems/ScalarWave/Tags.hpp"
      16             : #include "Evolution/Systems/ScalarWave/TimeDerivative.hpp"
      17             : #include "Utilities/TMPL.hpp"
      18             : 
      19             : /*!
      20             :  * \ingroup EvolutionSystemsGroup
      21             :  * \brief Items related to evolving the scalar wave equation.
      22             :  *
      23             :  * The equations of motion for the system augmented with constraint damping
      24             :  * terms are given by Eq. (15), (23) and (24) of \cite Holst2004wt (setting
      25             :  * background spacetime to Minkowskian):
      26             :  *
      27             :  * \f{align*}
      28             :  * \partial_t \psi =& -\Pi \\
      29             :  * \partial_t \Pi  =& -\partial^i \Phi_i \\
      30             :  * \partial_t \Phi_i =& -\partial_i \Pi + \gamma_2 (\partial_i \psi - \Phi_i)
      31             :  * \f}
      32             :  *
      33             :  * In our implementation here, to disable the constraint damping terms,
      34             :  * set \f$\gamma_2 = 0\f$.
      35             :  */
      36             : namespace ScalarWave {
      37             : 
      38             : template <size_t Dim>
      39           0 : struct System {
      40           0 :   static constexpr bool is_in_flux_conservative_form = false;
      41           0 :   static constexpr bool has_primitive_and_conservative_vars = false;
      42           0 :   static constexpr size_t volume_dim = Dim;
      43             : 
      44           0 :   using variables_tag = ::Tags::Variables<tmpl::list<Pi, Phi<Dim>, Psi>>;
      45           0 :   using flux_variables = tmpl::list<>;
      46           0 :   using gradient_variables = tmpl::list<Pi, Phi<Dim>, Psi>;
      47             : 
      48           0 :   using compute_volume_time_derivative = TimeDerivative<Dim>;
      49           0 :   using normal_dot_fluxes = ComputeNormalDotFluxes<Dim>;
      50             : 
      51           0 :   using compute_largest_characteristic_speed =
      52             :       ComputeLargestCharacteristicSpeed;
      53             : 
      54           0 :   using char_speeds_compute_tag = Tags::CharacteristicSpeedsCompute<Dim>;
      55           0 :   using char_speeds_tag = Tags::CharacteristicSpeeds<Dim>;
      56             : 
      57             :   template <typename Tag>
      58           0 :   using magnitude_tag = ::Tags::EuclideanMagnitude<Tag>;
      59             : 
      60             :   // Remove gradients_tags once GH is converted over to the new
      61             :   // dg::ComputeTimeDerivative action.
      62           0 :   using gradients_tags = gradient_variables;
      63             : };
      64             : }  // namespace ScalarWave

Generated by: LCOV version 1.14