www.mooseframework.org
ADSplitCHWResBase.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 "ADKernelGrad.h"
14 
20 template <typename T>
22 {
23 public:
25 
27 
28 protected:
30 
31  const MaterialPropertyName _mob_name;
33 };
34 
35 template <typename T>
37  : ADKernelGrad(parameters),
38  _mob_name(getParam<MaterialPropertyName>("mob_name")),
39  _mob(getADMaterialProperty<T>("mob_name"))
40 {
41 }
42 
43 template <typename T>
46 {
47  return _mob[_qp] * _grad_u[_qp];
48 }
49 
50 template <typename T>
53 {
55  params.addClassDescription(
56  "Split formulation Cahn-Hilliard Kernel for the chemical potential variable");
57  params.addParam<MaterialPropertyName>("mob_name", "mobtemp", "The mobility used with the kernel");
58  return params;
59 }
ADSplitCHWResBase implements the residual for the chemical potential in the split form of the Cahn-Hi...
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
const MaterialPropertyName _mob_name
ADSplitCHWResBase(const InputParameters &parameters)
static InputParameters validParams()
virtual ADRealVectorValue precomputeQpResidual()
const ADMaterialProperty< T > & _mob
void addClassDescription(const std::string &doc_string)
const InputParameters & parameters() const