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