SpECTRE  v2024.09.29
importers::Actions::ReadVolumeData< ImporterOptionsGroup, FieldTagsList > Struct Template Reference

Read a volume data file and distribute the data to all registered elements, interpolating to the target points if needed. More...

#include <ReadVolumeData.hpp>

Public Types

using const_global_cache_tags = tmpl::list< Tags::ImporterOptions< ImporterOptionsGroup > >
 

Static Public Member Functions

template<typename DbTagsList , typename... InboxTags, typename Metavariables , size_t Dim, typename ActionList , typename ParallelComponent >
static Parallel::iterable_action_return_t apply (db::DataBox< DbTagsList > &, const tuples::TaggedTuple< InboxTags... > &, Parallel::GlobalCache< Metavariables > &cache, const ElementId< Dim > &, 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, interpolating to the target points if needed.

Note
Use this action if you want to quickly load and distribute volume data. If you need to beyond that (such as more control over input-file options), write a new action and dispatch to importers::Actions::ReadAllVolumeDataAndDistribute.

Details

Invoke this action on the elements of an array parallel component to dispatch reading the volume data file specified by options placed in the 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: