www.mooseframework.org
Public Member Functions | List of all members
DerivativeMaterialPropertyNameInterface Class Reference

#include <DerivativeMaterialPropertyNameInterface.h>

Inheritance diagram for DerivativeMaterialPropertyNameInterface:
[legend]

Public Member Functions

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

Detailed Description

Definition at line 16 of file DerivativeMaterialPropertyNameInterface.h.

Member Function Documentation

◆ derivativePropertyName()

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

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

Definition at line 15 of file DerivativeMaterialPropertyNameInterface.C.

Referenced by derivativePropertyNameSecond(), derivativePropertyNameThird(), FunctionMaterialPropertyDescriptor::getPropertyName(), and propertyName().

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

◆ derivativePropertyNameFirst()

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

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

Definition at line 55 of file DerivativeMaterialPropertyNameInterface.C.

Referenced by DerivativeFunctionMaterialBase::initialSetup(), and propertyNameFirst().

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

◆ derivativePropertyNameSecond()

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

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

Definition at line 62 of file DerivativeMaterialPropertyNameInterface.C.

Referenced by DerivativeFunctionMaterialBase::initialSetup(), and propertyNameSecond().

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

◆ derivativePropertyNameThird()

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

Definition at line 69 of file DerivativeMaterialPropertyNameInterface.C.

Referenced by DerivativeFunctionMaterialBase::initialSetup(), and propertyNameThird().

74 {
75  return derivativePropertyName(base, {c1, c2, c3});
76 }
const MaterialPropertyName derivativePropertyName(const MaterialPropertyName &base, const std::vector< VariableName > &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< VariableName > &  c 
) const
inline

aliases for the deprecated old function names

Definition at line 51 of file DerivativeMaterialPropertyNameInterface.h.

53  {
54  mooseDeprecated("This function was renamed to 'derivativePropertyName'");
55  return derivativePropertyName(base, c);
56  }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const MaterialPropertyName derivativePropertyName(const MaterialPropertyName &base, const std::vector< VariableName > &c) const
Helper functions to generate the material property names for the arbitrary derivatives.

◆ propertyNameFirst()

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

Definition at line 57 of file DerivativeMaterialPropertyNameInterface.h.

59  {
60  mooseDeprecated("This function was renamed to 'derivativePropertyNameFirst'");
61  return derivativePropertyNameFirst(base, c1);
62  }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const MaterialPropertyName derivativePropertyNameFirst(const MaterialPropertyName &base, const VariableName &c1) const
Helper functions to generate the material property names for the first derivatives.

◆ propertyNameSecond()

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

Definition at line 63 of file DerivativeMaterialPropertyNameInterface.h.

66  {
67  mooseDeprecated("This function was renamed to 'derivativePropertyNameSecond'");
68  return derivativePropertyNameSecond(base, c1, c2);
69  }
const MaterialPropertyName derivativePropertyNameSecond(const MaterialPropertyName &base, const VariableName &c1, const VariableName &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:237

◆ propertyNameThird()

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

Definition at line 70 of file DerivativeMaterialPropertyNameInterface.h.

74  {
75  mooseDeprecated("This function was renamed to 'derivativePropertyNameThird'");
76  return derivativePropertyNameThird(base, c1, c2, c3);
77  }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const MaterialPropertyName derivativePropertyNameThird(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.

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