InterfaceNullNormal.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
9 
10 /// \cond
11 namespace gsl {
12 template <typename>
13 struct not_null;
14 } // namespace gsl
15 /// \endcond
16 
17 namespace gr {
18 // @{
19 /*!
20  * \ingroup GeneralRelativityGroup
21  * \brief Compute null normal one-form to the boundary of a closed
22  * region in a spatial slice of spacetime.
23  *
24  * \details Consider an \f$n-1\f$-dimensional boundary \f$S\f$ of a closed
25  * region in an \f$n\f$-dimensional spatial hypersurface \f$\Sigma\f$. Let
26  * \f$s^a\f$ be the unit spacelike vector orthogonal to \f$S\f$ in \f$\Sigma\f$,
27  * and \f$n^a\f$ be the timelike unit vector orthogonal to \f$\Sigma\f$.
28  * This function returns the null one-form that is outgoing/incoming on \f$S\f$:
29  *
30  * \f{align*}
31  * k_a = \frac{1}{\sqrt{2}}\left(n_a \pm s_a\right).
32  * \f}
33  */
34 template <size_t VolumeDim, typename Frame, typename DataType>
35 tnsr::a<DataType, VolumeDim, Frame> interface_null_normal(
36  const tnsr::a<DataType, VolumeDim, Frame>& spacetime_normal_one_form,
37  const tnsr::i<DataType, VolumeDim, Frame>& interface_unit_normal_one_form,
38  const double sign) noexcept;
39 
40 template <size_t VolumeDim, typename Frame, typename DataType>
42  gsl::not_null<tnsr::a<DataType, VolumeDim, Frame>*> null_one_form,
43  const tnsr::a<DataType, VolumeDim, Frame>& spacetime_normal_one_form,
44  const tnsr::i<DataType, VolumeDim, Frame>& interface_unit_normal_one_form,
45  const double sign) noexcept;
46 // @}
47 
48 // @{
49 /*!
50  * \ingroup GeneralRelativityGroup
51  * \brief Compute null normal vector to the boundary of a closed
52  * region in a spatial slice of spacetime.
53  *
54  * \details Consider an \f$n-1\f$-dimensional boundary \f$S\f$ of a closed
55  * region in an \f$n\f$-dimensional spatial hypersurface \f$\Sigma\f$. Let
56  * \f$s^a\f$ be the unit spacelike vector orthogonal to \f$S\f$ in \f$\Sigma\f$,
57  * and \f$n^a\f$ be the timelike unit vector orthogonal to \f$\Sigma\f$.
58  * This function returns the null vector that is outgoing/ingoing on \f$S\f$:
59  *
60  * \f{align*}
61  * k^a = \frac{1}{\sqrt{2}}\left(n^a \pm s^a\right).
62  * \f}
63  */
64 template <size_t VolumeDim, typename Frame, typename DataType>
65 tnsr::A<DataType, VolumeDim, Frame> interface_null_normal(
66  const tnsr::A<DataType, VolumeDim, Frame>& spacetime_normal_vector,
67  const tnsr::I<DataType, VolumeDim, Frame>& interface_unit_normal_vector,
68  const double sign) noexcept;
69 
70 template <size_t VolumeDim, typename Frame, typename DataType>
72  gsl::not_null<tnsr::A<DataType, VolumeDim, Frame>*> null_vector,
73  const tnsr::A<DataType, VolumeDim, Frame>& spacetime_normal_vector,
74  const tnsr::I<DataType, VolumeDim, Frame>& interface_unit_normal_vector,
75  const double sign) noexcept;
76 // @}
77 } // namespace gr
gr::interface_null_normal
tnsr::a< DataType, VolumeDim, Frame > interface_null_normal(const tnsr::a< DataType, VolumeDim, Frame > &spacetime_normal_one_form, const tnsr::i< DataType, VolumeDim, Frame > &interface_unit_normal_one_form, const double sign) noexcept
Compute null normal one-form to the boundary of a closed region in a spatial slice of spacetime.
gr::spacetime_normal_one_form
void spacetime_normal_one_form(gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > normal_one_form, const Scalar< DataType > &lapse) noexcept
Computes spacetime normal one-form from lapse.
cstddef
TypeAliases.hpp
gr
Definition: GaugeWave.hpp:27
gsl
Implementations from the Guideline Support Library.
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:11
gr::spacetime_normal_vector
tnsr::A< DataType, SpatialDim, Frame > spacetime_normal_vector(const Scalar< DataType > &lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift) noexcept
Computes spacetime normal vector from lapse and shift.
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:13