SpECTRE Documentation Coverage Report
Current view: top level - Domain - MinimumGridSpacing.hpp Hit Total Coverage
Commit: 12933c37c29592794b4d714547da3f7d3180e6a7 Lines: 2 9 22.2 %
Date: 2024-05-23 18:22:16
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             : #include <string>
       8             : 
       9             : #include "DataStructures/DataBox/Tag.hpp"
      10             : #include "DataStructures/Tensor/TypeAliases.hpp"
      11             : #include "Domain/Tags.hpp"  // IWYU pragma: keep
      12             : #include "Utilities/Gsl.hpp"
      13             : #include "Utilities/TMPL.hpp"
      14             : 
      15             : /// \cond
      16             : class DataVector;
      17             : template <size_t Dim>
      18             : class Index;
      19             : template <size_t Dim>
      20             : class Mesh;
      21             : /// \endcond
      22             : 
      23             : /// \ingroup ComputationalDomainGroup
      24             : /// Finds the minimum coordinate distance between grid points.
      25             : template <size_t Dim, typename Frame>
      26           1 : double minimum_grid_spacing(const Index<Dim>& extents,
      27             :                             const tnsr::I<DataVector, Dim, Frame>& coords);
      28             : 
      29             : namespace domain {
      30             : namespace Tags {
      31             : /// @{
      32             : /// \ingroup ComputationalDomainGroup
      33             : /// \ingroup DataBoxTagsGroup
      34             : /// The minimum coordinate distance between grid points.
      35             : template <size_t Dim, typename Frame>
      36           1 : struct MinimumGridSpacing : db::SimpleTag {
      37           0 :   using type = double;
      38             : };
      39             : 
      40             : template <size_t Dim, typename Frame>
      41           0 : struct MinimumGridSpacingCompute : MinimumGridSpacing<Dim, Frame>,
      42             :                                    db::ComputeTag {
      43           0 :   using base = MinimumGridSpacing<Dim, Frame>;
      44           0 :   using return_type = double;
      45           0 :   static void function(const gsl::not_null<double*> result,
      46             :                        const ::Mesh<Dim>& mesh,
      47             :                        const tnsr::I<DataVector, Dim, Frame>& coordinates) {
      48             :     *result = minimum_grid_spacing(mesh.extents(), coordinates);
      49             :   }
      50           0 :   using argument_tags = tmpl::list<Mesh<Dim>, Coordinates<Dim, Frame>>;
      51             : };
      52             : /// @}
      53             : }  // namespace Tags
      54             : }  // namespace domain

Generated by: LCOV version 1.14