https://mooseframework.inl.gov
Classes | Functions
Moose::internal Namespace Reference

Classes

class  Capabilities
 Holds the public (to MooseApp) facing CapabilityRegistry for storing and checking capabilities. More...
 
class  CapabilityRegistry
 Registry of capabilities that checks capability requirements. More...
 

Functions

template<typename T , typename V >
std::string stringify_variant (const V &value)
 
template<typename T >
constexpr T * getNullptrExample ()
 
template<typename T >
constexpr bool isMFEMFunctorNameTypeHelper (T *)
 
template<typename T , typename A >
constexpr bool isMFEMFunctorNameTypeHelper (std::vector< T, A > *)
 
template<typename T >
constexpr bool isScalarFunctorNameTypeHelper (T *)
 
template<typename T , typename A >
constexpr bool isScalarFunctorNameTypeHelper (std::vector< T, A > *)
 
template<typename T >
constexpr bool isVectorFunctorNameTypeHelper (T *)
 
template<typename T , typename A >
constexpr bool isVectorFunctorNameTypeHelper (std::vector< T, A > *)
 
template<typename T >
constexpr bool isFunctorNameTypeHelper (T *ex)
 
void checkException (const peg::SemanticValues &vs, const std::string &message, const std::optional< Capability > capability={})
 

Function Documentation

◆ checkException()

void Moose::internal::checkException ( const peg::SemanticValues &  vs,
const std::string &  message,
const std::optional< Capability capability = {} 
)

Definition at line 74 of file CapabilityRegistry.C.

Referenced by Moose::internal::CapabilityRegistry::check().

76  {})
77 {
78  std::string msg = "Capability statement '" + vs.token_to_string() + "': ";
79  if (capability)
80  msg += "capability '" + capability->toString() + "' ";
81  msg += message;
82  throw CapabilityException(msg);
83 }

◆ getNullptrExample()

template<typename T >
constexpr T* Moose::internal::getNullptrExample ( )

Definition at line 2523 of file InputParameters.h.

2524 {
2525  return nullptr;
2526 }

◆ isFunctorNameTypeHelper()

template<typename T >
constexpr bool Moose::internal::isFunctorNameTypeHelper ( T *  ex)

Definition at line 2585 of file InputParameters.h.

Referenced by InputParameters::isFunctorNameType().

2586 {
2588 }
constexpr bool isVectorFunctorNameTypeHelper(std::vector< T, A > *)
constexpr bool isScalarFunctorNameTypeHelper(std::vector< T, A > *)

◆ isMFEMFunctorNameTypeHelper() [1/2]

template<typename T >
constexpr bool Moose::internal::isMFEMFunctorNameTypeHelper ( T *  )

Definition at line 2532 of file InputParameters.h.

Referenced by InputParameters::appendFunctorDescription(), and isMFEMFunctorNameTypeHelper().

2533 {
2534  return std::is_same_v<T, MFEMScalarCoefficientName> ||
2535  std::is_same_v<T, MFEMVectorCoefficientName>;
2536 }

◆ isMFEMFunctorNameTypeHelper() [2/2]

template<typename T , typename A >
constexpr bool Moose::internal::isMFEMFunctorNameTypeHelper ( std::vector< T, A > *  )

Definition at line 2540 of file InputParameters.h.

2541 {
2542  return isMFEMFunctorNameTypeHelper(getNullptrExample<T>());
2543 }
constexpr bool isMFEMFunctorNameTypeHelper(std::vector< T, A > *)

◆ isScalarFunctorNameTypeHelper() [1/2]

template<typename T >
constexpr bool Moose::internal::isScalarFunctorNameTypeHelper ( T *  )

Definition at line 2549 of file InputParameters.h.

Referenced by InputParameters::appendFunctorDescription(), isFunctorNameTypeHelper(), and isScalarFunctorNameTypeHelper().

2550 {
2551  return std::is_same_v<T, MooseFunctorName>
2552 #ifdef MOOSE_MFEM_ENABLED
2553  || std::is_same_v<T, MFEMScalarCoefficientName>
2554 #endif
2555  ;
2556 }

◆ isScalarFunctorNameTypeHelper() [2/2]

template<typename T , typename A >
constexpr bool Moose::internal::isScalarFunctorNameTypeHelper ( std::vector< T, A > *  )

Definition at line 2560 of file InputParameters.h.

2561 {
2562  return isScalarFunctorNameTypeHelper(getNullptrExample<T>());
2563 }
constexpr bool isScalarFunctorNameTypeHelper(std::vector< T, A > *)

◆ isVectorFunctorNameTypeHelper() [1/2]

template<typename T >
constexpr bool Moose::internal::isVectorFunctorNameTypeHelper ( T *  )

Definition at line 2567 of file InputParameters.h.

Referenced by InputParameters::appendFunctorDescription(), isFunctorNameTypeHelper(), and isVectorFunctorNameTypeHelper().

2568 {
2569 #ifdef MOOSE_MFEM_ENABLED
2570  return std::is_same_v<T, MFEMVectorCoefficientName>;
2571 #else
2572  return false;
2573 #endif
2574 }

◆ isVectorFunctorNameTypeHelper() [2/2]

template<typename T , typename A >
constexpr bool Moose::internal::isVectorFunctorNameTypeHelper ( std::vector< T, A > *  )

Definition at line 2578 of file InputParameters.h.

2579 {
2580  return isVectorFunctorNameTypeHelper(getNullptrExample<T>());
2581 }
constexpr bool isVectorFunctorNameTypeHelper(std::vector< T, A > *)

◆ stringify_variant()

template<typename T , typename V >
std::string Moose::internal::stringify_variant ( const V &  value)
inline

Definition at line 114 of file Conversion.h.

115 {
116  return std::holds_alternative<T>(value) ? stringify(std::get<T>(value)) : "";
117 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::string stringify(const T< U... > &c, const std::string &delim=", ", const std::string &elem_encl="", bool enclose_list_in_curly_braces=false)
Convert a container to a string with elements separated by delimiter of user&#39;s choice.
Definition: Conversion.h:195