14 #include "libmesh/string_to_enum.h" 26 ss << libMesh::Utility::enum_to_string<FEFamily>(var1.
feType().family) <<
",ORDER" 28 <<
" != " << libMesh::Utility::enum_to_string<FEFamily>(var2.
feType().family) <<
",ORDER" 34 mooseMsgFmt(
const std::string & msg,
const std::string & title,
const std::string & color)
36 std::ostringstream oss;
37 oss <<
"\n" << color <<
"\n" << title <<
"\n" << msg << COLOR_DEFAULT <<
"\n";
42 mooseMsgFmt(
const std::string & msg,
const std::string & color)
44 std::ostringstream oss;
45 oss <<
"\n" << color <<
"\n" << msg << COLOR_DEFAULT <<
"\n";
53 throw std::runtime_error(msg);
57 std::ostringstream oss;
68 Moose::err << msg << std::flush;
81 Moose::err << msg << std::flush;
101 "We caught a MetaPhysicL error in while performing element or face loops. This is " 102 "potentially due to AD not having a sufficiently large derivative container size. To " 103 "increase the AD container size, you can run configure in the MOOSE root directory with the " 104 "'--with-derivative-size=<n>' option and then recompile. Other causes of MetaPhysicL logic " 105 "errors include evaluating functions where they are not defined or differentiable like sqrt " 106 "(which gets called for vector norm functions) or log with arguments <= 0");
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
bool show_trace
Set to true (the default) to print the stack trace with error and warning messages - false to omit it...
processor_id_type global_n_processors()
std::string incompatVarMsg(MooseVariableFieldBase &var1, MooseVariableFieldBase &var2)
Builds and returns a string of the form:
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
void translateMetaPhysicLError(const MetaPhysicL::LogicError &)
emit a relatively clear error message when we catch a MetaPhysicL logic error
This class provides an interface for common operations on field variables of both FE and FV types wit...
const FEType & feType() const
Get the type of finite element object.
void indentMessage(const std::string &prefix, std::string &message, const char *color=COLOR_CYAN, bool dont_indent_first_line=true, const std::string &post_prefix=": ")
Indents the supplied message given the prefix and color.
Threads::spin_mutex moose_stream_lock
void mooseErrorRaw(std::string msg, const std::string prefix="")
void print_trace(std::ostream &out_stream=std::cerr)
bool _throw_on_error
Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or wh...
std::string mooseMsgFmt(const std::string &msg, const std::string &title, const std::string &color)
Format a message for output with a title.