SpECTRE Documentation Coverage Report
Current view: top level - Parallel/ArrayCollection - SpawnInitializeElementsInCollection.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 33.3 % 3 1
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 "DataStructures/DataBox/DataBox.hpp"
       7              : #include "Domain/Structure/ElementId.hpp"
       8              : #include "Parallel/AlgorithmExecution.hpp"
       9              : #include "Parallel/ArrayCollection/ReceiveDataForElement.hpp"
      10              : #include "Parallel/ArrayCollection/Tags/ElementCollection.hpp"
      11              : #include "Parallel/GlobalCache.hpp"
      12              : 
      13              : namespace Parallel::Actions {
      14              : /*!
      15              :  * \brief Reduction target that is called after all nodes have successfully
      16              :  * initialized the nodegroup portion of the `DgElementCollection`. This spawns
      17              :  * the messages that initialize the `DgElementArrayMember`s
      18              :  */
      19            1 : struct SpawnInitializeElementsInCollection {
      20              :   template <typename ParallelComponent, typename DbTagsList,
      21              :             typename Metavariables, typename ArrayIndex,
      22              :             typename DataBox = db::DataBox<DbTagsList>>
      23            0 :   static void apply(db::DataBox<DbTagsList>& box,
      24              :                     Parallel::GlobalCache<Metavariables>& cache,
      25              :                     const ArrayIndex& /*array_index*/,
      26              :                     const double /*unused_but_we_needed_to_reduce_something*/) {
      27              :     auto my_proxy = Parallel::get_parallel_component<ParallelComponent>(
      28              :         cache)[Parallel::my_node<size_t>(cache)];
      29              :     db::mutate<typename ParallelComponent::element_collection_tag>(
      30              :         [&my_proxy](const auto element_collection_ptr) {
      31              :           for (auto& [element_id, element] : *element_collection_ptr) {
      32              :             Parallel::threaded_action<ReceiveDataForElement<true>>(my_proxy,
      33              :                                                                    element_id);
      34              :           }
      35              :         },
      36              :         make_not_null(&box));
      37              :   }
      38              : };
      39              : }  // namespace Parallel::Actions
        

Generated by: LCOV version 2.0-1