https://mooseframework.inl.gov
TimeSequenceFromTimes.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 "TimeSequenceFromTimes.h"
11 #include "Times.h"
12 
14 
17 {
19  params.addRequiredParam<TimesName>(
20  "times", "The name of the Times object containing the times to hit during the simulation");
21  params.addClassDescription("Solves the Transient problem at a sequence of time points taken from "
22  "a specified Times object.");
23  return params;
24 }
25 
27  : TimeSequenceStepperBase(parameters),
28  _times(_fe_problem.getUserObject<Times>(getParam<TimesName>("times")))
29 {
30 }
31 
32 void
34 {
35  auto time_points = _times.getTimes();
36  setupSequence(time_points);
37 }
38 
39 void
41 {
42  auto time_points = _times.getTimes();
43  updateSequence(time_points);
44 }
45 
46 void
48 {
51 }
TimeSequenceFromTimes(const InputParameters &parameters)
bool isDynamicTimeSequence() const
Definition: Times.h:52
registerMooseObject("MooseApp", TimeSequenceFromTimes)
const std::vector< Real > & getTimes() const
Getter for the full times vector.
Definition: Times.C:107
virtual void init() override
Initialize the time stepper.
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 setupSequence(const std::vector< Real > &times)
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...
const Times & _times
A Times object that will provide the sequence of times to hit.
static InputParameters validParams()
virtual void refreshSequence() override
Re-read a time sequence source that can change during the simulation.
Time sequence stepper that gets its sequence of times to hit from a times object. ...
Solves the PDEs at a sequence of given time points.
static InputParameters validParams()
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...
void updateSequence(const std::vector< Real > &times)