27 #include "libmesh/parallel_object.h" 30 template <
class... Ts>
184 void dataLoad(std::istream & stream,
bool hasInvalidSolutionError() const
Whether or not an invalid solution was encountered that was an error.
std::vector< TimestepCounts > timestep_counts
Keep track of the occurences across all time steps.
bool hasEverHadSolutionIssue() const
Whether or not any warning or invalid solution has ever been encountered during the simulation...
A helper class for re-directing output streams to Console output objects form MooseObjects.
void accumulateTimeStepIntoTotalOccurences(const unsigned int timestep_index)
Pass the number of solution invalid occurrences from current timestep to cumulative timestep counter ...
bool _has_recorded_issue
Whether or not we have ever had any warning or solution issue during the simulation.
bool hasInvalidSolutionWarning() const
Whether or not an invalid solution was encountered that was a warning.
VariadicTable< std::string, unsigned long int, unsigned long int, unsigned long int, std::string > FullTable
std::mutex _invalid_mutex
Mutex for locking access to the invalid counts TODO: These can be changed to shared_mutexes.
const std::vector< InvalidCounts > & counts() const
Access the private solution invalidity counts.
Struct used in _counts for storing warning and invalid-solution occurrences.
void dataLoad(std::istream &stream, SolutionInvalidity::TimestepCounts ×tep_counts, void *context)
unsigned int InvalidSolutionID
void accumulateIterationIntoTimeStepOccurences()
Pass the number of solution invalid occurrences from current iteration to cumulative counters...
std::vector< InvalidCounts > _counts
Store the solution invalidity counts.
SolutionInvalidity(MooseApp &app)
Create a new SolutionInvalidity.
void dataStore(std::ostream &stream, SolutionInvalidity::TimestepCounts ×tep_counts, void *context)
friend void dataLoad(std::istream &, SolutionInvalidity &, void *)
bool _has_synced
Whether or not we've synced (can check counts/existance of warnings or errors)
A class for "pretty printing" a table of data.
void printDebug(InvalidSolutionID _invalid_solution_id) const
Immediately print the section and message for debug purpose.
Base class for MOOSE-based applications.
SolutionInvalidityRegistry & _solution_invalidity_registry
Create a registry to keep track of the names and occurrences of the solution invalidity.
friend void dataStore(std::ostream &, SolutionInvalidity &, void *)
auto max(const L &left, const R &right)
void resetIterationOccurences()
Reset the number of solution invalid occurrences back to zero.
TimeTable transientTable(unsigned int &time_interval) const
Build a VariadicTable for solution invalidity history.
unsigned int timestep_index
unsigned int total_counts
Total counts across the entire simulation.
The place where all sections with solution invalid warnings will be stored.
void syncIteration()
Sync iteration counts to main processor Sum across all processors.
bool _has_solution_warning
Whether or not we have a warning (only after a sync)
An inteface for the _console for outputting to the Console object.
bool hasInvalidSolution() const
Whether or not any invalid solution was encountered (error or warning).
void flagInvalidSolutionInternal(const InvalidSolutionID _invalid_solution_id)
Increments solution invalid occurrences for each solution id.
bool _has_solution_error
Whether or not we have an invalid solution (only after a sync)
The SolutionInvalidity will contain all the information about the occurrence(s) of solution invalidit...
Struct used in InvalidCounts for storing the time history of invalid occurrences. ...
bool hasSynced() const
Whether the solution invalidity has synchronized iteration counts across MPI processes.
unsigned int current_timestep_counts
Counts for the current time step.
TimestepCounts(unsigned int timestep_index)
VariadicTable< std::string, std::string, unsigned long int, unsigned long int > TimeTable
void print(const ConsoleStream &console) const
Print the summary table of Solution Invalid warnings.
unsigned int current_counts
Counts for the current iteration (depends on the count, but usually linear iteration) ...
void resetTimeStepOccurences()
Reset the number of solution invalid occurrences back to zero for the current time step...
void printHistory(const ConsoleStream &console, unsigned int ×tep_interval_size) const
Print the time history table of Solution Invalid warnings.
void ErrorVector unsigned int
FullTable summaryTable() const
Build a VariadicTable for solution invalidity.