https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
SolutionInvalidityRegistry.h File Reference

Go to the source code of this file.

Classes

class  moose::internal::SolutionInvalidityName
 Helper class that stores the name associated with an invalid solution. More...
 
struct  moose::internal::SoltionInvalidityNameHash
 Helper class that hash the name associated with an invalid solution. More...
 
class  moose::internal::SolutionInvalidityInfo
 Helper class that stores the info associated with an invalid solution. More...
 
class  moose::internal::SolutionInvalidityRegistry
 The place where all sections with solution invalid warnings will be stored. More...
 

Namespaces

namespace  moose
 
namespace  moose::internal
 

Functions

void dataStore (std::ostream &, SolutionInvalidity &, void *)
 
SolutionInvalidityRegistrymoose::internal::getSolutionInvalidityRegistry ()
 Get the global SolutionInvalidityRegistry singleton.
 
std::ostream & moose::internal::operator<< (std::ostream &os, const SolutionInvalidityName &name)
 

Function Documentation

◆ dataStore()

void dataStore ( std::ostream &  stream,
SolutionInvalidity solution_invalidity,
void *  context 
)

Definition at line 355 of file SolutionInvalidity.C.

356{
357 solution_invalidity.syncIteration();
358
359 if (solution_invalidity.processor_id() != 0)
360 return;
361
362 // Build data structure for store
363 std::size_t size = solution_invalidity._counts.size();
364 dataStore(stream, size, context);
365
366 for (const auto id : index_range(solution_invalidity._counts))
367 {
368 auto & entry = solution_invalidity._counts[id];
369 const auto & info = solution_invalidity._solution_invalidity_registry.item(id);
370 std::string type = info.object_type;
371 std::string message = info.message;
372 bool warning = info.warning;
373 dataStore(stream, type, context);
374 dataStore(stream, message, context);
375 dataStore(stream, warning, context);
376 dataStore(stream, entry.current_counts, context);
377 dataStore(stream, entry.current_timestep_counts, context);
378 dataStore(stream, entry.timestep_counts, context);
379 dataStore(stream, entry.total_counts, context);
380 }
381}
void dataStore(std::ostream &stream, SolutionInvalidity::TimestepCounts &timestep_counts, void *context)
const Item & item(const std::size_t id) const
SolutionInvalidityRegistry & _solution_invalidity_registry
Create a registry to keep track of the names and occurrences of the solution invalidity.
std::vector< InvalidCounts > _counts
Store the solution invalidity counts.
void syncIteration()
Sync iteration counts to main processor Sum across all processors.
processor_id_type processor_id() const
MPI_Info info
auto index_range(const T &sizable)