SpECTRE  v2026.06.30
Loading...
Searching...
No Matches
Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions > Class Template Reference

Public Types

using ParallelComponent
using all_actions_list
 List of Actions in the order that generates the DataBox types.
using metavariables = Metavariables
 The metavariables class passed to the Algorithm.
using inbox_tags_list = Parallel::get_inbox_tags<all_actions_list>
 List of all the Tags that can be received into the Inbox.
using phase_dependent_action_lists = tmpl::list<PhaseDepActionListsPack...>
using all_cache_tags = get_const_global_cache_tags<metavariables>
using databox_type
using inbox_type = tuples::tagged_tuple_from_typelist<inbox_tags_list>

Public Member Functions

template<class... InitializationTags>
 DgElementArrayMember (const Parallel::CProxy_GlobalCache< Metavariables > &global_cache_proxy, tuples::TaggedTuple< InitializationTags... > initialization_items, ElementId< Dim > element_id)
void start_phase (Parallel::Phase next_phase, bool force=false) override
 Start execution of the phase-dependent action list in next_phase. If next_phase has already been visited, execution will resume at the point where the previous execution of the same phase left off.
const auto & databox () const
void perform_algorithm () override
 Start evaluating the algorithm until it is stopped by an action.
template<typename ThisAction, typename PhaseIndex, typename DataBoxIndex>
bool invoke_iterable_action ()
template<typename Action, typename... Args>
void simple_action (Args &&... args)
 Invokes a simple action on the element.
std::string print_types () const override
 Print the expanded type aliases.
std::string print_inbox () const override
 Print the current contents of the inboxes.
std::string print_databox () const override
 Print the current contents of the DataBox.
void pup (PUP::er &p) override
auto & inboxes ()
 Get read access to all the inboxes.
const auto & inboxes () const
 Get read access to all the inboxes.
const auto & get_inboxes () const
 Get read access to all the inboxes.
Public Member Functions inherited from Parallel::DgElementArrayMemberBase< Dim >
 DgElementArrayMemberBase (const DgElementArrayMemberBase &)=default
DgElementArrayMemberBaseoperator= (const DgElementArrayMemberBase &)=default
 DgElementArrayMemberBase (DgElementArrayMemberBase &&)=default
DgElementArrayMemberBaseoperator= (DgElementArrayMemberBase &&)=default
 WRAPPED_PUPable_abstract (DgElementArrayMemberBase)
 DgElementArrayMemberBase (CkMigrateMessage *msg)
Parallel::Phase phase () const
 Get the current phase.
void set_terminate (gsl::not_null< size_t * > number_of_elements_terminated, gsl::not_null< Parallel::NodeLock * > nodegroup_lock, bool terminate)
 Tell the Algorithm it should no longer execute the algorithm. This does not mean that the execution of the program is terminated, but only that the algorithm has terminated. An algorithm can be restarted by passing true as the second argument to the receive_data method or by calling perform_algorithm(true).
bool get_terminate () const
 Check if an algorithm should continue being evaluated.
size_t algorithm_step () const
 The zero-indexed step in the algorithm.
std::string print_state () const
 Print the current state of the algorithm.
Parallel::NodeLockinbox_lock ()
 The inbox_lock() only locks the inbox, nothing else. The inbox is unsafe to access without this lock.
Parallel::NodeLockelement_lock ()
 Locks the element, except for the inbox, which is guarded by the inbox_lock().
void set_core (size_t core)
 Set which core this element should pretend to be bound to.
size_t get_core () const
 Get which core this element should pretend to be bound to.
const std::stringdeadlock_analysis_next_iterable_action () const
 Returns the name of the last "next iterable action" to be run before a deadlock occurred.
void pup (PUP::er &p) override

Additional Inherited Members

Protected Member Functions inherited from Parallel::DgElementArrayMemberBase< Dim >
 DgElementArrayMemberBase (ElementId< Dim > element_id, size_t node_number)
