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 :
8 : #include "DataStructures/DataBox/Prefixes.hpp"
9 : #include "DataStructures/DataVector.hpp"
10 : #include "DataStructures/Tensor/TypeAliases.hpp"
11 : #include "Evolution/DiscontinuousGalerkin/TimeDerivativeDecisions.hpp"
12 : #include "Evolution/Systems/ScalarAdvection/Tags.hpp"
13 : #include "Utilities/Gsl.hpp"
14 : #include "Utilities/TMPL.hpp"
15 :
16 : namespace ScalarAdvection {
17 : /*!
18 : * \brief Computes the time derivative terms needed for the ScalarAdvection
19 : * system, which are just the fluxes.
20 : */
21 : template <size_t Dim>
22 1 : struct TimeDerivativeTerms {
23 0 : using temporary_tags = tmpl::list<Tags::VelocityField<Dim>>;
24 0 : using argument_tags = tmpl::list<Tags::U, Tags::VelocityField<Dim>>;
25 :
26 0 : static evolution::dg::TimeDerivativeDecisions<Dim> apply(
27 : // Time derivatives returned by reference. No source terms or
28 : // nonconservative products, so not used. All the tags in the
29 : // variables_tag in the system struct.
30 : gsl::not_null<Scalar<DataVector>*> /*non_flux_terms_dt_vars*/,
31 :
32 : // Fluxes returned by reference. Listed in the system struct as
33 : // flux_variables.
34 : gsl::not_null<tnsr::I<DataVector, Dim>*> flux,
35 :
36 : // Temporary tags
37 : gsl::not_null<tnsr::I<DataVector, Dim>*> temp_velocity_field,
38 :
39 : // Arguments listed in argument_tags above
40 : const Scalar<DataVector>& u,
41 : const tnsr::I<DataVector, Dim>& velocity_field);
42 : };
43 : } // namespace ScalarAdvection
|