Chi-Tech
chi::PostProcessorPrinter Class Reference

#include <PostProcessorPrinter.h>

Public Member Functions

 PostProcessorPrinter (const PostProcessorPrinter &)=delete
 
PostProcessorPrinter operator= (const PostProcessorPrinter &)=delete
 
void ReceiveEventUpdate (const Event &event)
 
void SetScalarPPTableFormat (ScalarPPTableFormat format)
 
void SetEventsOnWhichPrintPPs (const std::vector< std::string > &events)
 
void SetPrintScalarTimeHistory (bool value)
 
void SetPrintVectorTimeHistory (bool value)
 
void SetScalarPerColumnSize (bool value)
 
void SetVectorPerColumnSize (bool value)
 
void SetTableColumnLimit (size_t limit)
 
void SetTimeHistoryLimit (size_t limit)
 
void SetCSVFilename (const std::string &csv_filename)
 
std::string GetPrintedPostProcessors (const std::vector< const PostProcessor * > &pp_list) const
 

Static Public Member Functions

static PostProcessorPrinterGetInstance ()
 
static char SubscribeToSystemWideEventPublisher ()
 

Private Member Functions

 PostProcessorPrinter ()
 
void PrintPostProcessors (const Event &event) const
 
void PrintPPsLatestValuesOnly (const std::string &pps_typename, const std::vector< const PostProcessor * > &pp_list, const Event &event) const
 
void PrintPPsTimeHistory (const std::string &pps_typename, const std::vector< const PostProcessor * > &pp_list, const Event &event, bool per_column_sizes=false) const
 
void PrintCSVFile (const Event &event) const
 

Static Private Member Functions

static std::string PrintPPsHorizontal (const std::vector< std::pair< std::string, std::string > > &scalar_ppnames_and_vals, int)
 
static std::string PrintPPsVertical (const std::vector< std::pair< std::string, std::string > > &scalar_ppnames_and_vals, int event_code)
 
static std::string PrintPPsSubTimeHistory (const std::vector< std::vector< std::string > > &sub_history)
 
static void PrintScalarPPsToCSV (std::ofstream &csvfile, const std::vector< const PostProcessor * > &pp_list)
 
static void PrintVectorPPsToCSV (std::ofstream &csvfile, const std::vector< const PostProcessor * > &pp_list)
 
static void PrintArbitraryPPsToCSV (std::ofstream &csvfile, const std::vector< const PostProcessor * > &pp_list)
 
static std::vector< const PostProcessor * > GetScalarPostProcessorsList (const Event &event)
 
static std::vector< const PostProcessor * > GetVectorPostProcessorsList (const Event &event)
 
static std::vector< const PostProcessor * > GetArbitraryPostProcessorsList (const Event &event)
 
static std::vector< std::vector< std::string > > BuildPPHistoryMatrix (size_t timehistsize, size_t time_history_limit, const std::vector< const PostProcessor * > &pp_sub_list)
 

Private Attributes

std::vector< std::string > events_on_which_to_print_postprocs_
 
ScalarPPTableFormat scalar_pp_table_format_ = ScalarPPTableFormat::VERTICAL
 
bool print_scalar_time_history_ = true
 
bool print_vector_time_history_ = true
 
bool per_column_size_scalars_ = true
 
bool per_column_size_vectors_ = true
 
size_t table_column_limit_ = 120
 
size_t time_history_limit_ = 15
 
std::string csv_filename_
 

Static Private Attributes

static std::shared_ptr< PPPrinterSubscribeHelperhelper_ptr_
 

Detailed Description

A singleton responsible for printing post-processors.

Definition at line 35 of file PostProcessorPrinter.h.

Constructor & Destructor Documentation

◆ PostProcessorPrinter() [1/2]

chi::PostProcessorPrinter::PostProcessorPrinter ( const PostProcessorPrinter )
delete

◆ PostProcessorPrinter() [2/2]

chi::PostProcessorPrinter::PostProcessorPrinter ( )
private

Definition at line 44 of file PostProcessorPrinter_00.cc.

Member Function Documentation

◆ BuildPPHistoryMatrix()

std::vector< std::vector< std::string > > chi::PostProcessorPrinter::BuildPPHistoryMatrix ( size_t  timehistsize,
size_t  time_history_limit,
const std::vector< const PostProcessor * > &  pp_sub_list 
)
staticprivate

