SPH
|
Output saving data to text (human readable) file. More...
#include <Output.h>
Public Types | |
enum class | Options { DUMP_ALL = 1 << 0 , SCIENTIFIC = 1 << 1 } |
Public Member Functions | |
TextOutput (const OutputFile &fileMask, const std::string &runName, Flags< OutputQuantityFlag > quantities, Flags< Options > options=EMPTY_FLAGS) | |
Creates a new text file output. More... | |
~TextOutput () | |
TextOutput & | addColumn (AutoPtr< ITextColumn > &&column) |
Adds a new column to be saved into the file. More... | |
virtual Expected< Path > | dump (const Storage &storage, const Statistics &stats) override |
Saves data from particle storage into the file. More... | |
![]() | |
IOutput (const OutputFile &fileMask) | |
Constructs output given the file name of the output. More... | |
![]() | |
virtual | ~Polymorphic () |
Additional Inherited Members | |
![]() | |
OutputFile | paths |
|
strong |
TextOutput::TextOutput | ( | const OutputFile & | fileMask, |
const std::string & | runName, | ||
Flags< OutputQuantityFlag > | quantities, | ||
Flags< Options > | options = EMPTY_FLAGS |
||
) |
Creates a new text file output.
fileMask | Path where the file will be stored. Can contain wildcards, see IOutput constructor documentation. |
runName | Arbitrary label of the simulation, saved in the file header/ |
quantities | List of quantities to store. Note that arbitrary quantities can be later added using addColumn. |
options | Parameters of the file, see Options enum. |
Definition at line 180 of file Output.cpp.
|
default |
TextOutput & TextOutput::addColumn | ( | AutoPtr< ITextColumn > && | column | ) |
Adds a new column to be saved into the file.
Unless an option is specified in constructor, the file has no columns. All quantities must be explicitly added using this function. The column is added to the right end of the text file.
column | New column to save; see ITextColumn and derived classes |
Definition at line 251 of file Output.cpp.
|
overridevirtual |
Saves data from particle storage into the file.
Returns the filename of the dump, generated from file mask given in constructor, or an error message in case writing the output file failed.
Implements IOutput.
Reimplemented in GnuplotOutput.
Definition at line 192 of file Output.cpp.