|
SpECTRE
v2026.06.30
|
Read a volume data file and distribute the data to all registered elements, interpolating to the target points if needed. More...
#include <ReadVolumeData.hpp>
Static Public Member Functions | |
| template<typename ParallelComponent, typename DataBox, typename Metavariables, typename ArrayIndex> | |
| static void | apply (DataBox &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &, const ImporterOptions &options, const size_t volume_data_id, tuples::tagged_tuple_from_typelist< db::wrap_tags_in< Tags::Selected, FieldTagsList > > selected_fields=select_all_fields(FieldTagsList{})) |
Read a volume data file and distribute the data to all registered elements, interpolating to the target points if needed.
This action can be invoked on the importers::ElementDataReader component once all elements have been registered with it. It opens the data file, reads the data for each registered element and uses Parallel::receive_data to distribute the data to the elements. The elements can monitor importers::Tags::VolumeData in their inbox to wait for the data and process it once it's available. You can use importers::Actions::ReceiveVolumeData to wait for the data and move it directly into the DataBox, or implement a specialized action that might verify and post-process the data.
Note that instead of invoking this action directly on the importers::ElementDataReader component you can invoke the iterable action importers::Actions::ReadVolumeData on the elements of an array parallel component for simple use cases.