Definition at line 73 of file PostProcessorPrinter_xx_utils.cc.

◆ GetArbitraryPostProcessorsList()

std::vector< const PostProcessor * > chi::PostProcessorPrinter::GetArbitraryPostProcessorsList ( const Event event)
staticprivate

Definition at line 54 of file PostProcessorPrinter_xx_utils.cc.

◆ GetInstance()

PostProcessorPrinter & chi::PostProcessorPrinter::GetInstance ( )
static

Definition at line 53 of file PostProcessorPrinter_00.cc.

◆ GetPrintedPostProcessors()

std::string chi::PostProcessorPrinter::GetPrintedPostProcessors ( const std::vector< const PostProcessor * > &  pp_list) const

A manual means to print a post processor.

Definition at line 179 of file PostProcessorPrinter_00.cc.

◆ GetScalarPostProcessorsList()

std::vector< const PostProcessor * > chi::PostProcessorPrinter::GetScalarPostProcessorsList ( const Event event)
staticprivate

Definition at line 16 of file PostProcessorPrinter_xx_utils.cc.

◆ GetVectorPostProcessorsList()

std::vector< const PostProcessor * > chi::PostProcessorPrinter::GetVectorPostProcessorsList ( const Event event)
staticprivate

Definition at line 35 of file PostProcessorPrinter_xx_utils.cc.

◆ operator=()

PostProcessorPrinter chi::PostProcessorPrinter::operator= ( const PostProcessorPrinter )
delete

◆ PrintArbitraryPPsToCSV()

void chi::PostProcessorPrinter::PrintArbitraryPPsToCSV ( std::ofstream &  csvfile,
const std::vector< const PostProcessor * > &  pp_list 
)
staticprivate

Definition at line 94 of file PostProcessorPrinter_01_printcsvfile.cc.

◆ PrintCSVFile()

void chi::PostProcessorPrinter::PrintCSVFile ( const Event event) const
private

Definition at line 12 of file PostProcessorPrinter_01_printcsvfile.cc.

◆ PrintPostProcessors()

void chi::PostProcessorPrinter::PrintPostProcessors ( const Event event) const
private

Definition at line 143 of file PostProcessorPrinter_00.cc.

◆ PrintPPsHorizontal()

std::string chi::PostProcessorPrinter::PrintPPsHorizontal ( const std::vector< std::pair< std::string, std::string > > &  scalar_ppnames_and_vals,
int   
)
staticprivate

Definition at line 45 of file PostProcessorPrinter_00a_latest.cc.

◆ PrintPPsLatestValuesOnly()

void chi::PostProcessorPrinter::PrintPPsLatestValuesOnly ( const std::string &  pps_typename,
const std::vector< const PostProcessor * > &  pp_list,
const Event event 
) const
private

Definition at line 12 of file PostProcessorPrinter_00a_latest.cc.

◆ PrintPPsSubTimeHistory()

std::string chi::PostProcessorPrinter::PrintPPsSubTimeHistory ( const std::vector< std::vector< std::string > > &  sub_history)
staticprivate

Definition at line 147 of file PostProcessorPrinter_00b_history.cc.

◆ PrintPPsTimeHistory()

void chi::PostProcessorPrinter::PrintPPsTimeHistory ( const std::string &  pps_typename,
const std::vector< const PostProcessor * > &  pp_list,
const Event event,
bool  per_column_sizes = false 
) const
private

Lambda to left pad an entry.

Lambda to right pad an entry.

Definition at line 14 of file PostProcessorPrinter_00b_history.cc.

◆ PrintPPsVertical()

std::string chi::PostProcessorPrinter::PrintPPsVertical ( const std::vector< std::pair< std::string, std::string > > &  scalar_ppnames_and_vals,
int  event_code 
)
staticprivate

Definition at line 115 of file PostProcessorPrinter_00a_latest.cc.

◆ PrintScalarPPsToCSV()

void chi::PostProcessorPrinter::PrintScalarPPsToCSV ( std::ofstream &  csvfile,
const std::vector< const PostProcessor * > &  pp_list 
)
staticprivate

Definition at line 28 of file PostProcessorPrinter_01_printcsvfile.cc.

◆ PrintVectorPPsToCSV()

void chi::PostProcessorPrinter::PrintVectorPPsToCSV ( std::ofstream &  csvfile,
const std::vector< const PostProcessor * > &  pp_list 
)
staticprivate

