8 int main(
int argc,
char* argv[]) {
10 std::cout <<
"Usage: ssftotxt file.ssf" << std::endl;
17 Path inputPath(argv[1]);
20 Outcome outcome = input.
load(inputPath, storage, stats);
22 std::cout <<
"Success" << std::endl;
24 std::cout <<
"Cannot load binary file:" << std::endl << outcome.
error() << std::endl;
30 output.
dump(storage, stats);
31 }
catch (
const std::exception& e) {
32 std::cout <<
"Cannot save text file: " << std::endl << e.what() << std::endl;
int main(int argc, char *argv[])
INLINE const TError & error() const
Returns the error message.
Object representing a path on a filesystem.
Path & replaceExtension(const std::string &newExtension)
Changes the extension of the file.
Dumps data into a file that can be used as an input for pkdgrav code by Richardson et al.
virtual Expected< Path > dump(const Storage &storage, const Statistics &stats) override
Saves data from particle storage into the file.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.