|
| DiffusionProfilesDiag () |
|
void | init (NLReader::NamelistReader &nlr, const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const Plasma &plasma, int f_source_period) |
| Initialize the DiffusionProfilesDiag diagnostic. More...
|
|
int | get_n_species () const |
| Return whether the diffusion diagnostic is on. More...
|
|
int | get_n_surf () const |
| Get the number of flux-surfaces sampled. More...
|
|
int | get_n_samples () const |
| Get the number of samples taken. More...
|
|
bool | is_triggered_output (int step) |
| Returns whether the buffer should be written out on this step. More...
|
|
void | collect_sample (const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, Plasma &plasma, const Moments &f0_moments, const DomainDecomposition< DeviceType > &pol_decomp) |
| Collect a sample of diffusion profile data. More...
|
|
void | write () |
| Write the buffered diffusion profile data to disk. More...
|
|
void | reset_buffer () |
| Reset the profile data buffer. More...
|
|
bool | is_triggered (int step) |
|
bool | has_been_triggered (int step) |
|
int | get_period () const |
|
| Diagnostic () |
|
void | init (const std::string &name, int period, int first_step=-1) |
|
void | open_stream (const std::string &filename, const XGC_IO_Mode &mode) |
|
void | close_stream () |
|
void | write (const XGC_IO &xgc_io) |
|
void | start_write_step () |
|
bool | is_first_step () |
|
void | end_write_step () |
|
|
bool | is_on |
| Flag to indicate if this diagnostic is active. More...
|
|
View< double ***, CLayout,
HostType > | profiles_buffer_n |
|
View< double ***, CLayout,
HostType > | profiles_buffer_u |
|
View< double ***, CLayout,
HostType > | profiles_buffer_T |
|
View< double *, CLayout, HostType > | psi_grid |
| Poloidal flux grid of the sampled profile data. More...
|
|
View< double *, CLayout, HostType > | time_buffer |
| Time (in s) of each sample. More...
|
|
View< int *, CLayout, HostType > | step_buffer |
| Time step index of each sample. More...
|
|
bool | is_on |
|
Diagnostic for writing diffusion profile data using ADIOS2.
This diagnostic is controlled by a boolean switch (is_on) and an output interval. It collects and buffers the evolution of the flux-surface averaged plasma profiles—specifically density, parallel mean flow, and temperature profiles—along with the corresponding poloidal flux grid, time stamps, and simulation step indices. The diagnostic is defined in diagnostics.hpp and utilizes the diagnostic template interface.
Initialize the DiffusionProfilesDiag diagnostic.
This function reads the necessary configuration options from the input namelists. The on/off switch and output rate are taken from the "diff_param" namelist, while the sampling rate is read from the "diag_param" namelist. It also performs a consistency check to ensure that the output rate is divisible by both the sampling rate and the base source period. In addition, the function allocates the buffers for the profile data and initializes the output trigger.
- Parameters
-
nlr | Reference to the NamelistReader holding configuration options. |
sml | Reference to the Simulation object. |
grid | Reference to the Grid object. |
plasma | Reference to the Plasma object. |
f_source_period | The base period for sampling. |
< Rate (multiples of sml_f_source_period) at which the profile data is sampled. (Must be compatible with diff_update_period!)
void DiffusionProfilesDiag::write |
( |
| ) |
|
Write the buffered diffusion profile data to disk.
This function is executed on the rank-zero process. It creates an XGC_IO object, adds the various buffered arrays (including the number of species, number of samples, flux-surface grid, time and step data, and the profile arrays for density, flow, and temperature) to the IO object, and then invokes the base diagnostic write routines. The output is wrapped between a start and end write step.