https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
32void
34{
35 auto time_points = _times.getTimes();
36 setupSequence(time_points);
37}
38
39void
41{
42 auto time_points = _times.getTimes();
43 updateSequence(time_points);
44}
45
46void
registerMooseObject("MooseApp", TimeSequenceFromTimes)
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.
Time sequence stepper that gets its sequence of times to hit from a times object.
static InputParameters validParams()
virtual void init() override
Initialize the time stepper.
TimeSequenceFromTimes(const InputParameters &parameters)
virtual void refreshSequence() override
Re-read a time sequence source that can change during the simulation.
const Times & _times
A Times object that will provide the sequence of times to hit.
Solves the PDEs at a sequence of given time points.
void updateSequence(const std::vector< Real > &times)
void setupSequence(const std::vector< Real > &times)
static InputParameters validParams()
Times objects are under the hood Reporters, but limited to a vector of Real.
Definition Times.h:19
const std::vector< Real > & getTimes() const
Getter for the full times vector.
Definition Times.C:107
bool isDynamicTimeSequence() const
Definition Times.h:52