Reaktoro 
A unified framework for modeling chemically reactive systems
Reaktoro::ChemicalOutput Class Reference

Detailed Description

A type used to output sequence of chemical states to a file or terminal.

#include <ChemicalOutput.hpp>

Public Member Functions

 ChemicalOutput ()
 Construct a default ChemicalOutput instance.
 
 ChemicalOutput (const ChemicalSystem &system)
 Construct a ChemicalOutput instance with given ChemicalSystem instance.
 
 ChemicalOutput (const ReactionSystem &reactions)
 Construct a ChemicalOutput instance with given ReactionSystem instance.
 
virtual ~ChemicalOutput ()
 Destroy this ChemicalOutput instance.
 
auto filename (std::string filename) -> void
 Set the name of the output file.
 
auto filename () const -> std::string
 Return the name of the output file.
 
auto add (std::string quantity) -> void
 Add a quantity to be output. More...
 
auto add (std::string quantity, std::string label) -> void
 Add a quantity to be output. More...
 
auto attachments (std::vector< std::string > titles) -> void
 Set the titles of extra columns in the output file.
 
auto attach (int value) -> void
 Attach value to extra column data in the output file.
 
auto attach (double value) -> void
 Attach extra column data in the output file.
 
auto attach (std::string value) -> void
 Attach extra column data in the output file.
 
auto precision (int val) -> void
 Set the floating-point precision in the output.
 
auto scientific (bool enable) -> void
 Enable or disable output in scientific format.
 
auto terminal (bool enabled) -> void
 Enable or disable the output to the terminal.
 
auto quantities () const -> std::vector< std::string >
 Return the name of the quantities in the output file.
 
auto headings () const -> std::vector< std::string >
 Return the headings of the output file.
 
auto open () -> void
 Open the output file.
 
auto update (const ChemicalState &state, double t) -> void
 Update the output with a new chemical state and its tag.
 
auto close () -> void
 Close the output file.
 
 operator bool () const
 Convert this ChemicalOutput instance to bool.
 

Member Function Documentation

auto Reaktoro::ChemicalOutput::add ( std::string  quantity) -> void

Add a quantity to be output.

Parameters
quantityThe quantity name.
auto Reaktoro::ChemicalOutput::add ( std::string  quantity,
std::string  label 
) -> void

Add a quantity to be output.

Parameters
quantityThe quantity name.
labelThe label to be used in the headings.

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