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/Tensor/TypeAliases.hpp"
9 : #include "Evolution/Systems/NewtonianEuler/Sources/Source.hpp"
10 : #include "Options/String.hpp"
11 : #include "Utilities/TMPL.hpp"
12 :
13 : /// \cond
14 : class DataVector;
15 : namespace gsl {
16 : template <class T>
17 : class not_null;
18 : } // namespace gsl
19 : namespace EquationsOfState {
20 : template <bool IsRelativistic, size_t ThermodynamicDim>
21 : class EquationOfState;
22 : } // namespace EquationsOfState
23 : namespace PUP {
24 : class er;
25 : } // namespace PUP
26 : /// \endcond
27 :
28 : namespace NewtonianEuler::Sources {
29 : /*!
30 : * \brief Used to mark that the initial data do not require source
31 : * terms in the evolution equations.
32 : */
33 : template <size_t Dim>
34 1 : class NoSource : public Source<Dim> {
35 : public:
36 0 : using options = tmpl::list<>;
37 :
38 0 : static constexpr Options::String help = {"No source terms added."};
39 :
40 0 : NoSource() = default;
41 0 : NoSource(const NoSource& /*rhs*/) = default;
42 0 : NoSource& operator=(const NoSource& /*rhs*/) = default;
43 0 : NoSource(NoSource&& /*rhs*/) = default;
44 0 : NoSource& operator=(NoSource&& /*rhs*/) = default;
45 0 : ~NoSource() override = default;
46 :
47 : /// \cond
48 : explicit NoSource(CkMigrateMessage* msg);
49 : using PUP::able::register_constructor;
50 : WRAPPED_PUPable_decl_template(NoSource);
51 : /// \endcond
52 :
53 : // NOLINTNEXTLINE(google-runtime-references)
54 0 : void pup(PUP::er& p) override;
55 :
56 0 : auto get_clone() const -> std::unique_ptr<Source<Dim>> override;
57 :
58 0 : void operator()(
59 : gsl::not_null<Scalar<DataVector>*> source_mass_density_cons,
60 : gsl::not_null<tnsr::I<DataVector, Dim>*> source_momentum_density,
61 : gsl::not_null<Scalar<DataVector>*> source_energy_density,
62 : const Scalar<DataVector>& mass_density_cons,
63 : const tnsr::I<DataVector, Dim>& momentum_density,
64 : const Scalar<DataVector>& energy_density,
65 : const tnsr::I<DataVector, Dim>& velocity,
66 : const Scalar<DataVector>& pressure,
67 : const Scalar<DataVector>& specific_internal_energy,
68 : const EquationsOfState::EquationOfState<false, 2>& eos,
69 : const tnsr::I<DataVector, Dim>& coords, double time) const override;
70 :
71 0 : using sourced_variables = tmpl::list<>;
72 0 : using argument_tags = tmpl::list<>;
73 : };
74 : } // namespace NewtonianEuler::Sources
|