8 int main(
int argc,
char* argv[]) {
10 std::cout <<
"Usage: ssftoscf file.ssf" << std::endl;
17 Path inputPath(argv[1]);
20 std::cout <<
"Cannot get binary file info: " << std::endl << info.
error() << std::endl;
24 Outcome outcome = input.
load(inputPath, storage, stats);
26 std::cout <<
"Success" << std::endl;
28 std::cout <<
"Cannot load binary file:" << std::endl << outcome.
error() << std::endl;
35 output.
dump(storage, stats);
36 }
catch (
const std::exception& e) {
37 std::cout <<
"Cannot save compressed file: " << std::endl << e.what() << std::endl;
@ SPH
Main SPH simulation.
int main(int argc, char *argv[])
INLINE const TError & error() const
Returns the error message.
virtual Expected< Path > dump(const Storage &storage, const Statistics &stats) override
Saves data from particle storage into the file.
Wrapper of type that either contains a value of given type, or an error message.
const Error & error() const
Returns the error message.
Type valueOr(const Type &other) const
Returns the expected value or given alternative if the object contains unexpected value.
Object representing a path on a filesystem.
Path & replaceExtension(const std::string &newExtension)
Changes the extension of the file.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.