www.mooseframework.org
PFFracCoupledInterface.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<KernelGrad>();
14  params.addClassDescription("Phase-field fracture residual for beta variable: Contribution from "
15  "gradient of damage order parameter");
16  params.addRequiredCoupledVar("c", "Order parameter for damage");
17  return params;
18 }
19 
20 PFFracCoupledInterface::PFFracCoupledInterface(const InputParameters & parameters)
21  : KernelGrad(parameters),
22  _c(coupledValue("c")),
23  _grad_c(coupledGradient("c")),
24  _c_var(coupled("c"))
25 {
26 }
27 
28 RealGradient
30 {
31  return _grad_c[_qp];
32 }
33 
34 RealGradient
36 {
37  return 0.0;
38 }
39 
40 Real
42 {
43  if (jvar == _c_var)
44  return _grad_test[_i][_qp] * _grad_phi[_j][_qp];
45  else
46  return 0.0;
47 }
virtual RealGradient precomputeQpJacobian()
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
virtual RealGradient precomputeQpResidual()
PFFracCoupledInterface(const InputParameters &parameters)
const VariableGradient & _grad_c
InputParameters validParams< PFFracCoupledInterface >()