https://mooseframework.inl.gov
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. 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...
 
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
 

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.

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

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)

◆ 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.

Referenced by propertyNameFirst().

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

◆ 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.

Referenced by propertyNameSecond().

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.

◆ 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.

Referenced by propertyNameThird().

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

◆ 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  }
const MaterialPropertyName derivativePropertyName(const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
Helper functions to generate the material property names for the arbitrary derivatives.
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353

◆ 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.
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353

◆ 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.
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353

◆ 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  }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
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: