Interface class ("Veneer") to provide generator methods for derivative material property names. More...
#include <DerivativeMaterialInterface.h>
Public Types | |
typedef DerivativeMaterialPropertyNameInterface::SymbolName | SymbolName |
Public Member Functions | |
DerivativeMaterialInterface (const InputParameters ¶meters) | |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getDefaultMaterialProperty (const std::string &name) |
Fetch a material property if it exists, otherwise return getZeroMaterialProperty. More... | |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getDefaultMaterialPropertyByName (const std::string &name) |
Fetch a material property by name if it exists, otherwise return getZeroMaterialProperty. More... | |
template<typename U , bool is_ad = false> | |
void | validateDerivativeMaterialPropertyBase (const std::string &base) |
Check if the material property base exists. More... | |
const MaterialPropertyName | derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const |
Helper functions to generate the material property names for the arbitrary derivatives. More... | |
const MaterialPropertyName | derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const |
Helper functions to generate the material property names for the first derivatives. More... | |
const MaterialPropertyName | derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const |
Helper functions to generate the material property names for the second derivatives. More... | |
const MaterialPropertyName | derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const |
Helper functions to generate the material property names for the third derivatives. More... | |
template<typename U , bool is_ad = false> | |
GenericMaterialProperty< U, is_ad > & | declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c) |
Methods for declaring derivative material properties. More... | |
template<typename U , bool is_ad = false> | |
GenericMaterialProperty< U, is_ad > & | declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c) |
template<typename U , bool is_ad = false> | |
GenericMaterialProperty< U, is_ad > & | declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="") |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c) |
Methods for retrieving derivative material properties. More... | |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c) |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="") |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint) |
Convenience methods for retrieving derivative material properties based on a mix of variable names c and indices v into the _coupled_standard_moose_vars vector. More... | |
template<typename U , bool is_ad = false> | |
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) |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c) |
Methods for retrieving derivative material properties. More... | |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) |
template<typename U , bool is_ad = false> | |
const GenericMaterialProperty< U, is_ad > & | getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="") |
template<typename U , bool is_ad = false> | |
void | validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true) |
check if derivatives of the passed in material property exist w.r.t a variable that is not coupled in to the current object More... | |
template<typename U , bool is_ad = false> | |
void | validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="") |
template<typename U , bool is_ad = false> | |
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 |
aliases for the deprecated old function names More... | |
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 | propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const |
Private Member Functions | |
template<typename U , bool is_ad = false> | |
bool | haveMaterialProperty (const std::string &prop_name) |
Check if a material property is present with the applicable restrictions. More... | |
std::vector< VariableName > | buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3) |
helper method to combine multiple VariableNames into a vector (if they are != "") More... | |
template<typename U , bool is_ad = false> | |
void | validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing) |
helper method to compile list of missing coupled variables for a given system More... | |
bool | isNotObjectVariable (const VariableName &name) |
Private Attributes | |
FEProblemBase & | _dmi_fe_problem |
Reference to FEProblemBase. More... | |
Interface class ("Veneer") to provide generator methods for derivative material property names.
Definition at line 32 of file DerivativeMaterialInterface.h.
typedef DerivativeMaterialPropertyNameInterface::SymbolName DerivativeMaterialInterface< T >::SymbolName |
Definition at line 35 of file DerivativeMaterialInterface.h.
DerivativeMaterialInterface< T >::DerivativeMaterialInterface | ( | const InputParameters & | parameters | ) |
Definition at line 198 of file DerivativeMaterialInterface.h.
|
private |
helper method to combine multiple VariableNames into a vector (if they are != "")
Definition at line 494 of file DerivativeMaterialInterface.h.
GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::declarePropertyDerivative | ( | const std::string & | base, |
const std::vector< VariableName > & | c | ||
) |
Methods for declaring derivative material properties.
U | The material property type |
base | The name of the property to take the derivative of |
c | The variable(s) to take the derivatives with respect to |
Definition at line 258 of file DerivativeMaterialInterface.h.
GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::declarePropertyDerivative | ( | const std::string & | base, |
const std::vector< SymbolName > & | c | ||
) |
Definition at line 268 of file DerivativeMaterialInterface.h.
GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::declarePropertyDerivative | ( | const std::string & | base, |
const SymbolName & | c1, | ||
const SymbolName & | c2 = "" , |
||
const SymbolName & | c3 = "" |
||
) |
Definition at line 277 of file DerivativeMaterialInterface.h.
|
inherited |
Helper functions to generate the material property names for the arbitrary derivatives.
Definition at line 16 of file DerivativeMaterialPropertyNameInterface.C.
Referenced by DerivativeMaterialPropertyNameInterface::derivativePropertyNameSecond(), DerivativeMaterialPropertyNameInterface::derivativePropertyNameThird(), and DerivativeMaterialPropertyNameInterface::propertyName().
|
inherited |
Helper functions to generate the material property names for the first derivatives.
Definition at line 56 of file DerivativeMaterialPropertyNameInterface.C.
Referenced by DerivativeMaterialPropertyNameInterface::propertyNameFirst().
|
inherited |
Helper functions to generate the material property names for the second derivatives.
Definition at line 63 of file DerivativeMaterialPropertyNameInterface.C.
Referenced by DerivativeMaterialPropertyNameInterface::propertyNameSecond().
|
inherited |
Helper functions to generate the material property names for the third derivatives.
Definition at line 70 of file DerivativeMaterialPropertyNameInterface.C.
Referenced by DerivativeMaterialPropertyNameInterface::propertyNameThird().
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getDefaultMaterialProperty | ( | const std::string & | name | ) |
Fetch a material property if it exists, otherwise return getZeroMaterialProperty.
name | The input parameter key of type MaterialPropertyName |
Definition at line 231 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getDefaultMaterialPropertyByName | ( | const std::string & | name | ) |
Fetch a material property by name if it exists, otherwise return getZeroMaterialProperty.
Definition at line 249 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivative | ( | const std::string & | base, |
const std::vector< VariableName > & | c | ||
) |
Methods for retrieving derivative material properties.
U | The material property type |
base | The name of the property to take the derivative of |
c | The variable(s) to take the derivatives with respect to |
Definition at line 294 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivative | ( | const std::string & | base, |
const std::vector< SymbolName > & | c | ||
) |
Check if base is a default property and shortcut to returning zero, as derivatives of constants are zero.
Definition at line 304 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivative | ( | const std::string & | base, |
const SymbolName & | c1, | ||
const SymbolName & | c2 = "" , |
||
const SymbolName & | c3 = "" |
||
) |
Check if base is a default property and shortcut to returning zero, as derivatives of constants are zero.
Definition at line 324 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivative | ( | const std::string & | base, |
const SymbolName & | c1, | ||
unsigned int | v2, | ||
unsigned int | v3 = libMesh::invalid_uint |
||
) |
Convenience methods for retrieving derivative material properties based on a mix of variable names c
and indices v
into the _coupled_standard_moose_vars vector.
Definition at line 352 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivative | ( | const std::string & | base, |
unsigned int | v1, | ||
unsigned int | v2 = libMesh::invalid_uint , |
||
unsigned int | v3 = libMesh::invalid_uint |
||
) |
Definition at line 367 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivativeByName | ( | const MaterialPropertyName & | base, |
const std::vector< VariableName > & | c | ||
) |
Methods for retrieving derivative material properties.
U | The material property type |
base | The name of the property to take the derivative of |
c | The variable(s) to take the derivatives with respect to |
Definition at line 382 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivativeByName | ( | const MaterialPropertyName & | base, |
const std::vector< SymbolName > & | c | ||
) |
Definition at line 392 of file DerivativeMaterialInterface.h.
const GenericMaterialProperty< U, is_ad > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivativeByName | ( | const MaterialPropertyName & | base, |
const SymbolName & | c1, | ||
const SymbolName & | c2 = "" , |
||
const SymbolName & | c3 = "" |
||
) |
Definition at line 402 of file DerivativeMaterialInterface.h.
|
private |
Check if a material property is present with the applicable restrictions.
Definition at line 217 of file DerivativeMaterialInterface.h.
|
inlineprivate |
Definition at line 555 of file DerivativeMaterialInterface.h.
|
inlineinherited |
aliases for the deprecated old function names
Definition at line 59 of file DerivativeMaterialPropertyNameInterface.h.
|
inlineinherited |
Definition at line 65 of file DerivativeMaterialPropertyNameInterface.h.
|
inlineinherited |
Definition at line 71 of file DerivativeMaterialPropertyNameInterface.h.
|
inlineinherited |
Definition at line 78 of file DerivativeMaterialPropertyNameInterface.h.
void DerivativeMaterialInterface< T >::validateCoupling | ( | const MaterialPropertyName & | base, |
const std::vector< VariableName > & | c, | ||
bool | validate_aux = true |
||
) |
check if derivatives of the passed in material property exist w.r.t a variable that is not coupled in to the current object
Definition at line 461 of file DerivativeMaterialInterface.h.
void DerivativeMaterialInterface< T >::validateCoupling | ( | const MaterialPropertyName & | base, |
const VariableName & | c1 = "" , |
||
const VariableName & | c2 = "" , |
||
const VariableName & | c3 = "" |
||
) |
Definition at line 515 of file DerivativeMaterialInterface.h.
|
private |
helper method to compile list of missing coupled variables for a given system
Definition at line 421 of file DerivativeMaterialInterface.h.
void DerivativeMaterialInterface< T >::validateDerivativeMaterialPropertyBase | ( | const std::string & | base | ) |
Check if the material property base exists.
Print a warning if it doesn't. This is useful in materials that pull in only derivative properties, which are optional. If the base property name has a typo all derivatives will be set to zero without the user ever knowing.
Definition at line 537 of file DerivativeMaterialInterface.h.
void DerivativeMaterialInterface< T >::validateNonlinearCoupling | ( | const MaterialPropertyName & | base, |
const VariableName & | c1 = "" , |
||
const VariableName & | c2 = "" , |
||
const VariableName & | c3 = "" |
||
) |
Definition at line 526 of file DerivativeMaterialInterface.h.
|
private |
Reference to FEProblemBase.
Definition at line 194 of file DerivativeMaterialInterface.h.