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 2486 of file InputParameters.h.

2487 {
2488  return nullptr;
2489 }

◆ isFunctorNameTypeHelper()

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

Definition at line 2548 of file InputParameters.h.

Referenced by InputParameters::isFunctorNameType().

2549 {
2551 }
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 2495 of file InputParameters.h.

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

2496 {
2497  return std::is_same_v<T, MFEMScalarCoefficientName> ||
2498  std::is_same_v<T, MFEMVectorCoefficientName>;
2499 }

◆ isMFEMFunctorNameTypeHelper() [2/2]

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

Definition at line 2503 of file InputParameters.h.

2504 {
2505  return isMFEMFunctorNameTypeHelper(getNullptrExample<T>());
2506 }
constexpr bool isMFEMFunctorNameTypeHelper(std::vector< T, A > *)

◆ isScalarFunctorNameTypeHelper() [1/2]

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

Definition at line 2512 of file InputParameters.h.

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

2513 {
2514  return std::is_same_v<T, MooseFunctorName>
2515 #ifdef MOOSE_MFEM_ENABLED
2516  || std::is_same_v<T, MFEMScalarCoefficientName>
2517 #endif
2518  ;
2519 }

◆ isScalarFunctorNameTypeHelper() [2/2]

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

Definition at line 2523 of file InputParameters.h.

2524 {
2525  return isScalarFunctorNameTypeHelper(getNullptrExample<T>());
2526 }
constexpr bool isScalarFunctorNameTypeHelper(std::vector< T, A > *)

◆ isVectorFunctorNameTypeHelper() [1/2]

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

Definition at line 2530 of file InputParameters.h.

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

2531 {
2532 #ifdef MOOSE_MFEM_ENABLED
2533  return std::is_same_v<T, MFEMVectorCoefficientName>;
2534 #else
2535  return false;
2536 #endif
2537 }

◆ isVectorFunctorNameTypeHelper() [2/2]

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

Definition at line 2541 of file InputParameters.h.

2542 {
2543  return isVectorFunctorNameTypeHelper(getNullptrExample<T>());
2544 }
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