https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ACBulk< T > Class Template Referenceabstract

This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equation. More...

#include <ACBulk.h>

Inheritance diagram for ACBulk< T >:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ACBulk (const InputParameters &parameters)
 
virtual void initialSetup ()
 
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 Types

enum  PFFunctionType { Jacobian , Residual }
 

Protected Member Functions

virtual Real precomputeQpResidual ()
 
virtual Real precomputeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 
virtual Real computeDFDOP (PFFunctionType type)=0
 

Protected Attributes

const MaterialProperty< T > & _L
 Mobility.
 
const MaterialProperty< T > & _dLdop
 Mobility derivative w.r.t. order parameter.
 
std::vector< const MaterialProperty< T > * > _dLdarg
 Mobility derivative w.r.t coupled variables.
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 

Detailed Description

template<typename T>
class ACBulk< T >

This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equation.

It is templated on the type of the mobility, which can be either a number (Real) or a tensor (RealValueTensor). Note that the function computeDFDOP MUST be overridden in any kernel that inherits from ACBulk.

Definition at line 24 of file ACBulk.h.

Member Enumeration Documentation

◆ PFFunctionType

template<typename T >
enum ACBulk::PFFunctionType
protected
Enumerator
Jacobian 
Residual 

Definition at line 37 of file ACBulk.h.

38 {
41 };
@ Jacobian
Definition ACBulk.h:39

Constructor & Destructor Documentation

◆ ACBulk()

template<typename T >
ACBulk< T >::ACBulk ( const InputParameters parameters)

Definition at line 56 of file ACBulk.h.

58 _L(getMaterialProperty<T>("mob_name")),
59 _dLdop(getMaterialPropertyDerivative<T>("mob_name", _var.name())),
60 _dLdarg(_n_args)
61{
62 // Iterate over all coupled variables
63 for (unsigned int i = 0; i < _n_args; ++i)
64 _dLdarg[i] = &getMaterialPropertyDerivative<T>("mob_name", i);
65}
const MaterialProperty< T > & _L
Mobility.
Definition ACBulk.h:46
std::vector< const MaterialProperty< T > * > _dLdarg
Mobility derivative w.r.t coupled variables.
Definition ACBulk.h:52
const MaterialProperty< T > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition ACBulk.h:49

Member Function Documentation

◆ computeDFDOP()

template<typename T >
virtual Real ACBulk< T >::computeDFDOP ( PFFunctionType  type)
protectedpure virtual

◆ computeQpOffDiagJacobian()

template<typename T >
Real ACBulk< T >::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

◆ initialSetup()

template<typename T >
void ACBulk< T >::initialSetup ( )
virtual

Reimplemented in AllenCahn, CoupledAllenCahn, KKSACBulkBase, and KKSMultiACBulkBase.

Definition at line 79 of file ACBulk.h.

80{
81 validateNonlinearCoupling<Real>("mob_name");
82}

Referenced by AllenCahn::initialSetup(), CoupledAllenCahn::initialSetup(), KKSACBulkBase::initialSetup(), and KKSMultiACBulkBase::initialSetup().

◆ precomputeQpJacobian()

template<typename T >
Real ACBulk< T >::precomputeQpJacobian ( )
protectedvirtual

Definition at line 97 of file ACBulk.h.

98{
99 // Get free energy derivative and Jacobian
100 Real dFdop = computeDFDOP(Residual);
101
102 Real JdFdop = computeDFDOP(Jacobian);
103
104 // Set Jacobian value using product rule
105 return _L[_qp] * JdFdop + _dLdop[_qp] * _phi[_j][_qp] * dFdop;
106}
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ precomputeQpResidual()

template<typename T >
Real ACBulk< T >::precomputeQpResidual ( )
protectedvirtual

Definition at line 86 of file ACBulk.h.

87{
88 // Get free energy derivative from function
89 Real dFdop = computeDFDOP(Residual);
90
91 // Set residual
92 return _L[_qp] * dFdop;
93}

◆ validParams()

template<typename T >
InputParameters ACBulk< T >::validParams ( )
static

Definition at line 69 of file ACBulk.h.

70{
72 params.addClassDescription("Allen-Cahn base Kernel");
73 params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
74 return params;
75}
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)
static InputParameters validParams()

Referenced by ACGBPoly::validParams(), ACGrGrBase::validParams(), ACGrGrElasticDrivingForce::validParams(), ACSEDGPoly::validParams(), AllenCahn::validParams(), CoupledAllenCahn::validParams(), DoubleWellPotential::validParams(), KKSACBulkBase::validParams(), and KKSMultiACBulkBase::validParams().

Member Data Documentation

◆ _dLdarg

template<typename T >
std::vector<const MaterialProperty<T> *> ACBulk< T >::_dLdarg
protected

Mobility derivative w.r.t coupled variables.

Definition at line 52 of file ACBulk.h.

Referenced by ACBulk< T >::ACBulk().

◆ _dLdop

template<typename T >
const MaterialProperty<T>& ACBulk< T >::_dLdop
protected

Mobility derivative w.r.t. order parameter.

Definition at line 49 of file ACBulk.h.

◆ _L

template<typename T >
const MaterialProperty<T>& ACBulk< T >::_L
protected

Mobility.

Definition at line 46 of file ACBulk.h.


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