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  resetSequence();
44  updateSequence(time_points);
45 }
46 
47 Real
49 {
52 
54 }
55 
56 Real
58 {
62 }
TimeSequenceFromTimes(const InputParameters &parameters)
bool isDynamicTimeSequence() const
Definition: Times.h:52
virtual Real getNextTimeInSequence() override
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 Real computeDT() override
Computes time step size after the initial time step.
Time sequence stepper that gets its sequence of times to hit from a times object. ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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)
virtual Real computeDT() override
Computes time step size after the initial time step.