OutputSession_impl< dim, VectorType > Class Template Reference#

DiFfRG: DiFfRG::OutputSession_impl< dim, VectorType > Class Template Reference
DiFfRG
Discretization Framework for functional Renormalization Group flows
DiFfRG::OutputSession_impl< dim, VectorType > Class Template Reference

#include <output_session.hh>

Public Member Functions

 OutputSession_impl ()
 
 OutputSession_impl (const ConfigTree &config)
 
 OutputSession_impl (OutputPath path, Config::OutputSettings settings={})
 
 OutputSession_impl (OutputPath path, const ConfigTree &config)
 
 ~OutputSession_impl () noexcept
 
 OutputSession_impl (const OutputSession_impl &)=delete
 
OutputSession_impl & operator= (const OutputSession_impl &)=delete
 
 OutputSession_impl (OutputSession_impl &&)=delete
 
OutputSession_impl & operator= (OutputSession_impl &&)=delete
 
template<typename Contributor >
void write_frame (const double time, Contributor &&contributor)
 
DiagnosticPort diagnostic_port () const
 
ReportPort report_port () const
 
void drain ()
 
void finish ()
 
void set_Lambda (double Lambda)
 
const std::string & run_name () const noexcept
 
const OutputPath & path () const noexcept
 
bool is_writer_rank () const noexcept
 

Private Member Functions

FEOutput< dim, VectorType > & fe_output ()
 
FEOutput< dim, VectorType > & field_output (const std::string &name)
 
template<typename FieldVectorType >
void configure_field_output (FEOutput< dim, FieldVectorType > &sink, const std::string &group_name)
 
void attach_raw_potential (ReconstructedRawPotential< dim, typename VectorType::value_type > potential)
 
void attach_eom_potential (EoMResult< dim, typename VectorType::value_type > result)
 
CsvOutput & csv (const std::string &name)
 
HDF5Output & hdf5 (const std::string &name)
 
HDF5Output & hdf5 ()
 
void flush_frame (double time)
 
void record_frame (double time)
 
void dump_to_csv (const std::string &name, const std::vector< std::vector< double > > &values, bool append, const std::vector< std::string > &header)
 
void rethrow_deferred_error ()
 
void finish_impl (bool crashed)
 

Static Private Member Functions

static OutputPath path_from (const ConfigTree &config)
 

Private Attributes

OutputPath output_path
 
Config::OutputSettings settings
 
const std::string top_folder
 
const std::string output_name
 
const std::string output_folder
 
double Lambda = -1.
 
bool active = true
 
bool finished = false
 
std::exception_ptr deferred_error
 
std::exception_ptr terminal_error
 
std::mutex submission_mutex
 
RunReporter run_reporter
 
HDF5FrameWriter hdf5_writer
 
FEOutput< dim, VectorType > fe_out
 
std::optional< ReconstructedRawPotential< dim, typename VectorType::value_type > > pending_raw_potential
 
FEOutput< dim, dealii::Vector< typename VectorType::value_type > > potential_fe_out
 
std::vector< ReconstructedEoMPotential< dim, typename VectorType::value_type > > pending_eom_potentials
 
FEOutput< dim, dealii::Vector< typename VectorType::value_type > > eom_potential_fe_out
 
std::map< std::string, FEOutput< dim, VectorType > > named_fe_outs
 
std::set< std::string > pending_named_fe_outs
 
std::map< std::string, CsvOutput > csv_files
 
bool use_hdf5
 
const std::string filename_h5
 
std::map< std::string, HDF5Output > h5_files
 
DiagnosticPort diagnostics_port
 
FrameTimings current_frame
 
OutputTimings timings
 

Friends

class OutputFrame< dim, VectorType >
 

Detailed Description

template<uint dim, typename VectorType>
class DiFfRG::OutputSession_impl< dim, VectorType >

Run-owned output coordinator.

Applications construct one session and inject it into the timestepper. All frame submissions are serialized; VTK writing remains bounded and asynchronous inside FEOutput. No process-global output state is used.

Constructor & Destructor Documentation

◆ OutputSession_impl() [1/6]

template<uint dim, typename VectorType >
DiFfRG::OutputSession_impl< dim, VectorType >::OutputSession_impl ( )
inline

◆ OutputSession_impl() [2/6]

template<uint dim, typename VectorType >
DiFfRG::OutputSession_impl< dim, VectorType >::OutputSession_impl ( const ConfigTree & config)
inlineexplicit

◆ OutputSession_impl() [3/6]

template<uint dim, typename VectorType >
DiFfRG::OutputSession_impl< dim, VectorType >::OutputSession_impl ( OutputPath path,
Config::OutputSettings settings = {} )
explicit

◆ OutputSession_impl() [4/6]

template<uint dim, typename VectorType >
DiFfRG::OutputSession_impl< dim, VectorType >::OutputSession_impl ( OutputPath path,
const ConfigTree & config )
inline

◆ ~OutputSession_impl()

