Characteristics.hpp
2 // See LICENSE.txt for details.
3
4 #pragma once
5
6 #include <array>
7 #include <cstddef>
8
10
11 /// \cond
12 class DataVector;
13 /// \endcond
14
15 // IWYU pragma: no_forward_declare Tensor
16
17 namespace NewtonianEuler {
18
19 /*!
20  * \brief Compute the characteristic speeds of NewtonianEuler system
21  *
22  * The principal symbol of the system is diagonalized so that the elements of
23  * the diagonal matrix are the characteristic speeds
24  *
25  * \f{align*}
26  * \lambda_1 &= v_n - c_s,\\
27  * \lambda_{i + 1} &= v_n,\\
28  * \lambda_{\text{Dim} + 2} &= v_n + c_s,
29  * \f}
30  *
31  * where \f$i = 1,...,\text{Dim}\f$,
32  * \f$v_n = n_i v^i\f$ is the velocity projected onto the normal,
33  * and \f$c_s\f$ is the sound speed.
34  */
35 template <size_t Dim>
37  const tnsr::I<DataVector, Dim>& velocity,
38  const Scalar<DataVector>& sound_speed_squared,
39  const tnsr::i<DataVector, Dim>& normal) noexcept;
40
41 } // namespace NewtonianEuler
void velocity(gsl::not_null< tnsr::I< DataType, Dim > *> velocity, const Scalar< DataType > &mass_density, const tnsr::I< DataType, Dim > &momentum_density) noexcept
Compute the velocity from the conservative variables.
Defines a list of useful type aliases for tensors.
Stores a collection of function values.
Definition: DataVector.hpp:46
Tensor< T, Symmetry<>, index_list<> > Scalar
Scalar type.
Definition: TypeAliases.hpp:21
std::array< DataVector, Dim+2 > characteristic_speeds(const tnsr::I< DataVector, Dim > &velocity, const Scalar< DataVector > &sound_speed_squared, const tnsr::i< DataVector, Dim > &normal) noexcept
Compute the characteristic speeds of NewtonianEuler system.
Items related to evolving the Newtonian Euler system.
Definition: Characteristics.hpp:17