Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <array>
7 : #include <string>
8 :
9 : #include "DataStructures/DataBox/Tag.hpp"
10 : #include "DataStructures/Tensor/Tensor.hpp"
11 : #include "Domain/FaceNormal.hpp"
12 : #include "Evolution/Systems/Burgers/Tags.hpp"
13 : #include "Utilities/Gsl.hpp"
14 : #include "Utilities/TMPL.hpp"
15 :
16 : /// \cond
17 : class DataVector;
18 :
19 : namespace Burgers {
20 : namespace Tags {
21 : struct U;
22 : } // namespace Tags
23 : } // namespace Burgers
24 : /// \endcond
25 :
26 1 : namespace Burgers::Tags {
27 : /// Computes the characteristic speeds
28 1 : struct CharacteristicSpeedsCompute : CharacteristicSpeeds, db::ComputeTag {
29 0 : using base = CharacteristicSpeeds;
30 0 : using argument_tags =
31 : tmpl::list<Tags::U, domain::Tags::UnnormalizedFaceNormal<1>>;
32 0 : using return_type = std::array<DataVector, 1>;
33 0 : static void function(gsl::not_null<return_type*> result,
34 : const Scalar<DataVector>& u,
35 : const tnsr::i<DataVector, 1>& normal);
36 : };
37 :
38 0 : struct LargestCharacteristicSpeed : db::SimpleTag {
39 0 : using type = double;
40 : };
41 :
42 0 : struct ComputeLargestCharacteristicSpeed : LargestCharacteristicSpeed,
43 : db::ComputeTag {
44 0 : using argument_tags = tmpl::list<Tags::U>;
45 0 : using return_type = double;
46 0 : using base = LargestCharacteristicSpeed;
47 0 : static void function(const gsl::not_null<double*> speed,
48 : const Scalar<DataVector>& u);
49 : };
50 : } // namespace Burgers::Tags
|