www.mooseframework.org
ADMatReaction.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 "ADMatReaction.h"
11 
12 registerADMooseObject("PhaseFieldApp", ADMatReaction);
13 
16  ADKernel,
17  params.addCoupledVar("v",
18  "Set this to make v a coupled variable, otherwise it will use the "
19  "kernel's nonlinear variable for v");
20  params.addClassDescription("Kernel to add -L*v, where L=reaction rate, v=variable");
21  params.addParam<MaterialPropertyName>("mob_name",
22  "L",
23  "The reaction rate used with the kernel"););
24 
25 template <ComputeStage compute_stage>
26 ADMatReaction<compute_stage>::ADMatReaction(const InputParameters & parameters)
27  : ADKernel<compute_stage>(parameters),
28  _v(isCoupled("v") ? adCoupledValue("v") : _u),
29  _mob(getADMaterialProperty<Real>("mob_name"))
30 {
31 }
32 
33 template <ComputeStage compute_stage>
34 ADReal
36 {
37  return -_mob[_qp] * _test[_i][_qp] * _v[_qp];
38 }
ADMatReaction.h
ADMatReaction::ADMatReaction
ADMatReaction(const InputParameters &parameters)
Definition: ADMatReaction.C:26
defineADValidParams
defineADValidParams(ADMatReaction, ADKernel, params.addCoupledVar("v", "Set this to make v a coupled variable, otherwise it will use the " "kernel's nonlinear variable for v");params.addClassDescription("Kernel to add -L*v, where L=reaction rate, v=variable");params.addParam< MaterialPropertyName >("mob_name", "L", "The reaction rate used with the kernel");)
ADMatReaction::computeQpResidual
virtual ADReal computeQpResidual()
Definition: ADMatReaction.C:35
registerADMooseObject
registerADMooseObject("PhaseFieldApp", ADMatReaction)
ADMatReaction
This kernel adds to the residual a contribution of where is a material property and is a variable ...
Definition: ADMatReaction.h:16