www.mooseframework.org
ADACInterface.h
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 #pragma once
11 
12 #include "ADKernel.h"
13 #include "DerivativeMaterialPropertyNameInterface.h"
14 
15 #define usingACInterfaceMembers \
16  usingKernelMembers; \
17  using ADACInterface<compute_stage>::_prop_L; \
18  using ADACInterface<compute_stage>::_name_L; \
19  using ADACInterface<compute_stage>::_kappa; \
20  using ADACInterface<compute_stage>::_variable_L; \
21  using ADACInterface<compute_stage>::_dLdop; \
22  using ADACInterface<compute_stage>::_nvar; \
23  using ADACInterface<compute_stage>::_dLdarg; \
24  using ADACInterface<compute_stage>::_gradarg
25 
26 template <ComputeStage>
28 
30 
35 template <ComputeStage compute_stage>
36 class ADACInterface : public ADKernel<compute_stage>, public DerivativeMaterialPropertyNameInterface
37 {
38 public:
39  ADACInterface(const InputParameters & parameters);
40 
41 protected:
42  virtual ADReal computeQpResidual();
43 
45  const ADMaterialProperty(Real) & _prop_L;
47  const MaterialPropertyName & _name_L;
48 
50  const ADMaterialProperty(Real) & _kappa;
51 
53  const bool _variable_L;
54 
56  const ADMaterialProperty(Real) * _dLdop;
57 
59  const unsigned int _nvar;
60 
62  std::vector<const ADMaterialProperty(Real) *> _dLdarg;
63 
65  std::vector<const ADVariableGradient *> _gradarg;
66 
68 };
ADACInterface::_variable_L
const bool _variable_L
flag set if L is a function of non-linear variables in args
Definition: ADACInterface.h:53
ADACInterface::_nvar
const unsigned int _nvar
number of coupled variables
Definition: ADACInterface.h:59
ADACInterface::_dLdarg
std::vector< const ADMaterialProperty(Real) * > _dLdarg
Mobility derivative w.r.t. other coupled variables.
Definition: ADACInterface.h:62
ADACInterface::computeQpResidual
virtual ADReal computeQpResidual()
Definition: ADACInterface.C:58
ADACInterface::ADACInterface
ADACInterface(const InputParameters &parameters)
Definition: ADACInterface.C:28
ADACInterface::_gradarg
std::vector< const ADVariableGradient * > _gradarg
Gradients for all coupled variables.
Definition: ADACInterface.h:65
declareADValidParams
declareADValidParams(ADACInterface)
ADACInterface::ADMaterialProperty
const ADMaterialProperty(Real) &_prop_L
Mobility.
ADACInterface::usingKernelMembers
usingKernelMembers
Definition: ADACInterface.h:67
ADACInterface
Compute the Allen-Cahn interface term with the weak form residual .
Definition: ADACInterface.h:27
ADACInterface::_name_L
const MaterialPropertyName & _name_L
Mobility property name.
Definition: ADACInterface.h:47