https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ACKappaFunctionTempl< is_ad > Class Template Reference

When kappa is a function of phase field variables, this kernel should be used to calculate the term which includes the derivatives of kappa. More...

#include <ACKappaFunction.h>

Inheritance diagram for ACKappaFunctionTempl< is_ad >:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ACKappaFunctionTempl (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual GenericReal< is_ad > computeQpResidual () override
 
GenericReal< is_ad > computeFg ()
 

Protected Attributes

const GenericMaterialProperty< Real, is_ad > & _L
 
const MaterialPropertyName _kappa_name
 
const GenericMaterialProperty< Real, is_ad > & _dkappadvar
 
const unsigned int _v_num
 
std::vector< const GenericVariableGradient< is_ad > * > _grad_v
 

Detailed Description

template<bool is_ad>
class ACKappaFunctionTempl< is_ad >

When kappa is a function of phase field variables, this kernel should be used to calculate the term which includes the derivatives of kappa.

Definition at line 22 of file ACKappaFunction.h.

Constructor & Destructor Documentation

◆ ACKappaFunctionTempl()

template<bool is_ad>
ACKappaFunctionTempl< is_ad >::ACKappaFunctionTempl ( const InputParameters parameters)

Definition at line 27 of file ACKappaFunction.C.

29  _L(this->template getGenericMaterialProperty<Real, is_ad>("mob_name")),
30  _kappa_name(this->template getParam<MaterialPropertyName>("kappa_name")),
31  _dkappadvar(this->template getGenericMaterialProperty<Real, is_ad>(
32  this->derivativePropertyNameFirst(_kappa_name, _var.name()))),
33  _v_num(this->coupledComponents("v")),
35 {
36  for (unsigned int i = 0; i < _v_num; ++i)
37  _grad_v[i] = &this->template coupledGenericGradient<is_ad>("v", i);
38 }
std::vector< const GenericVariableGradient< is_ad > * > _grad_v
const MaterialPropertyName derivativePropertyNameFirst(const MaterialPropertyName &base, const SymbolName &c1) const
const GenericMaterialProperty< Real, is_ad > & _L
const MaterialPropertyName _kappa_name
const unsigned int _v_num
const GenericMaterialProperty< Real, is_ad > & _dkappadvar

Member Function Documentation

◆ computeFg()

template<bool is_ad>
GenericReal< is_ad > ACKappaFunctionTempl< is_ad >::computeFg ( )
protected

Definition at line 90 of file ACKappaFunction.C.

91 {
92  GenericReal<is_ad> sum_grad_etai2 = 0.0;
93  for (unsigned int i = 0; i < _v_num; ++i)
94  sum_grad_etai2 += (*_grad_v[i])[_qp] * (*_grad_v[i])[_qp];
95 
96  return sum_grad_etai2 + _grad_u[_qp] * _grad_u[_qp];
97 }
Moose::GenericType< Real, is_ad > GenericReal
std::vector< const GenericVariableGradient< is_ad > * > _grad_v
const unsigned int _v_num

◆ computeQpResidual()

template<bool is_ad>
GenericReal< is_ad > ACKappaFunctionTempl< is_ad >::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 58 of file ACKappaFunction.C.

59 {
60  return 0.5 * _test[_i][_qp] * _L[_qp] * _dkappadvar[_qp] * computeFg();
61 }
GenericReal< is_ad > computeFg()
const GenericMaterialProperty< Real, is_ad > & _L
const GenericMaterialProperty< Real, is_ad > & _dkappadvar

◆ validParams()

template<bool is_ad>
InputParameters ACKappaFunctionTempl< is_ad >::validParams ( )
static

Definition at line 17 of file ACKappaFunction.C.

18 {
20  params.addClassDescription("Gradient energy term for when kappa as a function of the variable");
21  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
22  params.addParam<MaterialPropertyName>("kappa_name", "kappa_op", "The kappa function name");
23  params.addCoupledVar("v", "Vector of order parameters");
24  return params;
25 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _dkappadvar

template<bool is_ad>
const GenericMaterialProperty<Real, is_ad>& ACKappaFunctionTempl< is_ad >::_dkappadvar
protected

Definition at line 36 of file ACKappaFunction.h.

◆ _grad_v

template<bool is_ad>
std::vector<const GenericVariableGradient<is_ad> *> ACKappaFunctionTempl< is_ad >::_grad_v
protected

◆ _kappa_name

template<bool is_ad>
const MaterialPropertyName ACKappaFunctionTempl< is_ad >::_kappa_name
protected

Definition at line 35 of file ACKappaFunction.h.

◆ _L

template<bool is_ad>
const GenericMaterialProperty<Real, is_ad>& ACKappaFunctionTempl< is_ad >::_L
protected

Definition at line 33 of file ACKappaFunction.h.

◆ _v_num

template<bool is_ad>
const unsigned int ACKappaFunctionTempl< is_ad >::_v_num
protected

The documentation for this class was generated from the following files: