SpECTRE  v2024.08.03
Parallel::DgElementArrayMember< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... >, SimpleTagsFromOptions > Class Template Reference

Public Types

using ParallelComponent = DgElementCollection< Dim, Metavariables, tmpl::list< PhaseDepActionListsPack... > >
 
using all_actions_list = tmpl::flatten< tmpl::list< typename PhaseDepActionListsPack::action_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 = db::compute_databox_type< tmpl::flatten< tmpl::list< Tags::MetavariablesImpl< metavariables >, Tags::ArrayIndexImpl< ElementId< Dim > >, Tags::GlobalCacheProxy< metavariables >, SimpleTagsFromOptions, Tags::GlobalCacheImplCompute< metavariables >, Tags::ResourceInfoReference< metavariables >, db::wrap_tags_in< Tags::FromGlobalCache, all_cache_tags >, Algorithm_detail::get_pdal_simple_tags< phase_dependent_action_lists >, Algorithm_detail::get_pdal_compute_tags< phase_dependent_action_lists > > > >
 
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) 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. More...
 
const auto & databox () const
 
void perform_algorithm () override
 Start evaluating the algorithm until it is stopped by an action. More...
 
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. More...
 
std::string print_types () const override
 Print the expanded type aliases. More...
 
std::string print_inbox () const override
 Print the current contents of the inboxes. More...
 
std::string print_databox () const override
 Print the current contents of the DataBox. More...
 
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)
 
virtual void start_phase (Parallel::Phase next_phase)=0
 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. More...
 
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.
 
virtual void perform_algorithm ()=0
 Start evaluating the algorithm until it is stopped by an action. More...
 
virtual std::string print_types () const =0
 Print the expanded type aliases. More...
 
std::string print_state () const
 Print the current state of the algorithm.
 
virtual std::string print_inbox () const =0
 Print the current contents of the inboxes. More...
 
virtual std::string print_databox () const =0
 Print the current contents of the DataBox. More...
 
Parallel::NodeLockinbox_lock ()
 The inbox_lock() only locks the inbox, nothing else. The inbox is unsafe to access without this lock. More...
 
Parallel::NodeLockelement_lock ()
 Locks the element, except for the inbox, which is guarded by the inbox_lock(). More...
 
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 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)
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.

Implements Parallel::DgElementArrayMemberBase< Dim >.


The documentation for this class was generated from the following file: