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 :
8 : /// \cond
9 : class DataVector;
10 : namespace gsl {
11 : template <typename>
12 : struct not_null;
13 : } // namespace gsl
14 : /// \endcond
15 :
16 : namespace gr::surfaces {
17 : /// @{
18 : /// \ingroup SurfacesGroup
19 : /// \brief Computes 3-covariant gradient \f$D_i S_j\f$ of a
20 : /// Strahlkorper's normal.
21 : ///
22 : /// \details See Eqs. (1--9) of \cite Baumgarte1996hh.
23 : /// Here \f$S_j\f$ is the (normalized) unit one-form to the surface,
24 : /// and \f$D_i\f$ is the spatial covariant derivative. Note that this
25 : /// object is symmetric, even though this is not obvious from the
26 : /// definition. The input arguments `r_hat`, `radius`, and
27 : /// `d2x_radius` depend on the Strahlkorper but not on the metric, and
28 : /// can be computed from a Strahlkorper using ComputeItems in
29 : /// `ylm::Tags`. The input argument
30 : /// `one_over_one_form_magnitude` is \f$1/\sqrt{g^{ij}n_i n_j}\f$,
31 : /// where \f$n_i\f$ is `ylm::Tags::NormalOneForm` (i.e. the
32 : /// unnormalized one-form to the Strahlkorper); it can be computed
33 : /// using (one over) the `magnitude` function. The input argument
34 : /// `unit_normal_one_form` is \f$S_j\f$,the normalized one-form.
35 : template <typename Frame>
36 1 : void grad_unit_normal_one_form(
37 : gsl::not_null<tnsr::ii<DataVector, 3, Frame>*> result,
38 : const tnsr::i<DataVector, 3, Frame>& r_hat,
39 : const Scalar<DataVector>& radius,
40 : const tnsr::i<DataVector, 3, Frame>& unit_normal_one_form,
41 : const tnsr::ii<DataVector, 3, Frame>& d2x_radius,
42 : const DataVector& one_over_one_form_magnitude,
43 : const tnsr::Ijj<DataVector, 3, Frame>& christoffel_2nd_kind);
44 :
45 : template <typename Frame>
46 1 : tnsr::ii<DataVector, 3, Frame> grad_unit_normal_one_form(
47 : const tnsr::i<DataVector, 3, Frame>& r_hat,
48 : const Scalar<DataVector>& radius,
49 : const tnsr::i<DataVector, 3, Frame>& unit_normal_one_form,
50 : const tnsr::ii<DataVector, 3, Frame>& d2x_radius,
51 : const DataVector& one_over_one_form_magnitude,
52 : const tnsr::Ijj<DataVector, 3, Frame>& christoffel_2nd_kind);
53 : /// @}
54 : } // namespace gr::surfaces
|