SpECTRE  v2022.05.05
importers::Actions::ReadVolumeData< ImporterOptionsGroup, FieldTagsList > Struct Template Reference

Read a volume data file and distribute the data to all registered elements. More...

#include <ReadVolumeData.hpp>

Public Types

using const_global_cache_tags = tmpl::list< Tags::FileGlob< ImporterOptionsGroup >, Tags::Subgroup< ImporterOptionsGroup >, Tags::ObservationValue< ImporterOptionsGroup > >

Static Public Member Functions

template<typename DbTagsList , typename... InboxTags, typename Metavariables , typename ArrayIndex , typename ActionList , typename ParallelComponent >
static std::tuple< db::DataBox< DbTagsList > && > apply (db::DataBox< DbTagsList > &box, const tuples::TaggedTuple< InboxTags... > &, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &, const ActionList, const ParallelComponent *const)

Detailed Description

template<typename ImporterOptionsGroup, typename FieldTagsList>
struct importers::Actions::ReadVolumeData< ImporterOptionsGroup, FieldTagsList >

Read a volume data file and distribute the data to all registered elements.

Invoke this action on the elements of an array parallel component to dispatch reading the volume data file specified by the options in ImporterOptionsGroup. The tensors in FieldTagsList will be loaded from the file and distributed to all elements that have previously registered. Use importers::Actions::RegisterWithElementDataReader to register the elements of the array parallel component in a previous phase.

Note that the volume data file will only be read once per node, triggered by the first element that invokes this action. All subsequent invocations of this action on the node will do nothing. See importers::Actions::ReadAllVolumeDataAndDistribute for details.

The data is distributed to the elements using Parallel::receive_data. The elements can monitor importers::Tags::VolumeData in their inbox to wait for the data and process it once it's available. We provide the action importers::Actions::ReceiveVolumeData that waits for the data and moves it directly into the DataBox. You can also implement a specialized action that might verify and post-process the data before populating the DataBox.

See also
Dev guide on Importing data

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