www.mooseframework.org
TestMatTimeDerivative.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "TestMatTimeDerivative.h"
11 
13 
14 template<>
15 InputParameters
17 {
18  InputParameters params = validParams<TimeDerivative>();
19  params.addRequiredParam<MaterialPropertyName>("mat_prop_value", "Material "
20  "property to multiply by time "
21  "derivative");
22  return params;
23 }
24 
25 TestMatTimeDerivative::TestMatTimeDerivative(const InputParameters & parameters)
26  : TimeDerivative(parameters),
27  _mat_prop_value(getMaterialProperty<Real>("mat_prop_value"))
28 {}
29 
31 {
32  return _mat_prop_value[_qp] * TimeDerivative::computeQpResidual();
33 }
34 
36 {
37  return _mat_prop_value[_qp] * TimeDerivative::computeQpJacobian();
38 }
registerMooseObject
registerMooseObject("XFEMTestApp", TestMatTimeDerivative)
TestMatTimeDerivative::TestMatTimeDerivative
TestMatTimeDerivative(const InputParameters &parameters)
Definition: TestMatTimeDerivative.C:25
validParams< TestMatTimeDerivative >
InputParameters validParams< TestMatTimeDerivative >()
Definition: TestMatTimeDerivative.C:16
TestMatTimeDerivative::_mat_prop_value
const MaterialProperty< Real > & _mat_prop_value
Definition: TestMatTimeDerivative.h:28
TestMatTimeDerivative::computeQpResidual
virtual Real computeQpResidual() override
Definition: TestMatTimeDerivative.C:30
TestMatTimeDerivative.h
TestMatTimeDerivative
Definition: TestMatTimeDerivative.h:20
TestMatTimeDerivative::computeQpJacobian
virtual Real computeQpJacobian() override
Definition: TestMatTimeDerivative.C:35