Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include "DataStructures/Tensor/TypeAliases.hpp"
7 : #include "DataStructures/Variables.hpp"
8 : #include "Evolution/DiscontinuousGalerkin/TimeDerivativeDecisions.hpp"
9 : #include "Evolution/Systems/ScalarWave/Tags.hpp"
10 : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
11 : #include "Utilities/TMPL.hpp"
12 :
13 : /// \cond
14 : namespace gsl {
15 : template <typename T>
16 : class not_null;
17 : } // namespace gsl
18 :
19 : class DataVector;
20 : /// \endcond
21 :
22 : namespace ScalarWave {
23 : /*!
24 : * \brief Compute the time derivatives for scalar wave system
25 : */
26 : template <size_t Dim>
27 1 : struct TimeDerivative {
28 0 : using temporary_tags = tmpl::list<Tags::ConstraintGamma2>;
29 0 : using argument_tags =
30 : tmpl::list<Tags::Pi, Tags::Phi<Dim>, Tags::ConstraintGamma2>;
31 :
32 0 : static evolution::dg::TimeDerivativeDecisions<Dim> apply(
33 : // Time derivatives returned by reference. All the tags in the
34 : // variables_tag in the system struct.
35 : gsl::not_null<Scalar<DataVector>*> dt_psi,
36 : gsl::not_null<Scalar<DataVector>*> dt_pi,
37 : gsl::not_null<tnsr::i<DataVector, Dim, Frame::Inertial>*> dt_phi,
38 :
39 : gsl::not_null<Scalar<DataVector>*> result_gamma2,
40 :
41 : // Partial derivative arguments. Listed in the system struct as
42 : // gradient_variables.
43 : const tnsr::i<DataVector, Dim, Frame::Inertial>& d_psi,
44 : const tnsr::i<DataVector, Dim, Frame::Inertial>& d_pi,
45 : const tnsr::ij<DataVector, Dim, Frame::Inertial>& d_phi,
46 :
47 : // Terms list in argument_tags above
48 : const Scalar<DataVector>& pi,
49 : const tnsr::i<DataVector, Dim, Frame::Inertial>& phi,
50 : const Scalar<DataVector>& gamma2);
51 : };
52 : } // namespace ScalarWave
|