WarpX
Classes | Enumerations | Functions
ablastr::warn_manager Namespace Reference

Classes

class  WarnManager
 

Enumerations

enum class  WarnPriority { low , medium , high }
 

Functions

WarnManagerGetWMInstance ()
 Helper function to abbreviate the call to get a WarnManager instance. More...
 
void WMRecordWarning (const std::string &topic, const std::string &text, const WarnPriority &priority=WarnPriority::medium)
 Helper function to abbreviate the call to WarnManager::GetInstance().RecordWarning (recording a warning message is thread-safe) More...
 

Enumeration Type Documentation

◆ WarnPriority

WarnPriority is recorded together with warning messages. It influences the display order and the appearance of a warning message. This enum class mirrors ablastr::utils::msg_logger::Priority.

Enumerator
low 

Low priority warning: essentially an informative message

medium 

Medium priority warning: a bug or a performance issue may affect the simulation

high 

High priority warning: a very serious bug or performance issue almost certainly affects the simulation

Function Documentation

◆ GetWMInstance()

WarnManager & ablastr::warn_manager::GetWMInstance ( )

Helper function to abbreviate the call to get a WarnManager instance.

Returns
the instance of the WarnManager class

◆ WMRecordWarning()

void ablastr::warn_manager::WMRecordWarning ( const std::string &  topic,
const std::string &  text,
const WarnPriority priority = WarnPriority::medium 
)

Helper function to abbreviate the call to WarnManager::GetInstance().RecordWarning (recording a warning message is thread-safe)

Parameters
[in]topica string to identify the topic of the warning (e.g., "parallelization", "pbc", "particles"...)
[in]textthe text of the warning message
[in]prioritypriority of the warning message ("medium" by default)