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 "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Gauges.hpp"
8 : #include "Utilities/Gsl.hpp"
9 :
10 : /// \cond
11 : class DataVector;
12 : template <size_t Dim>
13 : class Mesh;
14 : /// \endcond
15 :
16 : namespace gh::gauges {
17 : /*!
18 : * \brief Dispatch to the derived gauge condition.
19 : *
20 : * Which of the arguments to this function are used will depend on the gauge
21 : * condition, but since that is a runtime choice we need support for all gauge
22 : * conditions.
23 : */
24 : template <size_t Dim>
25 1 : void dispatch(
26 : gsl::not_null<tnsr::a<DataVector, Dim, Frame::Inertial>*> gauge_h,
27 : gsl::not_null<tnsr::ab<DataVector, Dim, Frame::Inertial>*> d4_gauge_h,
28 : const Scalar<DataVector>& lapse,
29 : const tnsr::I<DataVector, Dim, Frame::Inertial>& shift,
30 : const tnsr::a<DataVector, Dim, Frame::Inertial>&
31 : spacetime_unit_normal_one_form,
32 : const tnsr::A<DataVector, Dim, Frame::Inertial>& spacetime_unit_normal,
33 : const Scalar<DataVector>& sqrt_det_spatial_metric,
34 : const tnsr::II<DataVector, Dim, Frame::Inertial>& inverse_spatial_metric,
35 : const tnsr::abb<DataVector, Dim, Frame::Inertial>& d4_spacetime_metric,
36 : const Scalar<DataVector>& half_pi_two_normals,
37 : const tnsr::i<DataVector, Dim, Frame::Inertial>& half_phi_two_normals,
38 : const tnsr::aa<DataVector, Dim, Frame::Inertial>& spacetime_metric,
39 : const tnsr::aa<DataVector, Dim, Frame::Inertial>& pi,
40 : const tnsr::iaa<DataVector, Dim, Frame::Inertial>& phi,
41 : const Mesh<Dim>& mesh, double time,
42 : const tnsr::I<DataVector, Dim, Frame::Inertial>& inertial_coords,
43 : const InverseJacobian<DataVector, Dim, Frame::ElementLogical,
44 : Frame::Inertial>& inverse_jacobian,
45 : const GaugeCondition& gauge_condition);
46 : } // namespace gh::gauges
|