https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TimeStepMaterial.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 "TimeStepMaterial.h"
11
13
16{
18 params.addClassDescription("Provide various time stepping quantities as material properties.");
19 params.addParam<MaterialPropertyName>(
20 "prop_dt", "dt", "Material property to store the current dt");
21 params.addParam<MaterialPropertyName>(
22 "prop_time", "time", "Material property to store the current time");
23 params.addParam<MaterialPropertyName>(
24 "prop_time_step", "time_step", "Material property to store the current time step number");
25 return params;
26}
27
29 : Material(parameters),
30 _prop_dt(declareProperty<Real>(getParam<MaterialPropertyName>("prop_dt"))),
31 _prop_time(declareProperty<Real>(getParam<MaterialPropertyName>("prop_time"))),
32 _prop_time_step(declareProperty<Real>(getParam<MaterialPropertyName>("prop_time_step")))
33{
34}
35
36void
registerMooseObject("PhaseFieldApp", TimeStepMaterial)
virtual Real & dt() const
virtual Real & time() const
virtual int & timeStep() const
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
FEProblemBase & _fe_problem
static InputParameters validParams()
Store current time, dt, and time step number in material properties.
TimeStepMaterial(const InputParameters &parameters)
static InputParameters validParams()
MaterialProperty< Real > & _prop_time
MaterialProperty< Real > & _prop_dt
virtual void computeQpProperties()
MaterialProperty< Real > & _prop_time_step