template<uint dim, typename VectorType >
DiFfRG::OutputSession_impl< dim, VectorType >::~OutputSession_impl ( )
noexcept

◆ OutputSession_impl() [5/6]

template<uint dim, typename VectorType >
DiFfRG::OutputSession_impl< dim, VectorType >::OutputSession_impl ( const OutputSession_impl< dim, VectorType > & )
delete

◆ OutputSession_impl() [6/6]

template<uint dim, typename VectorType >
DiFfRG::OutputSession_impl< dim, VectorType >::OutputSession_impl ( OutputSession_impl< dim, VectorType > && )
delete

Member Function Documentation

◆ attach_eom_potential()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::attach_eom_potential ( EoMResult< dim, typename VectorType::value_type > result)
private

◆ attach_raw_potential()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::attach_raw_potential ( ReconstructedRawPotential< dim, typename VectorType::value_type > potential)
private

◆ configure_field_output()

template<uint dim, typename VectorType >
template<typename FieldVectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::configure_field_output ( FEOutput< dim, FieldVectorType > & sink,
const std::string & group_name )
private

◆ csv()

template<uint dim, typename VectorType >
CsvOutput & DiFfRG::OutputSession_impl< dim, VectorType >::csv ( const std::string & name)
private

◆ diagnostic_port()

template<uint dim, typename VectorType >
DiagnosticPort DiFfRG::OutputSession_impl< dim, VectorType >::diagnostic_port ( ) const
inline

◆ drain()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::drain ( )

Join pending writers and surface their first error without closing the session.

◆ dump_to_csv()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::dump_to_csv ( const std::string & name,
const std::vector< std::vector< double > > & values,
bool append,
const std::vector< std::string > & header )
private

◆ fe_output()

template<uint dim, typename VectorType >
FEOutput< dim, VectorType > & DiFfRG::OutputSession_impl< dim, VectorType >::fe_output ( )
inlineprivate

◆ field_output()

template<uint dim, typename VectorType >
FEOutput< dim, VectorType > & DiFfRG::OutputSession_impl< dim, VectorType >::field_output ( const std::string & name)
private

◆ finish()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::finish ( )
inline

Drain pending writers and permanently close the session, marking its HDF5 files finished.

◆ finish_impl()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::finish_impl ( bool crashed)
private

Shared by finish() and the destructor. crashed only selects the value recorded in the HDF5 files' crashed attribute; everything else happens either way.

◆ flush_frame()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::flush_frame ( double time)
private

◆ hdf5() [1/2]

template<uint dim, typename VectorType >
HDF5Output & DiFfRG::OutputSession_impl< dim, VectorType >::hdf5 ( )
private

◆ hdf5() [2/2]

template<uint dim, typename VectorType >
HDF5Output & DiFfRG::OutputSession_impl< dim, VectorType >::hdf5 ( const std::string & name)
private

◆ is_writer_rank()

template<uint dim, typename VectorType >
bool DiFfRG::OutputSession_impl< dim, VectorType >::is_writer_rank ( ) const
inlinenoexcept

◆ operator=() [1/2]

template<uint dim, typename VectorType >
OutputSession_impl & DiFfRG::OutputSession_impl< dim, VectorType >::operator= ( const OutputSession_impl< dim, VectorType > & )
delete

◆ operator=() [2/2]

template<uint dim, typename VectorType >
OutputSession_impl & DiFfRG::OutputSession_impl< dim, VectorType >::operator= ( OutputSession_impl< dim, VectorType > && )
delete

◆ path()

template<uint dim, typename VectorType >
const OutputPath & DiFfRG::OutputSession_impl< dim, VectorType >::path ( ) const
inlinenoexcept

◆ path_from()

template<uint dim, typename VectorType >
static OutputPath DiFfRG::OutputSession_impl< dim, VectorType >::path_from ( const ConfigTree & config)
inlinestaticprivate

◆ record_frame()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::record_frame ( double time)
private

Fold current_frame into the run totals and, at verbosity >= 3, report it.

◆ report_port()

template<uint dim, typename VectorType >
ReportPort DiFfRG::OutputSession_impl< dim, VectorType >::report_port ( ) const
inline

◆ rethrow_deferred_error()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::rethrow_deferred_error ( )
private

◆ run_name()

template<uint dim, typename VectorType >
const std::string & DiFfRG::OutputSession_impl< dim, VectorType >::run_name ( ) const
inlinenoexcept

◆ set_Lambda()

template<uint dim, typename VectorType >
void DiFfRG::OutputSession_impl< dim, VectorType >::set_Lambda ( double Lambda)

◆ write_frame()

template<uint dim, typename VectorType >
template<typename Contributor >
void DiFfRG::OutputSession_impl< dim, VectorType >::write_frame ( const double time,
Contributor && contributor )
inline

Friends And Related Symbol Documentation

◆ OutputFrame< dim, VectorType >

template<uint dim, typename VectorType >
friend class OutputFrame< dim, VectorType >
friend

Member Data Documentation

