17template <
typename RangeType,
typename IteratorType>
43 virtual void onNode(IteratorType & node_it);
60 std::string what(e.
what());
91 const bool print_header =
true,
92 const std::string & line_prefix =
"[DBG]")
const;
95template <
typename RangeType,
typename IteratorType>
97 : _fe_problem(fe_problem)
101template <
typename RangeType,
typename IteratorType>
104 : _fe_problem(x._fe_problem)
108template <
typename RangeType,
typename IteratorType>
118 printGeneralExecutionInformation();
120 for (IteratorType nd = range.begin(); nd != range.end(); ++nd)
134 caughtMooseException(e);
138template <
typename RangeType,
typename IteratorType>
144template <
typename RangeType,
typename IteratorType>
150template <
typename RangeType,
typename IteratorType>
156template <
typename RangeType,
typename IteratorType>
162template <
typename RangeType,
typename IteratorType>
166 const std::vector<T *> & objs,
const bool print_header,
const std::string & line_prefix)
const
171 auto & console = _fe_problem.console();
173 std::vector<MooseObject *> moose_objs;
174 moose_objs.reserve(objs.size());
175 for (
auto obj_ptr : objs)
176 moose_objs.push_back(cast_ptr<MooseObject *>(obj_ptr));
180 std::string message = print_header ?
"Executing " + objects_type +
" on " +
181 _fe_problem.getCurrentExecuteOnFlag().name() +
"\n"
183 message += (print_header ?
"Order of execution:\n" :
"") + names;
static Threads::spin_mutex threaded_node_mutex
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual bool hasException()
Whether or not an exception has occurred.
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class,...
Provides a way for users to bail out of the current solve.
virtual const char * what() const
Get out the error message.
virtual void printGeneralExecutionInformation() const
Print information about the loop, mostly order of execution of objects.
virtual void postNode(IteratorType &node_it)
Called after the node assembly is done (including surface assembling)
virtual void onNode(IteratorType &node_it)
Called for each node.
void printExecutionOrdering(const std::vector< T * > &objs, const bool print_header=true, const std::string &line_prefix="[DBG]") const
Routine to output the ordering of objects within a vector of pointers to these objects.
ThreadedNodeLoop(ThreadedNodeLoop &x, Threads::split split)
ThreadedNodeLoop(FEProblemBase &fe_problem)
virtual bool keepGoing()
Whether or not the loop should continue.
FEProblemBase & _fe_problem
virtual void pre()
Called before the node range loop.
virtual void post()
Called after the node range loop.
virtual ~ThreadedNodeLoop()
void operator()(const RangeType &range)
virtual void caughtMooseException(MooseException &e)
Called if a MooseException is caught anywhere during the computation.
std::string formatString(std::string message, const std::string &prefix)
Add new lines and prefixes to a string for pretty display in output NOTE: This makes a copy of the st...
std::string mooseObjectVectorToString(const std::vector< MooseObject * > &objs, const std::string &sep=" ")
Routine to output the name of MooseObjects in a string.
std::string prettyCppType(const std::string &cpp_type)