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

2523 {
2524  return nullptr;
2525 }

◆ isFunctorNameTypeHelper()

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

Definition at line 2584 of file InputParameters.h.

Referenced by InputParameters::isFunctorNameType().

2585 {
2587 }
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 2531 of file InputParameters.h.

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

2532 {
2533  return std::is_same_v<T, MFEMScalarCoefficientName> ||
2534  std::is_same_v<T, MFEMVectorCoefficientName>;
2535 }

◆ isMFEMFunctorNameTypeHelper() [2/2]

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

Definition at line 2539 of file InputParameters.h.

2540 {
2541  return isMFEMFunctorNameTypeHelper(getNullptrExample<T>());
2542 }
constexpr bool isMFEMFunctorNameTypeHelper(std::vector< T, A > *)

◆ isScalarFunctorNameTypeHelper() [1/2]

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

Definition at line 2548 of file InputParameters.h.

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

2549 {
2550  return std::is_same_v<T, MooseFunctorName>
2551 #ifdef MOOSE_MFEM_ENABLED
2552  || std::is_same_v<T, MFEMScalarCoefficientName>
2553 #endif
2554  ;
2555 }

◆ isScalarFunctorNameTypeHelper() [2/2]

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

Definition at line 2559 of file InputParameters.h.

2560 {
2561  return isScalarFunctorNameTypeHelper(getNullptrExample<T>());
2562 }
constexpr bool isScalarFunctorNameTypeHelper(std::vector< T, A > *)

◆ isVectorFunctorNameTypeHelper() [1/2]

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

Definition at line 2566 of file InputParameters.h.

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

2567 {
2568 #ifdef MOOSE_MFEM_ENABLED
2569  return std::is_same_v<T, MFEMVectorCoefficientName>;
2570 #else
2571  return false;
2572 #endif
2573 }

◆ isVectorFunctorNameTypeHelper() [2/2]

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

Definition at line 2577 of file InputParameters.h.

2578 {
2579  return isVectorFunctorNameTypeHelper(getNullptrExample<T>());
2580 }
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