-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for runtime element distribution
- Loading branch information
Showing
68 changed files
with
393 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Distributed under the MIT License. | ||
// See LICENSE.txt for details. | ||
|
||
#pragma once | ||
|
||
#include <cstddef> | ||
#include <memory> | ||
#include <optional> | ||
|
||
#include "DataStructures/DataBox/Tag.hpp" | ||
#include "Domain/Domain.hpp" | ||
#include "Domain/ElementDistribution.hpp" | ||
#include "Options/Auto.hpp" | ||
#include "Options/String.hpp" | ||
#include "Utilities/TMPL.hpp" | ||
|
||
namespace domain { | ||
namespace OptionTags { | ||
/// \ingroup OptionTagsGroup | ||
/// \ingroup ComputationalDomainGroup | ||
struct ElementDistribution { | ||
struct RoundRobin {}; | ||
using type = Options::Auto<ElementWeight, RoundRobin>; | ||
static constexpr Options::String help = { | ||
"Weighting pattern to use for ZCurve element distribution. Specify " | ||
"RoundRobin to just place each element on the next core."}; | ||
}; | ||
} // namespace OptionTags | ||
|
||
namespace Tags { | ||
struct ElementDistribution : db::SimpleTag { | ||
using type = std::optional<ElementWeight>; | ||
using option_tags = tmpl::list<OptionTags::ElementDistribution>; | ||
|
||
static constexpr bool pass_metavariables = false; | ||
static type create_from_options(const type& element_distribution) { | ||
return element_distribution; | ||
} | ||
}; | ||
} // namespace Tags | ||
} // namespace domain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.