https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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 params.set<bool>("dynamic_time_sequence") = false;
24
25 return params;
26}
27
29 : Times(parameters),
30 _input_times(isParamValid("times") ? getParam<std::vector<Real>>("times") : std::vector<Real>())
31{
33}
registerMooseObject("MooseApp", InputTimes)
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...
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.
Simple times from an input parameter.
Definition InputTimes.h:19
std::vector< Real > _input_times
The input times.
Definition InputTimes.h:29
InputTimes(const InputParameters &parameters)
Definition InputTimes.C:28
static InputParameters validParams()
Definition InputTimes.C:15
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