https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SimulationTimes.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "SimulationTimes.h"
11
13
16{
18 params.addClassDescription("Times simulated");
19
20 // Times are known for all processes already
21 params.set<bool>("auto_broadcast") = false;
22 // Times history of a simulation is already one-way
23 params.set<bool>("auto_sort") = false;
24 // TIMESTEP_BEGIN is as early and as often as we need
25 params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_BEGIN;
26
27 return params;
28}
29
30SimulationTimes::SimulationTimes(const InputParameters & parameters) : Times(parameters) {}
31
32void
34{
35 // Initialize is by default what is called by execute()
36 _times.push_back(_fe_problem.time());
37 // if this is performed multiple times (fixed point iterations)
38 // it will be caught by our logic to make the vector hold unique times in finalize()
39}
const ExecFlagType EXEC_TIMESTEP_BEGIN
Definition Moose.C:37
registerMooseObject("MooseApp", SimulationTimes)
A MultiMooseEnum object to hold "execute_on" flags.
virtual Real & time() const
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Times simulated, obtained from the problem.
static InputParameters validParams()
virtual void initialize() override
In charge of computing / loading the times, unless all that could be done there is done in the constr...
SimulationTimes(const InputParameters &parameters)
Times objects are under the hood Reporters, but limited to a vector of Real.
Definition Times.h:19
static InputParameters validParams()
Definition Times.C:14
std::vector< Real > & _times
The vector holding the times.
Definition Times.h:74
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.