SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Particles/MonteCarlo - MortarData.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 25.0 % 16 4
Test Date: 2026-10-22 17:29:42
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 <optional>
       7              : 
       8              : #include "DataStructures/DataBox/Tag.hpp"
       9              : #include "DataStructures/Tensor/TypeAliases.hpp"
      10              : #include "Domain/Structure/DirectionalIdMap.hpp"
      11              : 
      12              : /// \cond
      13              : class DataVector;
      14              : /// \endcond
      15              : 
      16              : namespace Particles::MonteCarlo {
      17              : 
      18              : /// Structure used to gather ghost zone data for Monte-Carlo evolution.
      19              : /// We need the rest mass density, electron fraction, temperature, and
      20              : /// an estimate of the light-crossing time one cell deep within each
      21              : /// neighboring element.
      22              : template <size_t Dim>
      23            1 : struct MortarData {
      24            0 :   DirectionalIdMap<Dim, std::optional<DataVector>> rest_mass_density{};
      25            0 :   DirectionalIdMap<Dim, std::optional<DataVector>> electron_fraction{};
      26            0 :   DirectionalIdMap<Dim, std::optional<DataVector>> temperature{};
      27            0 :   DirectionalIdMap<Dim, std::optional<DataVector>> cell_light_crossing_time{};
      28              : 
      29            0 :   void pup(PUP::er& p) {
      30              :     p | rest_mass_density;
      31              :     p | electron_fraction;
      32              :     p | temperature;
      33              :     p | cell_light_crossing_time;
      34              :   }
      35              : };
      36              : 
      37              : /// Structure used to gather fluid coupling data for Monte-Carlo evolution.
      38              : /// We need the energy, momentum, and composition coupling
      39              : template <size_t Dim>
      40            1 : struct GhostZoneCouplingData {
      41            0 :   DirectionalIdMap<Dim, std::optional<DataVector>> coupling_tilde_tau{};
      42            0 :   DirectionalIdMap<Dim, std::optional<DataVector>> coupling_tilde_rho_ye{};
      43              :   DirectionalIdMap<Dim,
      44              :                    std::optional<tnsr::i<DataVector, Dim, Frame::Inertial>>>
      45            0 :       coupling_tilde_s{};
      46              : 
      47            0 :   void pup(PUP::er& p) {
      48              :     p | coupling_tilde_tau;
      49              :     p | coupling_tilde_rho_ye;
      50              :     p | coupling_tilde_s;
      51              :   }
      52              : };
      53              : 
      54              : namespace Tags {
      55              : 
      56              : /// Simple tag containing the fluid and metric data in the ghost zones
      57              : /// for Monte-Carlo packets evolution.
      58              : template <size_t Dim>
      59            1 : struct MortarDataTag : db::SimpleTag {
      60            0 :   using type = MortarData<Dim>;
      61              : };
      62              : 
      63              : /// Simple tag containing the coupling data in the ghost zones
      64              : /// for Monte-Carlo packets evolution.
      65              : template <size_t Dim>
      66            1 : struct GhostZoneCouplingDataTag : db::SimpleTag {
      67            0 :   using type = GhostZoneCouplingData<Dim>;
      68              : };
      69              : 
      70              : }  // namespace Tags
      71              : 
      72              : }  // namespace Particles::MonteCarlo
        

Generated by: LCOV version 2.0-1