RandomUnitNormal.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <random>
7 
9 
10 /// \cond
11 namespace gsl {
12 template <typename T>
13 class not_null;
14 } // namespace gsl
15 /// \endcond
16 
17 /// \ingroup TestingFrameworkGroup
18 /// \brief Make a random unit normal vector at each element of `DataType`.
19 template <typename DataType>
20 tnsr::I<DataType, 1> random_unit_normal(
22  const tnsr::ii<DataType, 1>& spatial_metric) noexcept;
23 
24 template <typename DataType>
25 tnsr::I<DataType, 2> random_unit_normal(
27  const tnsr::ii<DataType, 2>& spatial_metric) noexcept;
28 
29 template <typename DataType>
30 tnsr::I<DataType, 3> random_unit_normal(
32  const tnsr::ii<DataType, 3>& spatial_metric) noexcept;
Implementations from the Guideline Support Library.
Definition: ConservativeFromPrimitive.hpp:10
tnsr::ii< DataType, SpatialDim, Frame > spatial_metric(const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) noexcept
Compute spatial metric from spacetime metric.
Definition: ComputeSpacetimeQuantities.cpp:43
Defines a list of useful type aliases for tensors.
tnsr::I< DataType, 1 > random_unit_normal(gsl::not_null< std::mt19937 *> generator, const tnsr::ii< DataType, 1 > &spatial_metric) noexcept
Make a random unit normal vector at each element of DataType.
Require a pointer to not be a nullptr
Definition: ConservativeFromPrimitive.hpp:12