Cardinal
OpenMCWallTime.h
Go to the documentation of this file.
1 /********************************************************************/
2 /* SOFTWARE COPYRIGHT NOTIFICATION */
3 /* Cardinal */
4 /* */
5 /* (c) 2021 UChicago Argonne, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by UChicago Argonne, LLC */
9 /* Under Contract No. DE-AC02-06CH11357 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* Prepared by Battelle Energy Alliance, LLC */
13 /* Under Contract No. DE-AC07-05ID14517 */
14 /* With the U. S. Department of Energy */
15 /* */
16 /* See LICENSE for full restrictions */
17 /********************************************************************/
18 
19 #pragma once
20 
21 #include "GeneralPostprocessor.h"
22 
23 #include "OpenMCBase.h"
24 
41 class OpenMCWallTime : public GeneralPostprocessor, public OpenMCBase
42 {
43 public:
44  static InputParameters validParams();
45 
46  OpenMCWallTime(const InputParameters & parameters);
47 
48  virtual void initialize() override {}
49  virtual void execute() override;
50 
51  virtual Real getValue() const override;
52 
55  CreateMooseEnumClass(OpenMCTime,
56  initialization_time = 0,
57  total_simulation_time = 1,
58  transport_time = 2,
59  inactive_batch_time = 3,
60  active_batch_time = 4,
61  fission_bank_time = 5,
62  tally_accumulation_time = 6,
63  finalization_time = 7,
64  total_elapsed_time = 8);
65 
66 protected:
68  const bool & _accumulate_time;
69 
71  const OpenMCTime _openmc_time;
72 
74  Real _walltime;
75 };
Definition: OpenMCBase.h:30
virtual Real getValue() const override
Real _walltime
The accumulate or step walltime.
Definition: OpenMCWallTime.h:74
const OpenMCTime _openmc_time
The type of time to report from OpenMC.
Definition: OpenMCWallTime.h:71
const bool & _accumulate_time
Whether the simulation time should be accumulated or not.
Definition: OpenMCWallTime.h:68
static InputParameters validParams()
CreateMooseEnumClass(OpenMCTime, initialization_time=0, total_simulation_time=1, transport_time=2, inactive_batch_time=3, active_batch_time=4, fission_bank_time=5, tally_accumulation_time=6, finalization_time=7, total_elapsed_time=8)
virtual void execute() override
OpenMCWallTime(const InputParameters &parameters)
Definition: OpenMCWallTime.h:41
virtual void initialize() override
Definition: OpenMCWallTime.h:48