SpECTRE Documentation Coverage Report
Current view: top level - Domain/Tags - ElementDistribution.hpp Hit Total Coverage
Commit: 47355bc26b45b897defe322cc093c7b7b3155e93 Lines: 1 11 9.1 %
Date: 2024-05-04 22:40:33
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 <memory>
       8             : #include <optional>
       9             : 
      10             : #include "DataStructures/DataBox/Tag.hpp"
      11             : #include "Domain/Domain.hpp"
      12             : #include "Domain/ElementDistribution.hpp"
      13             : #include "Options/Auto.hpp"
      14             : #include "Options/String.hpp"
      15             : #include "Utilities/TMPL.hpp"
      16             : 
      17             : /// \cond
      18             : namespace Parallel::OptionTags {
      19             : struct Parallelization;
      20             : }  // namespace Parallel::OptionTags
      21             : /// \endcond
      22             : 
      23             : namespace domain {
      24             : namespace OptionTags {
      25             : /// \ingroup OptionTagsGroup
      26             : /// \ingroup ComputationalDomainGroup
      27           0 : struct ElementDistribution {
      28           0 :   struct RoundRobin {};
      29           0 :   using type = Options::Auto<ElementWeight, RoundRobin>;
      30           0 :   static constexpr Options::String help = {
      31             :       "Weighting pattern to use for ZCurve element distribution. Specify "
      32             :       "RoundRobin to just place each element on the next core."};
      33           0 :   using group = Parallel::OptionTags::Parallelization;
      34             : };
      35             : }  // namespace OptionTags
      36             : 
      37             : namespace Tags {
      38             : /// \ingroup DataBoxTagsGroup
      39             : /// \ingroup ComputationalDomainGroup
      40             : /// Tag that holds method for how to distribute the elements on the given
      41             : /// resources.
      42             : ///
      43             : /// \note When not using local time stepping (LTS), a user cannot choose the
      44             : /// NumGridPointsAndGridSpacing element distribution because grid spacing does
      45             : /// not affect the computational cost at all. Therefore, if a user does choose
      46             : /// NumGridPointsAndGridSpacing when not using LTS, an error will occur.
      47           1 : struct ElementDistribution : db::SimpleTag {
      48           0 :   using type = std::optional<ElementWeight>;
      49           0 :   using option_tags = tmpl::list<OptionTags::ElementDistribution>;
      50             : 
      51           0 :   static constexpr bool pass_metavariables = false;
      52           0 :   static type create_from_options(const type& element_distribution) {
      53             :     return element_distribution;
      54             :   }
      55             : };
      56             : }  // namespace Tags
      57             : }  // namespace domain

Generated by: LCOV version 1.14