SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Hydro - TransportVelocity.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 2 7 28.6 %
Date: 2025-12-05 05:03:31
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <cstddef>
       7             : 
       8             : #include "DataStructures/DataBox/Tag.hpp"
       9             : #include "DataStructures/Tensor/TypeAliases.hpp"
      10             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      11             : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
      12             : #include "PointwiseFunctions/Hydro/Tags.hpp"
      13             : 
      14             : /// \cond
      15             : namespace gsl {
      16             : template <typename>
      17             : struct not_null;
      18             : }  // namespace gsl
      19             : /// \endcond
      20             : 
      21             : namespace hydro {
      22             : 
      23             : /// \brief Function computing the transport velocity.
      24             : ///
      25             : /// Computes the transport velocity, using
      26             : /// \f$v_t^i=\alpha v^i-\beta^i\f$, with
      27             : /// $v^i$ being the spatial velocity, $\alpha$ the lapse, and
      28             : /// $\beta^i$ the shift.
      29             : template <typename DataType, size_t Dim, typename Fr = Frame::Inertial>
      30           1 : void transport_velocity(gsl::not_null<tnsr::I<DataType, Dim, Fr>*> result,
      31             :                         const tnsr::I<DataType, Dim, Fr>& spatial_velocity,
      32             :                         const Scalar<DataType>& lapse,
      33             :                         const tnsr::I<DataType, Dim, Fr>& shift);
      34             : 
      35             : namespace Tags {
      36             : /// \brief Compute tag for the transport velocity.
      37             : ///
      38             : /// Compute item for the transport velocity, using
      39             : /// \f$v_t^i=\alpha v^i-\beta^i\f$, with
      40             : /// $v^i$ being the spatial velocity, $\alpha$ the lapse, and
      41             : /// $\beta^i$ the shift.
      42             : template <typename DataType, size_t Dim, typename Fr = Frame::Inertial>
      43           1 : struct TransportVelocityCompute
      44             :     : hydro::Tags::TransportVelocity<DataType, Dim, Fr>,
      45             :       db::ComputeTag {
      46           0 :   using argument_tags =
      47             :       tmpl::list<SpatialVelocity<DataType, Dim, Fr>,
      48             :                  ::gr::Tags::Lapse<DataType>,
      49             :                  ::gr::Tags::Shift<DataType, Dim, Fr>>;
      50             : 
      51           0 :   using base = hydro::Tags::TransportVelocity<DataType, Dim, Fr>;
      52           0 :   using return_type = typename base::type;
      53             : 
      54           0 :   static constexpr auto function = static_cast<void (*)(
      55             :       const gsl::not_null<tnsr::I<DataType, Dim, Fr>*> result,
      56             :       const tnsr::I<DataType, Dim, Fr>& spatial_velocity,
      57             :       const Scalar<DataType>& lapse, const tnsr::I<DataType, Dim, Fr>& shift)>(
      58             :       &hydro::transport_velocity<DataType, Dim, Fr>);
      59             : };
      60             : 
      61             : }  // namespace Tags
      62             : 
      63             : }  // namespace hydro

Generated by: LCOV version 1.14