|
BioCMAMC-ST
|
Exporter for each MPI worker (including host) that exports data relative to particle state. More...
#include <partial_exporter.hpp>
Public Member Functions | |
| PartialExporter (const ExecInfo &info, std::string_view _filename, std::optional< export_metadata_t > user_description=std::nullopt) | |
| Constructs a PartialExporter instance. | |
| void | init_fields (uint64_t n_iter, uint64_t n_compartments) |
| Initializes the fields required for exporting data. | |
| void | write_particle_data (PostProcessing::BonceBuffer &&bonce, const std::string &ds_name, bool compress_data) |
| Writes particle data to the output. | |
| void | write_number_particle (const std::vector< size_t > &distribution) |
| Writes the number of particles in each compartment. | |
| void | write_probe (std::span< const double > data) |
| Writes probe data to the export. | |
| Public Member Functions inherited from Core::DataExporter | |
| DataExporter (const DataExporter &)=delete | |
| DataExporter (DataExporter &&)=delete | |
| DataExporter & | operator= (const DataExporter &)=delete |
| DataExporter & | operator= (DataExporter &&)=delete |
| DataExporter ()=default | |
| void | do_link (std::string_view filename, std::string_view link_name, std::string_view groupname) |
| Creates a link to a specified file. | |
| void | set_logger (std::shared_ptr< IO::Logger > _logger) |
Private Attributes | |
| uint64_t | probe_counter_n_element |
Additional Inherited Members | |
| Protected Types inherited from Core::DataExporter | |
| using | export_metadata_t |
| Metadata types for export. | |
| using | export_metadata_kv |
| Key-value pairs for metadata. | |
| using | ViewParticleProperties |
| View for particle properties. | |
| using | simple_export_t |
| using | export_initial_kv |
| Initial export key-value pairs. | |
| using | matrix_variant_t |
| Variant for matrix data types. | |
| Protected Member Functions inherited from Core::DataExporter | |
| DataExporter (const ExecInfo &info, std::string_view _filename, std::optional< export_metadata_t > user_description=std::nullopt) | |
| ~DataExporter () | |
| void | write_matrix (std::string_view name, std::span< const double > values, bool compress=false) |
| void | write_matrix (std::string_view name, std::span< const double > values, size_t n_row, size_t n_col, bool compress=false) |
| void | prepare_matrix (MultiMatrixDescription description) |
| void | append_matrix (std::string_view name, matrix_variant_t data) |
| void | append_array (std::string_view name, std::span< const double > data, uint64_t last_size=0) |
| void | write_properties (std::optional< std::string > specific_dataspace, const export_metadata_kv &values) |
| void | write_simple (const export_initial_kv &values, std::string_view root) |
| void | write_simple (std::string specific_dataspace, const simple_export_t &values) |
| Protected Attributes inherited from Core::DataExporter | |
| std::shared_ptr< IO::Logger > | logger |
| export_metadata_kv | metadata |
| uint64_t | export_counter = 0 |
Exporter for each MPI worker (including host) that exports data relative to particle state.
This class handles exporting particle-related data, including initialization of fields, writing particle data, managing particle number distributions, and writing probe data. It derives privately from DataExporter to encapsulate its backend.
| Core::PartialExporter::PartialExporter | ( | const ExecInfo & | info, |
| std::string_view | _filename, | ||
| std::optional< export_metadata_t > | user_description = std::nullopt ) |
Constructs a PartialExporter instance.
| info | Execution information necessary for export operations. |
| _filename | The filename for data export. |
| user_description | Optional metadata describing the export operation. |
| void Core::PartialExporter::init_fields | ( | uint64_t | n_iter, |
| uint64_t | n_compartments ) |
Initializes the fields required for exporting data.
| n_iter | Number of iterations for the simulation or process. |
| n_compartments | Number of compartments to manage. |
| void Core::PartialExporter::write_number_particle | ( | const std::vector< size_t > & | distribution | ) |
Writes the number of particles in each compartment.
| distribution | A vector containing particle counts per compartment. |
| void Core::PartialExporter::write_particle_data | ( | PostProcessing::BonceBuffer && | bonce, |
| const std::string & | ds_name, | ||
| bool | compress_data ) |
Writes particle data to the output.
| ds_name | Dataset name associated with this data. |
| compress_data | Compress particle or not (can be time consuming) |
| void Core::PartialExporter::write_probe | ( | std::span< const double > | data | ) |
Writes probe data to the export.
| data | A span of constant doubles containing the probe measurements. |
|
private |
Counter for the number of probe elements.