https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADSplitCHWResBase.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 "ADKernelGrad.h"
14
20template <typename T>
22{
23public:
25
27
28protected:
30
31 const MaterialPropertyName _mob_name;
33};
34
35template <typename T>
37 : ADKernelGrad(parameters),
38 _mob_name(getParam<MaterialPropertyName>("mob_name")),
39 _mob(getADMaterialProperty<T>("mob_name"))
40{
41}
42
43template <typename T>
46{
47 return _mob[_qp] * _grad_u[_qp];
48}
49
50template <typename T>
53{
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}
const double T
static InputParameters validParams()
ADSplitCHWResBase implements the residual for the chemical potential in the split form of the Cahn-Hi...
static InputParameters validParams()
virtual ADRealVectorValue precomputeQpResidual()
const ADMaterialProperty< T > & _mob
ADSplitCHWResBase(const InputParameters &parameters)
const MaterialPropertyName _mob_name
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
const InputParameters & parameters() const