https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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.

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}
Common execption to be thrown when interacting with capabilities.

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

◆ getNullptrExample()

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

Definition at line 2554 of file InputParameters.h.

2555{
2556 return nullptr;
2557}

◆ isFunctorNameTypeHelper()

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

Definition at line 2616 of file InputParameters.h.

2617{
2619}
constexpr bool isVectorFunctorNameTypeHelper(T *)
constexpr bool isScalarFunctorNameTypeHelper(T *)

Referenced by InputParameters::isFunctorNameType().

◆ isMFEMFunctorNameTypeHelper() [1/2]

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

Definition at line 2571 of file InputParameters.h.

2572{
2573 return isMFEMFunctorNameTypeHelper(getNullptrExample<T>());
2574}
constexpr bool isMFEMFunctorNameTypeHelper(T *)

◆ isMFEMFunctorNameTypeHelper() [2/2]

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

Definition at line 2563 of file InputParameters.h.

2564{
2565 return std::is_same_v<T, MFEMScalarCoefficientName> ||
2566 std::is_same_v<T, MFEMVectorCoefficientName>;
2567}

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

◆ isScalarFunctorNameTypeHelper() [1/2]

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

Definition at line 2591 of file InputParameters.h.

2592{
2593 return isScalarFunctorNameTypeHelper(getNullptrExample<T>());
2594}

◆ isScalarFunctorNameTypeHelper() [2/2]

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

Definition at line 2580 of file InputParameters.h.

2581{
2582 return std::is_same_v<T, MooseFunctorName>
2583#ifdef MOOSE_MFEM_ENABLED
2584 || std::is_same_v<T, MFEMScalarCoefficientName>
2585#endif
2586 ;
2587}

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

◆ isVectorFunctorNameTypeHelper() [1/2]

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

Definition at line 2609 of file InputParameters.h.

2610{
2611 return isVectorFunctorNameTypeHelper(getNullptrExample<T>());
2612}

◆ isVectorFunctorNameTypeHelper() [2/2]

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

Definition at line 2598 of file InputParameters.h.

2599{
2600#ifdef MOOSE_MFEM_ENABLED
2601 return std::is_same_v<T, MFEMVectorCoefficientName>;
2602#else
2603 return false;
2604#endif
2605}

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

◆ stringify_variant()

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

Definition at line 115 of file Conversion.h.

116{
117 return std::holds_alternative<T>(value) ? stringify(std::get<T>(value)) : "";
118}