blob: b6bfb7c5e224a1124026952057cfd94650367c29 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* Copyright 2019-2020 Yinjian Zhao
*
* This file is part of WarpX.
*
* License: BSD-3-Clause-LBNL
*/
#ifndef WARPX_DIAGNOSTICS_REDUCEDDIAGS_PARTICLEEXTREMA_H_
#define WARPX_DIAGNOSTICS_REDUCEDDIAGS_PARTICLEEXTREMA_H_
#include "ReducedDiags.H"
#include <map>
#include <string>
/**
* This class mainly contains a function that
* computes the particle extrema of each species.
*/
class ParticleExtrema : public ReducedDiags
{
public:
/**
* constructor
* @param[in] rd_name reduced diags names
*/
ParticleExtrema(std::string rd_name);
/// name of species
std::string m_species_name;
/**
* This funciton computes the particle extrema
*
* @param[in] step current time step
*/
void ComputeDiags(int step) override final;
private:
/// auxiliary structure to store headers and indices of the reduced diagnostics
struct aux_header_index
{
std::string header;
int idx;
};
/// map to store header texts and indices of the reduced diagnostics
std::map<std::string, aux_header_index> m_headers_indices;
};
#endif
|