Characteristics.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include "DataStructures/DataVector.hpp"
7 #include "Evolution/Systems/ScalarAdvection/Tags.hpp"
8 #include "Utilities/Gsl.hpp"
9 #include "Utilities/TMPL.hpp"
10 
11 namespace ScalarAdvection {
12 namespace Tags {
13 /*!
14  * \brief Compute the largest characteristic speed of the ScalarAdvection system
15  *
16  * \f{align*}
17  * \lambda_\text{maxabs} = \sqrt{v^iv_i}
18  * \f}
19  *
20  * where \f$v^i\f$ is the velocity field.
21  */
22 template <size_t Dim>
25  using argument_tags = tmpl::list<Tags::VelocityField<Dim>>;
26  using return_type = double;
28  static void function(const gsl::not_null<double*> speed,
29  const tnsr::I<DataVector, Dim>& velocity_field) noexcept;
30 };
31 } // namespace Tags
32 } // namespace ScalarAdvection
db::ComputeTag
Mark a struct as a compute tag by inheriting from this.
Definition: Tag.hpp:157
ScalarAdvection::Tags::LargestCharacteristicSpeed
The largest characteristic speed.
Definition: Tags.hpp:29
ScalarAdvection::Tags::LargestCharacteristicSpeedCompute
Compute the largest characteristic speed of the ScalarAdvection system.
Definition: Characteristics.hpp:23
Gsl.hpp
ScalarAdvection
Items related to evolving the scalar advection equation.
Definition: BoundaryCondition.hpp:13
TMPL.hpp
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecPiecewisePolynomial.hpp:13