SpECTRE  v2024.08.03
Parallel::Actions::SimpleActionOnElement< SimpleActionToCall, Block > Struct Template Reference

A threaded action that calls the simple action SimpleActionToCall on either the specified element or broadcasts to the nodegroup. More...

#include <SimpleActionOnElement.hpp>

Static Public Member Functions

template<typename ParallelComponent , typename DbTagsList , typename Metavariables , typename ArrayIndex , typename DistributedObject , size_t Dim, typename... Args>
static void apply (db::DataBox< DbTagsList > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &, const gsl::not_null< Parallel::NodeLock * >, const DistributedObject *, const ElementId< Dim > &element_to_execute_on, Args &&... args)
 Invoke the simple action on a single element.
 
template<typename ParallelComponent , typename DbTagsList , typename Metavariables , typename ArrayIndex , typename DistributedObject , typename... Args>
static void apply (db::DataBox< DbTagsList > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &, const gsl::not_null< Parallel::NodeLock * >, const DistributedObject *, const Args &... args)
 Invoke the simple action on all elements. More...
 

Detailed Description

template<typename SimpleActionToCall, bool Block>
struct Parallel::Actions::SimpleActionOnElement< SimpleActionToCall, Block >

A threaded action that calls the simple action SimpleActionToCall on either the specified element or broadcasts to the nodegroup.

If Block is true then the action will wait until the element is free to be operated on. If it is false then a message will be sent to the nodegroup to try invoking the element again.

This is a threaded action intended to be run on the DG nodegroup.

Member Function Documentation

◆ apply()

template<typename SimpleActionToCall , bool Block>
template<typename ParallelComponent , typename DbTagsList , typename Metavariables , typename ArrayIndex , typename DistributedObject , typename... Args>
static void Parallel::Actions::SimpleActionOnElement< SimpleActionToCall, Block >::apply ( db::DataBox< DbTagsList > &  box,
Parallel::GlobalCache< Metavariables > &  cache,
const ArrayIndex ,
const gsl::not_null< Parallel::NodeLock * >  ,
const DistributedObject *  ,
const Args &...  args 
)
inlinestatic

Invoke the simple action on all elements.

Note
This loops over all elements and spawns a message for each element.

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