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

2547{
2548 return nullptr;
2549}

◆ isFunctorNameTypeHelper()

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

Definition at line 2608 of file InputParameters.h.

2609{
2611}
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 2563 of file InputParameters.h.

2564{
2565 return isMFEMFunctorNameTypeHelper(getNullptrExample<T>());
2566}
constexpr bool isMFEMFunctorNameTypeHelper(T *)

◆ isMFEMFunctorNameTypeHelper() [2/2]

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

Definition at line 2555 of file InputParameters.h.

2556{
2557 return std::is_same_v<T, MFEMScalarCoefficientName> ||
2558 std::is_same_v<T, MFEMVectorCoefficientName>;
2559}

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

2584{
2585 return isScalarFunctorNameTypeHelper(getNullptrExample<T>());
2586}

◆ isScalarFunctorNameTypeHelper() [2/2]

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

Definition at line 2572 of file InputParameters.h.

2573{
2574 return std::is_same_v<T, MooseFunctorName>
2575#ifdef MOOSE_MFEM_ENABLED
2576 || std::is_same_v<T, MFEMScalarCoefficientName>
2577#endif
2578 ;
2579}

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

2602{
2603 return isVectorFunctorNameTypeHelper(getNullptrExample<T>());
2604}

◆ isVectorFunctorNameTypeHelper() [2/2]

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

Definition at line 2590 of file InputParameters.h.

2591{
2592#ifdef MOOSE_MFEM_ENABLED
2593 return std::is_same_v<T, MFEMVectorCoefficientName>;
2594#else
2595 return false;
2596#endif
2597}

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}