Interface class ("Veneer") to provide generator methods for derivative material property names. More...
#include <DerivativeMaterialInterface.h>
Public Member Functions | |
DerivativeMaterialInterface (const InputParameters ¶meters) | |
template<typename U > | |
const MaterialProperty< U > & | getDefaultMaterialProperty (const std::string &name) |
Fetch a material property if it exists, otherwise return getZeroMaterialProperty. More... | |
template<typename U > | |
const MaterialProperty< U > & | getDefaultMaterialPropertyByName (const std::string &name) |
Fetch a material property by name if it exists, otherwise return getZeroMaterialProperty. More... | |
template<typename U > | |
void | validateDerivativeMaterialPropertyBase (const std::string &base) |
Check if the material property base exists. More... | |
const MaterialPropertyName | propertyName (const MaterialPropertyName &base, const std::vector< VariableName > &c) const |
Helper functions to generate the material property names for the arbitrary derivatives. More... | |
const MaterialPropertyName | propertyNameFirst (const MaterialPropertyName &base, const VariableName &c1) const |
Helper functions to generate the material property names for the first derivatives. More... | |
const MaterialPropertyName | propertyNameSecond (const MaterialPropertyName &base, const VariableName &c1, const VariableName &c2) const |
Helper functions to generate the material property names for the second derivatives. More... | |
const MaterialPropertyName | propertyNameThird (const MaterialPropertyName &base, const VariableName &c1, const VariableName &c2, const VariableName &c3) const |
Helper functions to generate the material property names for the third derivatives. More... | |
template<typename U > | |
MaterialProperty< U > & | declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c) |
Methods for declaring derivative material properties. More... | |
template<typename U > | |
MaterialProperty< U > & | declarePropertyDerivative (const std::string &base, const VariableName &c1, const VariableName &c2="", const VariableName &c3="") |
template<typename U > | |
const MaterialProperty< U > & | getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c) |
Methods for retreiving derivative material properties. More... | |
template<typename U > | |
const MaterialProperty< U > & | getMaterialPropertyDerivative (const std::string &base, const VariableName &c1, const VariableName &c2="", const VariableName &c3="") |
template<typename U > | |
const MaterialProperty< U > & | getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c) |
Methods for retreiving derivative material properties. More... | |
template<typename U > | |
const MaterialProperty< U > & | getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const VariableName &c1, const VariableName &c2="", const VariableName &c3="") |
template<typename U > | |
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 > | |
void | validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="") |
template<typename U > | |
void | validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="") |
Private Member Functions | |
template<typename U > | |
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 > | |
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 33 of file DerivativeMaterialInterface.h.
DerivativeMaterialInterface< T >::DerivativeMaterialInterface | ( | const InputParameters & | parameters | ) |
Definition at line 156 of file DerivativeMaterialInterface.h.
|
private |
helper method to combine multiple VariableNames into a vector (if they are != "")
Definition at line 384 of file DerivativeMaterialInterface.h.
MaterialProperty< U > & 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 219 of file DerivativeMaterialInterface.h.
MaterialProperty< U > & DerivativeMaterialInterface< T >::declarePropertyDerivative | ( | const std::string & | base, |
const VariableName & | c1, | ||
const VariableName & | c2 = "" , |
||
const VariableName & | c3 = "" |
||
) |
Definition at line 228 of file DerivativeMaterialInterface.h.
const MaterialProperty< U > & 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 189 of file DerivativeMaterialInterface.h.
const MaterialProperty< U > & DerivativeMaterialInterface< T >::getDefaultMaterialPropertyByName | ( | const std::string & | name | ) |
Fetch a material property by name if it exists, otherwise return getZeroMaterialProperty.
Definition at line 207 of file DerivativeMaterialInterface.h.
const MaterialProperty< U > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivative | ( | const std::string & | base, |
const std::vector< VariableName > & | c | ||
) |
Methods for retreiving 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 |
Check if base is a default property and shortcut to returning zero, as derivatives of constants are zero.
Definition at line 243 of file DerivativeMaterialInterface.h.
Referenced by FunctionMaterialPropertyDescriptor::value().
const MaterialProperty< U > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivative | ( | const std::string & | base, |
const VariableName & | c1, | ||
const VariableName & | c2 = "" , |
||
const VariableName & | c3 = "" |
||
) |
Check if base is a default property and shortcut to returning zero, as derivatives of constants are zero.
Definition at line 262 of file DerivativeMaterialInterface.h.
const MaterialProperty< U > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivativeByName | ( | const MaterialPropertyName & | base, |
const std::vector< VariableName > & | c | ||
) |
Methods for retreiving 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 287 of file DerivativeMaterialInterface.h.
const MaterialProperty< U > & DerivativeMaterialInterface< T >::getMaterialPropertyDerivativeByName | ( | const MaterialPropertyName & | base, |
const VariableName & | c1, | ||
const VariableName & | c2 = "" , |
||
const VariableName & | c3 = "" |
||
) |
Definition at line 296 of file DerivativeMaterialInterface.h.
|
private |
Check if a material property is present with the applicable restrictions.
Definition at line 175 of file DerivativeMaterialInterface.h.
|
inlineprivate |
Definition at line 445 of file DerivativeMaterialInterface.h.
|
inherited |
Helper functions to generate the material property names for the arbitrary derivatives.
Definition at line 15 of file DerivativeMaterialPropertyNameInterface.C.
Referenced by FunctionMaterialPropertyDescriptor::getPropertyName(), DerivativeMaterialPropertyNameInterface::propertyNameSecond(), and DerivativeMaterialPropertyNameInterface::propertyNameThird().
|
inherited |
Helper functions to generate the material property names for the first derivatives.
Definition at line 55 of file DerivativeMaterialPropertyNameInterface.C.
Referenced by DerivativeFunctionMaterialBase::initialSetup().
|
inherited |
Helper functions to generate the material property names for the second derivatives.
Definition at line 62 of file DerivativeMaterialPropertyNameInterface.C.
Referenced by DerivativeFunctionMaterialBase::initialSetup().
|
inherited |
Helper functions to generate the material property names for the third derivatives.
Definition at line 70 of file DerivativeMaterialPropertyNameInterface.C.
Referenced by DerivativeFunctionMaterialBase::initialSetup().
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 352 of file DerivativeMaterialInterface.h.
void DerivativeMaterialInterface< T >::validateCoupling | ( | const MaterialPropertyName & | base, |
const VariableName & | c1 = "" , |
||
const VariableName & | c2 = "" , |
||
const VariableName & | c3 = "" |
||
) |
Definition at line 405 of file DerivativeMaterialInterface.h.
|
private |
helper method to compile list of missing coupled variables for a given system
Definition at line 312 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 427 of file DerivativeMaterialInterface.h.
void DerivativeMaterialInterface< T >::validateNonlinearCoupling | ( | const MaterialPropertyName & | base, |
const VariableName & | c1 = "" , |
||
const VariableName & | c2 = "" , |
||
const VariableName & | c3 = "" |
||
) |
Definition at line 416 of file DerivativeMaterialInterface.h.
|
private |
Reference to FEProblemBase.
Definition at line 152 of file DerivativeMaterialInterface.h.