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

2526{
2527 return nullptr;
2528}

◆ isFunctorNameTypeHelper()

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

Definition at line 2587 of file InputParameters.h.

2588{
2590}
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 2542 of file InputParameters.h.

2543{
2544 return isMFEMFunctorNameTypeHelper(getNullptrExample<T>());
2545}
constexpr bool isMFEMFunctorNameTypeHelper(T *)

◆ isMFEMFunctorNameTypeHelper() [2/2]

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

Definition at line 2534 of file InputParameters.h.

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

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

2563{
2564 return isScalarFunctorNameTypeHelper(getNullptrExample<T>());
2565}

◆ isScalarFunctorNameTypeHelper() [2/2]

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

Definition at line 2551 of file InputParameters.h.

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

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

2581{
2582 return isVectorFunctorNameTypeHelper(getNullptrExample<T>());
2583}

◆ isVectorFunctorNameTypeHelper() [2/2]

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

Definition at line 2569 of file InputParameters.h.

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

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 114 of file Conversion.h.

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