Protected Attributes inherited from Parallel::DgElementArrayMemberBase< Dim >
Parallel::NodeLock inbox_lock_ {}
Parallel::NodeLock element_lock_ {}
bool performing_action_ = false
Parallel::Phase phase_ {Parallel::Phase::Initialization}
std::unordered_map< Parallel::Phase, size_t > phase_bookmarks_ {}
std::size_t algorithm_step_ = 0
bool terminate_ {true}
bool halt_algorithm_until_next_phase_ {false}
std::string deadlock_analysis_next_iterable_action_ {}
ElementId< Dim > element_id_
size_t my_node_ {std::numeric_limits<size_t>::max()}
size_t my_core_ {std::numeric_limits<size_t>::max()}

Member Typedef Documentation

◆ all_actions_list

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
using Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::all_actions_list
Initial value:
tmpl::flatten<
tmpl::list<typename PhaseDepActionListsPack::action_list...>>

List of Actions in the order that generates the DataBox types.

◆ databox_type

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
using Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::databox_type
Initial value:
db::compute_databox_type<tmpl::flatten<tmpl::list<
Tags::GlobalCacheProxy<metavariables>, SimpleTagsFromOptions,
Algorithm_detail::get_pdal_simple_tags<phase_dependent_action_lists>,
Algorithm_detail::get_pdal_compute_tags<phase_dependent_action_lists>>>>
typename detail::compute_dbox_type< TagList >::type compute_databox_type
Returns the type of the DataBox that would be constructed from the TagList of tags.
Definition DataBox.hpp:1434
tmpl::transform< TagList, tmpl::bind< Wrapper, tmpl::_1, tmpl::pin< Args >... > > wrap_tags_in
Create a new tmpl::list of tags by wrapping each tag in TagList in Wrapper<_, Args....
Definition PrefixHelpers.hpp:35
Tag to retrieve the ArrayIndex from the DataBox.
Definition ArrayIndex.hpp:13
Definition GlobalCache.hpp:994
Definition GlobalCache.hpp:981
Tag to insert Metavars into the DataBox.
Definition MetavariablesTag.hpp:25
Definition GlobalCache.hpp:1023

◆ ParallelComponent

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
using Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::ParallelComponent
Initial value:
DgElementCollection<Dim, Metavariables,
tmpl::list<PhaseDepActionListsPack...>>
A collection of DG elements on a node.
Definition DgElementCollection.hpp:32

Member Function Documentation

◆ perform_algorithm()

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
void Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::perform_algorithm ( )
overridevirtual

Start evaluating the algorithm until it is stopped by an action.

Implements Parallel::DgElementArrayMemberBase< Dim >.

◆ print_databox()

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
std::string Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::print_databox ( ) const
overridevirtual

Print the current contents of the DataBox.

Implements Parallel::DgElementArrayMemberBase< Dim >.

◆ print_inbox()

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
std::string Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::print_inbox ( ) const
overridevirtual

Print the current contents of the inboxes.

Implements Parallel::DgElementArrayMemberBase< Dim >.

◆ print_types()

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
std::string Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::print_types ( ) const
overridevirtual

Print the expanded type aliases.

Implements Parallel::DgElementArrayMemberBase< Dim >.

◆ simple_action()

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
template<typename Action, typename... Args>
void Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::simple_action ( Args &&... args)
inline

Invokes a simple action on the element.

Note
This does not lock the element. It is up to the calling action to lock the element if needed.

◆ start_phase()

template<size_t Dim, typename Metavariables, typename... PhaseDepActionListsPack, typename SimpleTagsFromOptions>
void Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions >::start_phase ( Parallel::Phase next_phase,
bool force = false )
overridevirtual

Start execution of the phase-dependent action list in next_phase. If next_phase has already been visited, execution will resume at the point where the previous execution of the same phase left off.

If force is true, then regardless of how this component terminated (error or deadlock), it will resume.

Warning
Don't set force to true unless you are absolutely sure you want to. This can have very unintended consequences if used incorrectly.

Implements Parallel::DgElementArrayMemberBase< Dim >.


The documentation for this class was generated from the following file:
  • src/Parallel/ArrayCollection/DgElementArrayMember.hpp