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

2535{
2536 return nullptr;
2537}

◆ isFunctorNameTypeHelper()

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

Definition at line 2596 of file InputParameters.h.

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

2552{
2553 return isMFEMFunctorNameTypeHelper(getNullptrExample<T>());
2554}
constexpr bool isMFEMFunctorNameTypeHelper(T *)

◆ isMFEMFunctorNameTypeHelper() [2/2]

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

Definition at line 2543 of file InputParameters.h.

2544{
2545 return std::is_same_v<T, MFEMScalarCoefficientName> ||
2546 std::is_same_v<T, MFEMVectorCoefficientName>;
2547}

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

2572{
2573 return isScalarFunctorNameTypeHelper(getNullptrExample<T>());
2574}

◆ isScalarFunctorNameTypeHelper() [2/2]

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

Definition at line 2560 of file InputParameters.h.

2561{
2562 return std::is_same_v<T, MooseFunctorName>
2563#ifdef MOOSE_MFEM_ENABLED
2564 || std::is_same_v<T, MFEMScalarCoefficientName>
2565#endif
2566 ;
2567}

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

2590{
2591 return isVectorFunctorNameTypeHelper(getNullptrExample<T>());
2592}

◆ isVectorFunctorNameTypeHelper() [2/2]

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

Definition at line 2578 of file InputParameters.h.

2579{
2580#ifdef MOOSE_MFEM_ENABLED
2581 return std::is_same_v<T, MFEMVectorCoefficientName>;
2582#else
2583 return false;
2584#endif
2585}

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}