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 <cstddef>
8 :
9 : #include "DataStructures/DataBox/Tag.hpp"
10 : #include "DataStructures/Tensor/TypeAliases.hpp"
11 : #include "Evolution/Systems/RadiationTransport/M1Grey/Tags.hpp"
12 : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
13 : #include "Utilities/TMPL.hpp"
14 :
15 : /// \cond
16 : namespace gsl {
17 : template <class T>
18 : class not_null;
19 : } // namespace gsl
20 : class DataVector;
21 : /// \endcond
22 :
23 : namespace RadiationTransport {
24 : namespace M1Grey {
25 :
26 : /*!
27 : * \brief Compute the characteristic speeds for the M1 system
28 : *
29 : * At this point, for testing purposes, we just set all
30 : * speeds to 1... this needs to be fixed in the future to
31 : * use the correct speed values.
32 : */
33 1 : void characteristic_speeds(
34 : gsl::not_null<std::array<DataVector, 4>*> pchar_speeds,
35 : const Scalar<DataVector>& lapse);
36 :
37 1 : namespace Tags {
38 : /// \brief Compute the characteristic speeds for the M1 system
39 : ///
40 1 : struct CharacteristicSpeedsCompute : Tags::CharacteristicSpeeds,
41 : db::ComputeTag {
42 0 : using base = Tags::CharacteristicSpeeds;
43 0 : using argument_tags = tmpl::list<gr::Tags::Lapse<DataVector>>;
44 :
45 0 : using return_type = std::array<DataVector, 4>;
46 :
47 0 : static constexpr auto function = characteristic_speeds;
48 : };
49 : } // namespace Tags
50 :
51 0 : struct ComputeLargestCharacteristicSpeed {
52 0 : using argument_tags = tmpl::list<>;
53 0 : static double apply() { return 1.0; }
54 : };
55 :
56 : } // namespace M1Grey
57 : } // namespace RadiationTransport
|