https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MaterialDerivativeRankFourTestKernel.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
13
16{
17 InputParameters params = MaterialDerivativeTestKernelBase<RankFourTensor>::validParams();
19 "Class used for testing derivatives of a rank four tensor material property.");
20 params.addRequiredParam<unsigned int>("i", "Tensor component");
21 params.addRequiredParam<unsigned int>("j", "Tensor component");
22 params.addRequiredParam<unsigned int>("k", "Tensor component");
23 params.addRequiredParam<unsigned int>("l", "Tensor component");
24 return params;
25}
26
28 const InputParameters & parameters)
29 : MaterialDerivativeTestKernelBase<RankFourTensor>(parameters),
30 _component_i(getParam<unsigned int>("i")),
31 _component_j(getParam<unsigned int>("j")),
32 _component_k(getParam<unsigned int>("k")),
33 _component_l(getParam<unsigned int>("l"))
34{
35}
36
37Real
42
43Real
45{
46 return _p_diag_derivative[_qp](_component_i, _component_j, _component_k, _component_l) *
47 _phi[_j][_qp] * _test[_i][_qp];
48}
49
50Real
52{
53 // get the coupled variable number corresponding to jvar
54 const unsigned int cvar = mapJvarToCvar(jvar);
55 return (*_p_off_diag_derivatives[cvar])[_qp](
57 _phi[_j][_qp] * _test[_i][_qp];
58}
registerMooseObject("CombinedTestApp", MaterialDerivativeRankFourTestKernel)
void ErrorVector unsigned int
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
This kernel is used for testing derivatives of a material property.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
MaterialDerivativeRankFourTestKernel(const InputParameters &parameters)