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