https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SplitCHParsed Class Reference

CHParsed uses the Free Energy function and derivatives provided by a DerivativeParsedMaterial. More...

#include <SplitCHParsed.h>

Inheritance diagram for SplitCHParsed:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 SplitCHParsed (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 Member Functions

virtual Real computeDFDC (PFFunctionType type)
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

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

const MaterialProperty< Real > & _dFdc
 
const MaterialProperty< Real > & _d2Fdc2
 
std::vector< const MaterialProperty< Real > * > _d2Fdcdarg
 
FEProblemBase_dmi_fe_problem
 

Detailed Description

CHParsed uses the Free Energy function and derivatives provided by a DerivativeParsedMaterial.

This is the split operator variant.

See also
CHParsed

Definition at line 24 of file SplitCHParsed.h.

Constructor & Destructor Documentation

◆ SplitCHParsed()

SplitCHParsed::SplitCHParsed ( const InputParameters parameters)

Definition at line 27 of file SplitCHParsed.C.

29 _dFdc(getMaterialPropertyDerivative<Real>("f_name", _var.name())),
30 _d2Fdc2(getMaterialPropertyDerivative<Real>("f_name", _var.name(), _var.name())),
31 _d2Fdcdarg(_n_args)
32{
33 // Iterate over all coupled variables
34 for (unsigned int i = 0; i < _n_args; ++i)
35 _d2Fdcdarg[i] = &getMaterialPropertyDerivative<Real>("f_name", _var.name(), i);
36}
const MaterialProperty< Real > & _d2Fdc2
const MaterialProperty< Real > & _dFdc
std::vector< const MaterialProperty< Real > * > _d2Fdcdarg

Member Function Documentation

◆ computeDFDC()

Real SplitCHParsed::computeDFDC ( PFFunctionType  type)
protectedvirtual

Definition at line 51 of file SplitCHParsed.C.

52{
53 switch (type)
54 {
55 case Residual:
56 return _dFdc[_qp];
57
58 case Jacobian:
59 return _d2Fdc2[_qp] * _phi[_j][_qp];
60 }
61
62 mooseError("Internal error");
63}
void mooseError(Args &&... args)

◆ computeQpOffDiagJacobian()

Real SplitCHParsed::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 66 of file SplitCHParsed.C.

67{
68 if (jvar == _w_var)
70
71 // get the coupled variable jvar is referring to
72 const unsigned int cvar = mapJvarToCvar(jvar);
73
74 return (*_d2Fdcdarg[cvar])[_qp] * _phi[_j][_qp] * _test[_i][_qp];
75}
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition SplitCHCRes.C:70

◆ initialSetup()

void SplitCHParsed::initialSetup ( )
virtual

We are only interested if the necessary non-linear variables are coupled, as those are thge ones used in constructing the Jacobian. The AuxVariables do not have Jacobian entries.

Definition at line 39 of file SplitCHParsed.C.

40{
46 validateNonlinearCoupling<Real>("f_name", _var.name());
47 validateDerivativeMaterialPropertyBase<Real>("f_name");
48}

◆ validParams()

InputParameters SplitCHParsed::validParams ( )
static

Definition at line 15 of file SplitCHParsed.C.

16{
19 "Split formulation Cahn-Hilliard Kernel that uses a DerivativeMaterial Free Energy");
20 params.addRequiredParam<MaterialPropertyName>(
21 "f_name", "Base name of the free energy function F defined in a DerivativeParsedMaterial");
22 params.addCoupledVar("coupled_variables", "Vector of additional variable arguments to F");
23
24 return params;
25}
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Definition SplitCHCRes.C:13

Member Data Documentation

◆ _d2Fdc2

const MaterialProperty<Real>& SplitCHParsed::_d2Fdc2
private

Definition at line 39 of file SplitCHParsed.h.

Referenced by computeDFDC().

◆ _d2Fdcdarg

std::vector<const MaterialProperty<Real> *> SplitCHParsed::_d2Fdcdarg
private

Definition at line 40 of file SplitCHParsed.h.

Referenced by computeQpOffDiagJacobian(), and SplitCHParsed().

◆ _dFdc

const MaterialProperty<Real>& SplitCHParsed::_dFdc
private

Definition at line 38 of file SplitCHParsed.h.

Referenced by computeDFDC().


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