29 declareValueByName<const SolutionInvalidity *>(
36 mooseAssert(solution_invalidity->
processor_id() == 0,
"should only be called on rank 0");
39 const auto & counts = solution_invalidity->
counts();
40 if (counts.size() == 0)
42 json = nlohmann::json::array();
45 for (
const auto id : index_range(solution_invalidity->
counts()))
48 entry[
"object_type"] = solution_registry.item(
id).object_type;
49 entry[
"message"] = solution_registry.item(
id).message;
50 entry[
"timestep_counts"] = counts[id].current_timestep_counts;
51 entry[
"total_counts"] = counts[id].total_counts;
52 json.push_back(entry);
const ReporterMode REPORTER_MODE_ROOT
void to_json(nlohmann::json &json, const SolutionInvalidity *const &solution_invalidity)
registerMooseObject("MooseApp", SolutionInvalidityReporter)
A MultiMooseEnum object to hold "execute_on" flags.
Reporter object that has a single execution of the "execute" method for each execute flag.
static InputParameters validParams()
SolutionInvalidity & solutionInvalidity()
Get the SolutionInvalidity for this app.
MooseApp & _app
The MOOSE application this is associated with.
Reports the summary table of solution invalid warnings.
static InputParameters validParams()
SolutionInvalidityReporter(const InputParameters ¶meters)
The SolutionInvalidity will contain all the information about the occurrence(s) of solution invalidit...
const std::vector< InvalidCounts > & counts() const
Access the private solution invalidity counts.
processor_id_type processor_id() const
SolutionInvalidityRegistry & getSolutionInvalidityRegistry()
Get the global SolutionInvalidityRegistry singleton.