8 #include "DataStructures/DataBox/Tag.hpp"
9 #include "DataStructures/DataVector.hpp"
11 #include "Evolution/Systems/NewtonianEuler/Tags.hpp"
15 namespace TestHelpers::NewtonianEuler {
22 using type = tnsr::I<DataVector, Dim>;
31 using type = tnsr::i<DataVector, Dim>;
37 static constexpr
size_t volume_dim = Dim;
38 using sourced_variables =
48 const gsl::not_null<tnsr::I<DataVector, Dim>*> source_momentum_density,
51 const tnsr::I<DataVector, Dim>& second_arg,
53 const tnsr::i<DataVector, Dim>& fourth_arg)
const noexcept {
54 get(*source_mass_density_cons) = exp(
get(first_arg));
55 for (
size_t i = 0; i < Dim; ++i) {
56 source_momentum_density->get(i) =
57 (
get(first_arg) - 1.5 *
get(third_arg)) * second_arg.get(i);
59 get(*source_energy_density) =
68 static constexpr
size_t volume_dim = Dim;
69 using sourced_variables =
70 tmpl::list<::NewtonianEuler::Tags::MomentumDensity<Dim>,
77 const gsl::not_null<tnsr::I<DataVector, Dim>*> source_momentum_density,
80 const tnsr::I<DataVector, Dim>& second_arg,
82 const tnsr::i<DataVector, Dim>& fourth_arg)
const noexcept {
83 for (
size_t i = 0; i < Dim; ++i) {
84 source_momentum_density->get(i) =
85 (
get(first_arg) - 1.5 *
get(third_arg)) * second_arg.get(i);
87 get(*source_energy_density) =
92 template <
typename SourceTermType>
94 static constexpr
size_t volume_dim = SourceTermType::volume_dim;
95 using source_term_type = SourceTermType;