WarpX
ReducedDiags.H
Go to the documentation of this file.
1 /* Copyright 2019-2020 Maxence Thevenet, Yinjian Zhao
2  *
3  * This file is part of WarpX.
4  *
5  * License: BSD-3-Clause-LBNL
6  */
7 
8 #ifndef WARPX_DIAGNOSTICS_REDUCEDDIAGS_REDUCEDDIAGS_H_
9 #define WARPX_DIAGNOSTICS_REDUCEDDIAGS_REDUCEDDIAGS_H_
10 
11 #include "Utils/IntervalsParser.H"
12 
13 #include <AMReX_REAL.H>
14 
15 #include <string>
16 #include <vector>
17 #include <fstream>
18 
25 {
26 public:
27 
29  std::string m_path = "./diags/reducedfiles/";
30 
32  std::string m_extension = "txt";
33 
35  std::string m_rd_name;
36 
39 
41  int m_IsNotRestart = 1;
42 
44  std::string m_sep = " ";
45 
47  std::vector<amrex::Real> m_data;
48 
51  ReducedDiags(std::string rd_name);
52 
55  virtual ~ReducedDiags() = default;
56 
58  virtual void ComputeDiags(int step) = 0;
59 
62  virtual void WriteToFile(int step) const;
63 
64 };
65 
66 #endif
std::string m_path
output path (default)
Definition: ReducedDiags.H:29
This class is a parser for multiple slices of the form x,y,z,... where x, y and z are slices of the f...
Definition: IntervalsParser.H:82
std::string m_extension
output extension (default)
Definition: ReducedDiags.H:32
std::vector< amrex::Real > m_data
output data
Definition: ReducedDiags.H:47
std::string m_sep
separator in the output file
Definition: ReducedDiags.H:44
Definition: ReducedDiags.H:24
virtual void ComputeDiags(int step)=0
function to compute diags
std::string m_rd_name
diags name
Definition: ReducedDiags.H:35
ReducedDiags(std::string rd_name)
Definition: ReducedDiags.cpp:19
virtual ~ReducedDiags()=default
IntervalsParser m_intervals
output frequency
Definition: ReducedDiags.H:38
virtual void WriteToFile(int step) const
Definition: ReducedDiags.cpp:65
int m_IsNotRestart
check if it is a restart run
Definition: ReducedDiags.H:41