◆ active

template<uint dim, typename VectorType >
bool DiFfRG::OutputSession_impl< dim, VectorType >::active = true
private

◆ csv_files

template<uint dim, typename VectorType >
std::map<std::string, CsvOutput> DiFfRG::OutputSession_impl< dim, VectorType >::csv_files
private

◆ current_frame

template<uint dim, typename VectorType >
FrameTimings DiFfRG::OutputSession_impl< dim, VectorType >::current_frame
private

Cost split of the frame currently being written; folded into timings by flush_frame.

◆ deferred_error

template<uint dim, typename VectorType >
std::exception_ptr DiFfRG::OutputSession_impl< dim, VectorType >::deferred_error
private

◆ diagnostics_port

template<uint dim, typename VectorType >
DiagnosticPort DiFfRG::OutputSession_impl< dim, VectorType >::diagnostics_port
private

◆ eom_potential_fe_out

template<uint dim, typename VectorType >
FEOutput<dim, dealii::Vector<typename VectorType::value_type> > DiFfRG::OutputSession_impl< dim, VectorType >::eom_potential_fe_out
private

◆ fe_out

template<uint dim, typename VectorType >
FEOutput<dim, VectorType> DiFfRG::OutputSession_impl< dim, VectorType >::fe_out
private

◆ filename_h5

template<uint dim, typename VectorType >
const std::string DiFfRG::OutputSession_impl< dim, VectorType >::filename_h5
private

◆ finished

template<uint dim, typename VectorType >
bool DiFfRG::OutputSession_impl< dim, VectorType >::finished = false
private

◆ h5_files

template<uint dim, typename VectorType >
std::map<std::string, HDF5Output> DiFfRG::OutputSession_impl< dim, VectorType >::h5_files
private

◆ hdf5_writer

template<uint dim, typename VectorType >
HDF5FrameWriter DiFfRG::OutputSession_impl< dim, VectorType >::hdf5_writer
private

Declared before every sink that submits to it, so it is destroyed last. finish() joins it explicitly before h5_files goes away, because ~HDF5Output closes the file and that must not race the worker.

◆ Lambda

template<uint dim, typename VectorType >
double DiFfRG::OutputSession_impl< dim, VectorType >::Lambda = -1.
private

◆ named_fe_outs

template<uint dim, typename VectorType >
std::map<std::string, FEOutput<dim, VectorType> > DiFfRG::OutputSession_impl< dim, VectorType >::named_fe_outs
private

◆ output_folder

template<uint dim, typename VectorType >
const std::string DiFfRG::OutputSession_impl< dim, VectorType >::output_folder
private

◆ output_name

template<uint dim, typename VectorType >
const std::string DiFfRG::OutputSession_impl< dim, VectorType >::output_name
private

◆ output_path

template<uint dim, typename VectorType >
OutputPath DiFfRG::OutputSession_impl< dim, VectorType >::output_path
private

◆ pending_eom_potentials

template<uint dim, typename VectorType >
std::vector<ReconstructedEoMPotential<dim, typename VectorType::value_type> > DiFfRG::OutputSession_impl< dim, VectorType >::pending_eom_potentials
private

◆ pending_named_fe_outs

template<uint dim, typename VectorType >
std::set<std::string> DiFfRG::OutputSession_impl< dim, VectorType >::pending_named_fe_outs
private

◆ pending_raw_potential

template<uint dim, typename VectorType >
std::optional<ReconstructedRawPotential<dim, typename VectorType::value_type> > DiFfRG::OutputSession_impl< dim, VectorType >::pending_raw_potential
private

◆ potential_fe_out

template<uint dim, typename VectorType >
FEOutput<dim, dealii::Vector<typename VectorType::value_type> > DiFfRG::OutputSession_impl< dim, VectorType >::potential_fe_out
private

◆ run_reporter

template<uint dim, typename VectorType >
RunReporter DiFfRG::OutputSession_impl< dim, VectorType >::run_reporter
private

◆ settings

template<uint dim, typename VectorType >
Config::OutputSettings DiFfRG::OutputSession_impl< dim, VectorType >::settings
private

◆ submission_mutex

template<uint dim, typename VectorType >
std::mutex DiFfRG::OutputSession_impl< dim, VectorType >::submission_mutex
mutableprivate

◆ terminal_error

template<uint dim, typename VectorType >
std::exception_ptr DiFfRG::OutputSession_impl< dim, VectorType >::terminal_error
private

◆ timings

template<uint dim, typename VectorType >
OutputTimings DiFfRG::OutputSession_impl< dim, VectorType >::timings
private

◆ top_folder

template<uint dim, typename VectorType >
const std::string DiFfRG::OutputSession_impl< dim, VectorType >::top_folder
private

◆ use_hdf5

template<uint dim, typename VectorType >
bool DiFfRG::OutputSession_impl< dim, VectorType >::use_hdf5
private

The documentation for this class was generated from the following file:
  • /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/discretization/data/output_session.hh