https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ACKappaFunction.h
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
10#pragma once
11
12#include "GenericKernel.h"
13#include "JvarMapInterface.h"
15
21template <bool is_ad>
23 : public DerivativeMaterialInterface<JvarMapKernelInterface<GenericKernel<is_ad>>>
24{
25public:
27
28 ACKappaFunctionTempl(const InputParameters & parameters);
29
30protected:
31 virtual GenericReal<is_ad> computeQpResidual() override;
32
34
35 const MaterialPropertyName _kappa_name;
37
38 const unsigned int _v_num;
39 std::vector<const GenericVariableGradient<is_ad> *> _grad_v;
40
42
43 using GenericKernel<is_ad>::_qp;
44 using GenericKernel<is_ad>::_i;
45 using GenericKernel<is_ad>::_grad_u;
46 using GenericKernel<is_ad>::_var;
47 using GenericKernel<is_ad>::_test;
48};
49
51{
52public:
53 ACKappaFunction(const InputParameters & parameters);
54
55protected:
56 virtual Real computeQpJacobian() override;
57 virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
58
61
62 JvarMap _v_map;
63 std::vector<const MaterialProperty<Real> *> _dLdv;
64 std::vector<const MaterialProperty<Real> *> _d2kappadvardv;
65};
66
ACKappaFunctionTempl< true > ADACKappaFunction
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< Real, is_ad > GenericReal
When kappa is a function of phase field variables, this kernel should be used to calculate the term w...
GenericReal< is_ad > computeFg()
const GenericMaterialProperty< Real, is_ad > & _dkappadvar
const GenericMaterialProperty< Real, is_ad > & _L
virtual GenericReal< is_ad > computeQpResidual() override
static InputParameters validParams()
const MaterialPropertyName _kappa_name
const unsigned int _v_num
std::vector< const GenericVariableGradient< is_ad > * > _grad_v
std::vector< const MaterialProperty< Real > * > _d2kappadvardv
std::vector< const MaterialProperty< Real > * > _dLdv
virtual Real computeQpJacobian() override
const MaterialProperty< Real > & _dLdvar
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const MaterialProperty< Real > & _d2kappadvar2