https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
DerivativeMaterialPropertyNameInterface Class Reference

#include <DerivativeMaterialPropertyNameInterface.h>

Inheritance diagram for DerivativeMaterialPropertyNameInterface:
[legend]

Public Types

typedef std::string SymbolName
 

Public Member Functions

const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 Helper functions to generate the material property names for the arbitrary derivatives.
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 Helper functions to generate the material property names for the first derivatives.
 
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.
 
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.
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 aliases for the deprecated old function names
 
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
 

Detailed Description

Definition at line 22 of file DerivativeMaterialPropertyNameInterface.h.

Member Typedef Documentation

◆ SymbolName

Definition at line 25 of file DerivativeMaterialPropertyNameInterface.h.

Member Function Documentation

◆ derivativePropertyName()

const MaterialPropertyName DerivativeMaterialPropertyNameInterface::derivativePropertyName ( const MaterialPropertyName &  base,
const std::vector< SymbolName > &  c 
) const

Helper functions to generate the material property names for the arbitrary derivatives.

Definition at line 16 of file DerivativeMaterialPropertyNameInterface.C.

18{
19 // to obtain well defined names we sort alphabetically
20 std::vector<SymbolName> a(c);
21 std::sort(a.begin(), a.end());
22
23 // derivative order
24 unsigned int order = a.size();
25 if (order == 0)
26 return base;
27
28 // build the property name as a stringstream
29 std::stringstream name;
30
31 // build numerator
32 name << 'd';
33 if (order > 1)
34 name << '^' << order;
35 name << base << '/';
36
37 // build denominator with 'pretty' names using exponents rather than repeat multiplication
38 unsigned int exponent = 1;
39 for (unsigned i = 1; i <= order; ++i)
40 {
41 if (i == order || a[i - 1] != a[i])
42 {
43 name << 'd' << a[i - 1];
44 if (exponent > 1)
45 name << '^' << exponent;
46 exponent = 1;
47 }
48 else
49 exponent++;
50 }
51
52 return name.str();
53}
std::string name(const ElemQuality q)

Referenced by derivativePropertyNameSecond(), derivativePropertyNameThird(), and propertyName().

◆ derivativePropertyNameFirst()

const MaterialPropertyName DerivativeMaterialPropertyNameInterface::derivativePropertyNameFirst ( const MaterialPropertyName &  base,
const SymbolName c1 
) const

Helper functions to generate the material property names for the first derivatives.

Definition at line 56 of file DerivativeMaterialPropertyNameInterface.C.

58{
59 return "d" + base + "/d" + c1;
60}

Referenced by propertyNameFirst(), NEML2Action::setupDerivativeMappings(), and NEML2Action::setupParameterDerivativeMappings().

◆ derivativePropertyNameSecond()

const MaterialPropertyName DerivativeMaterialPropertyNameInterface::derivativePropertyNameSecond ( const MaterialPropertyName &  base,
const SymbolName c1,
const SymbolName c2 
) const

Helper functions to generate the material property names for the second derivatives.

Definition at line 63 of file DerivativeMaterialPropertyNameInterface.C.

65{
66 return derivativePropertyName(base, {c1, c2});
67}
const MaterialPropertyName derivativePropertyName(const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
Helper functions to generate the material property names for the arbitrary derivatives.

Referenced by propertyNameSecond().

◆ derivativePropertyNameThird()

const MaterialPropertyName DerivativeMaterialPropertyNameInterface::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.

Definition at line 70 of file DerivativeMaterialPropertyNameInterface.C.

75{
76 return derivativePropertyName(base, {c1, c2, c3});
77}

Referenced by propertyNameThird().

◆ propertyName()

const MaterialPropertyName DerivativeMaterialPropertyNameInterface::propertyName ( const MaterialPropertyName &  base,
const std::vector< SymbolName > &  c 
) const
inline

aliases for the deprecated old function names

Definition at line 59 of file DerivativeMaterialPropertyNameInterface.h.

61 {
62 mooseDeprecated("This function was renamed to 'derivativePropertyName'");
63 return derivativePropertyName(base, c);
64 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition MooseError.h:363

◆ propertyNameFirst()

const MaterialPropertyName DerivativeMaterialPropertyNameInterface::propertyNameFirst ( const MaterialPropertyName &  base,
const SymbolName c1 
) const
inline

Definition at line 65 of file DerivativeMaterialPropertyNameInterface.h.

67 {
68 mooseDeprecated("This function was renamed to 'derivativePropertyNameFirst'");
69 return derivativePropertyNameFirst(base, c1);
70 }
const MaterialPropertyName derivativePropertyNameFirst(const MaterialPropertyName &base, const SymbolName &c1) const
Helper functions to generate the material property names for the first derivatives.

◆ propertyNameSecond()

const MaterialPropertyName DerivativeMaterialPropertyNameInterface::propertyNameSecond ( const MaterialPropertyName &  base,
const SymbolName c1,
const SymbolName c2 
) const
inline

Definition at line 71 of file DerivativeMaterialPropertyNameInterface.h.

74 {
75 mooseDeprecated("This function was renamed to 'derivativePropertyNameSecond'");
76 return derivativePropertyNameSecond(base, c1, c2);
77 }
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.

◆ propertyNameThird()

const MaterialPropertyName DerivativeMaterialPropertyNameInterface::propertyNameThird ( const MaterialPropertyName &  base,
const SymbolName c1,
const SymbolName c2,
const SymbolName c3 
) const
inline

Definition at line 78 of file DerivativeMaterialPropertyNameInterface.h.

82 {
83 mooseDeprecated("This function was renamed to 'derivativePropertyNameThird'");
84 return derivativePropertyNameThird(base, c1, c2, c3);
85 }
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.

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