BioCMAMC-ST
partial_exporter.hpp
1#ifndef __CORE_PARTIAL_EXPORTER_HPP__
2#define __CORE_PARTIAL_EXPORTER_HPP__
3
4#include <common/execinfo.hpp>
5#include <cstdint>
6#include <cstddef>
7#include <dataexporter/data_exporter.hpp>
8#include <optional>
9#include <span>
10#include <string_view>
11#include <string>
12#include <vector>
13
14namespace Core
15{
25 {
26 public:
34 PartialExporter(const ExecInfo& info,
35 std::string_view _filename,
36 std::optional<export_metadata_t> user_description = std::nullopt);
37
44 void init_fields(uint64_t n_iter, uint64_t n_compartments);
45
55 void write_particle_data(std::span<std::string> names,
56 ViewParticleProperties particle_values,
57 ViewParticleProperties spatial_values,
58 const std::string& ds_name,bool compress_data);
59
65 void write_number_particle(const std::vector<size_t>& distribution);
66
72 void write_probe(std::span<const double> data);
73
74 private:
76 };
77
78}; // namespace Core
79
80#endif
A class responsible for exporting various types of data such as matrices, arrays, and metadata in a s...
Definition data_exporter.hpp:42
Kokkos::View< double **, Kokkos::LayoutRight, HostSpace > ViewParticleProperties
View for particle properties.
Definition data_exporter.hpp:91
Exporter for each MPI worker (including host) that exports data relative to particle state.
Definition partial_exporter.hpp:25
void init_fields(uint64_t n_iter, uint64_t n_compartments)
Initializes the fields required for exporting data.
Definition partial_exporter.cpp:19
PartialExporter(const ExecInfo &info, std::string_view _filename, std::optional< export_metadata_t > user_description=std::nullopt)
Constructs a PartialExporter instance.
Definition partial_exporter.cpp:11
void write_number_particle(const std::vector< size_t > &distribution)
Writes the number of particles in each compartment.
Definition partial_exporter.cpp:54
void write_particle_data(std::span< std::string > names, ViewParticleProperties particle_values, ViewParticleProperties spatial_values, const std::string &ds_name, bool compress_data)
Writes particle data to the output.
Definition partial_exporter.cpp:66
void write_probe(std::span< const double > data)
Writes probe data to the export.
Definition partial_exporter.cpp:60
uint64_t probe_counter_n_element
Definition partial_exporter.hpp:75
Core component to perform simulation.
Definition data_exporter.hpp:18
Definition execinfo.hpp:12