Definition at line 69 of file PostProcessorPrinter_01_printcsvfile.cc.

◆ ReceiveEventUpdate()

void chi::PostProcessorPrinter::ReceiveEventUpdate ( const Event event)

Definition at line 133 of file PostProcessorPrinter_00.cc.

◆ SetCSVFilename()

void chi::PostProcessorPrinter::SetCSVFilename ( const std::string &  csv_filename)

Definition at line 127 of file PostProcessorPrinter_00.cc.

◆ SetEventsOnWhichPrintPPs()

void chi::PostProcessorPrinter::SetEventsOnWhichPrintPPs ( const std::vector< std::string > &  events)

Definition at line 84 of file PostProcessorPrinter_00.cc.

◆ SetPrintScalarTimeHistory()

void chi::PostProcessorPrinter::SetPrintScalarTimeHistory ( bool  value)

Definition at line 91 of file PostProcessorPrinter_00.cc.

◆ SetPrintVectorTimeHistory()

void chi::PostProcessorPrinter::SetPrintVectorTimeHistory ( bool  value)

Definition at line 97 of file PostProcessorPrinter_00.cc.

◆ SetScalarPerColumnSize()

void chi::PostProcessorPrinter::SetScalarPerColumnSize ( bool  value)

Definition at line 103 of file PostProcessorPrinter_00.cc.

◆ SetScalarPPTableFormat()

void chi::PostProcessorPrinter::SetScalarPPTableFormat ( ScalarPPTableFormat  format)

Definition at line 78 of file PostProcessorPrinter_00.cc.

◆ SetTableColumnLimit()

void chi::PostProcessorPrinter::SetTableColumnLimit ( size_t  limit)

Definition at line 115 of file PostProcessorPrinter_00.cc.

◆ SetTimeHistoryLimit()

void chi::PostProcessorPrinter::SetTimeHistoryLimit ( size_t  limit)

Definition at line 121 of file PostProcessorPrinter_00.cc.

◆ SetVectorPerColumnSize()

void chi::PostProcessorPrinter::SetVectorPerColumnSize ( bool  value)

Definition at line 109 of file PostProcessorPrinter_00.cc.

◆ SubscribeToSystemWideEventPublisher()

char chi::PostProcessorPrinter::SubscribeToSystemWideEventPublisher ( )
static

Definition at line 61 of file PostProcessorPrinter_00.cc.

Field Documentation

◆ csv_filename_

std::string chi::PostProcessorPrinter::csv_filename_
private

Definition at line 134 of file PostProcessorPrinter.h.

◆ events_on_which_to_print_postprocs_

std::vector<std::string> chi::PostProcessorPrinter::events_on_which_to_print_postprocs_
private

Definition at line 124 of file PostProcessorPrinter.h.

◆ helper_ptr_

std::shared_ptr< chi::PPPrinterSubscribeHelper > chi::PostProcessorPrinter::helper_ptr_
staticprivate
Initial value:
=
std::make_shared<PPPrinterSubscribeHelper>(
static PostProcessorPrinter & GetInstance()

Definition at line 123 of file PostProcessorPrinter.h.

◆ per_column_size_scalars_

bool chi::PostProcessorPrinter::per_column_size_scalars_ = true
private

Definition at line 129 of file PostProcessorPrinter.h.

◆ per_column_size_vectors_

bool chi::PostProcessorPrinter::per_column_size_vectors_ = true
private

Definition at line 130 of file PostProcessorPrinter.h.

◆ print_scalar_time_history_

bool chi::PostProcessorPrinter::print_scalar_time_history_ = true
private

Definition at line 127 of file PostProcessorPrinter.h.

◆ print_vector_time_history_

bool chi::PostProcessorPrinter::print_vector_time_history_ = true
private

Definition at line 128 of file PostProcessorPrinter.h.

◆ scalar_pp_table_format_

ScalarPPTableFormat chi::PostProcessorPrinter::scalar_pp_table_format_ = ScalarPPTableFormat::VERTICAL
private

Definition at line 126 of file PostProcessorPrinter.h.

◆ table_column_limit_

size_t chi::PostProcessorPrinter::table_column_limit_ = 120
private

Definition at line 131 of file PostProcessorPrinter.h.

◆ time_history_limit_

size_t chi::PostProcessorPrinter::time_history_limit_ = 15
private

Definition at line 132 of file PostProcessorPrinter.h.


The documentation for this class was generated from the following files: