10#ifndef _CHECKPOINTMANAGER_H_
11#define _CHECKPOINTMANAGER_H_
15#include "../Core/CRTree.H"
16#include "../Losses/Losses.H"
17#include "../Prob/Prob.H"
18#include "../Propagation/Propagation.H"
19#include "../Utils/RngThread.H"
20#include "../Utils/Types.H"
84 bool restoreRng =
true
134 std::vector<IdxType>& nSrc,
135 std::vector<IdxType>& nDel,
136 const CRTree& tree)
const;
145 const CRTree& tree)
const;
158 const std::vector<IdxType>& nPkt,
162 const CRTree& tree)
const;
171 const std::vector<IdxType>& nSrc,
172 const CRTree& tree)
const;
181 const std::vector<IdxType>& nDel,
182 const CRTree& tree)
const;
191 const std::vector<IdxType>& nPkt,
192 const CRTree& tree)
const;
202 const std::vector<IdxType>& nPkt,
204 const CRTree& tree)
const;
215 const std::vector<Real>&
photEn,
216 const std::vector<IdxType>& nPkt,
218 const CRTree& tree)
const;
228 const std::vector<Real>&
photEn,
230 const CRTree& tree)
const;
240 const std::vector<IdxType>& nPkt,
242 const CRTree& tree)
const;
244#ifndef TRACK_PITCH_ANGLE
253 const std::vector<IdxType>& nPkt,
255 const CRTree& tree)
const;
275#ifndef TRACK_PITCH_ANGLE
Class to parse the input deck.
A class to manage CR packets and sources.
Definition CRTree.H:44
A class to write and read checkpoint files.
Definition CheckpointManager.H:33
int chkInt
Definition CheckpointManager.H:282
void writePackets(hid_t &fileID, const std::vector< IdxType > &nPkt, const int &step, const Real &t, const Real &dt, const CRTree &tree) const
Write packet data to file.
Definition CheckpointManager.cpp:904
int verbosity
Definition CheckpointManager.H:280
bool needFQG
Definition CheckpointManager.H:268
hid_t FieldQtyGrad_HDF5
Definition CheckpointManager.H:297
void writePhotonsFull(hid_t &fileID, const std::vector< Real > &photEn, const std::vector< IdxType > &nPkt, const Real &t, const CRTree &tree) const
Write packet-by-packet photon emission data to file.
Definition CheckpointManager.cpp:1578
void writePhotonsSummary(hid_t &fileID, const std::vector< Real > &photEn, const Real t, const CRTree &tree) const
Write summary photon emission data to file.
Definition CheckpointManager.cpp:1674
Real chkDt
Definition CheckpointManager.H:287
hid_t FieldQty_HDF5
Definition CheckpointManager.H:296
bool writeFieldQty_
Definition CheckpointManager.H:270
hid_t RngState_HDF5
Definition CheckpointManager.H:298
bool writePhotonsFull_
Definition CheckpointManager.H:273
std::vector< Real > photEn
Definition CheckpointManager.H:278
void writeSources(hid_t &fileID, const std::vector< IdxType > &nSrc, const CRTree &tree) const
Write source data to file.
Definition CheckpointManager.cpp:1101
bool writeIonization_
Definition CheckpointManager.H:274
void readCheckpoint(const std::string &filename, int &step, Real &t, Real &dt, CRTree &tree, Prob *prob, bool restoreRng=true)
Function to read a checkpoint.
Definition CheckpointManager.cpp:398
int lastChkStep
Definition CheckpointManager.H:283
void writeDelPackets(hid_t &fileID, const std::vector< IdxType > &nDel, const CRTree &tree) const
Write deleted packet data to file.
Definition CheckpointManager.cpp:1219
bool writePhotons_
Definition CheckpointManager.H:272
Real nextTime() const
Time at which the next checkpoint will be written.
Definition CheckpointManager.H:109
void writeRng(hid_t &fileID, const CRTree &tree) const
Write the state of the random number generator to file.
Definition CheckpointManager.cpp:1931
hid_t CRPacket_HDF5
Definition CheckpointManager.H:294
bool writePdot_
Definition CheckpointManager.H:276
static const int fWidth
Definition CheckpointManager.H:111
Real lastTime() const
Time at which the last checkpoint was written.
Definition CheckpointManager.H:103
void writeIonization(hid_t &fileID, const std::vector< IdxType > &nPkt, const Real &t, const CRTree &tree) const
Write ionization rate data to file.
Definition CheckpointManager.cpp:1738
int nextChkStep
Definition CheckpointManager.H:285
Real nextChkTime
Definition CheckpointManager.H:290
void writePdot(hid_t &fileID, const std::vector< IdxType > &nPkt, const Real &t, const CRTree &tree) const
Write non-loss dp/dt terms to file.
Definition CheckpointManager.cpp:1834
void writeCheckpoint(const int step, const Real t, const Real dt, const CRTree &tree, Prob *prob)
Function to write a checkpoint.
Definition CheckpointManager.cpp:302
int chkNum
Definition CheckpointManager.H:281
bool writeDelPackets_
Definition CheckpointManager.H:269
std::string baseChkName
Definition CheckpointManager.H:266
void writeLoss(hid_t &fileID, const std::vector< IdxType > &nPkt, const Real &t, const CRTree &tree) const
Write loss rate data to file.
Definition CheckpointManager.cpp:1472
bool needFQ
Definition CheckpointManager.H:267
hid_t CRSource_HDF5
Definition CheckpointManager.H:295
void syncCounts(std::vector< IdxType > &nPkt, std::vector< IdxType > &nSrc, std::vector< IdxType > &nDel, const CRTree &tree) const
Sync packet, souce, and deleted packet counts to IO rank.
Definition CheckpointManager.cpp:750
bool writeLoss_
Definition CheckpointManager.H:271
hid_t RealVec_HDF5
Definition CheckpointManager.H:292
hid_t RealTensor2_HDF5
Definition CheckpointManager.H:293
Real lastChkTime
Definition CheckpointManager.H:288
int nextStep() const
Step number at which the next checkpoint will be written.
Definition CheckpointManager.H:97
int lastStep() const
Step number at which the last checkpoint was written.
Definition CheckpointManager.H:91
void writeFieldQty(hid_t &fileID, const std::vector< IdxType > &nPkt, const CRTree &tree) const
Write field quantity data to file.
Definition CheckpointManager.cpp:1345
void sendCheckpointData(const Real &t, const CRTree &tree) const
Send checkpoint data to be written to the rank doing IO.
Definition CheckpointManager.cpp:810
Class to parse the criptic input deck.
Definition ParmParser.H:37
A class to manage user-defined problem setup and work.
Definition Prob.H:45
Interface to describe the CR propagation model.
Definition Propagation.H:79
The primary namespace for criptic objects.
Definition AdvancePacket.H:25
double Real
Definition Types.H:38