https://mooseframework.inl.gov
InputTimes.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 "InputTimes.h"
11 
12 registerMooseObject("MooseApp", InputTimes);
13 
16 {
18  params.addClassDescription("Times set directly from a user parameter in the input file");
19  params.addRequiredParam<std::vector<Real>>("times", "Times to store in the times vector");
20 
21  // Times are known for all processes already
22  params.set<bool>("auto_broadcast") = false;
23 
24  return params;
25 }
26 
27 InputTimes::InputTimes(const InputParameters & parameters) : Times(parameters)
28 {
29  _times = getParam<std::vector<Real>>("times");
30 }
registerMooseObject("MooseApp", InputTimes)
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
InputTimes(const InputParameters &parameters)
Definition: InputTimes.C:27
Times objects are under the hood Reporters, but limited to a vector of Real.
Definition: Times.h:18
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
static InputParameters validParams()
Definition: Times.C:14
Simple times from an input parameter.
Definition: InputTimes.h:18
static InputParameters validParams()
Definition: InputTimes.C:15
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...
std::vector< Real > & _times
The vector holding the times.
Definition: Times.h:72