8 int main(
int argc,
char* argv[]) {
10 std::cout <<
"Usage: meshtossf mesh.ext out.ssf" << std::endl;
14 Path meshPath(argv[1]);
17 meshLoader = makeAuto<PlyFile>();
19 meshLoader = makeAuto<TabFile>();
21 meshLoader = makeAuto<ObjFile>();
23 std::cout <<
"Unknown file format: " << meshPath.
extension().
native() << std::endl;
29 std::cout <<
"Cannot load mesh file: " << triangles.
error() << std::endl;
36 for (
Size i = 0; i < r.
size(); ++i) {
44 Path ssfPath(argv[2]);
47 output.
dump(storage, stats);
uint32_t Size
Integral type used to index arrays (by default).
Domain represented by triangular mesh.
int main(int argc, char *argv[])
@ POSITION
Positions (velocities, accelerations) of particles, always a vector quantity,.
@ SECOND
Quantity with 1st and 2nd derivative.
SequentialScheduler SEQUENTIAL
Global instance of the sequential scheduler.
@ RUN_TIME
Current time of the simulation in code units. Does not necessarily have to be 0 when run starts.
@ TIMESTEP_VALUE
Current value of timestep.
Generic dynamically allocated resizable storage.
INLINE TCounter size() const noexcept
Wrapper of pointer that deletes the resource from destructor.
Output saving data to binary data without loss of precision.
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 & value()
Returns the reference to expected value.
virtual Array< Vector > generate(IScheduler &scheduler, const Size n, const IDomain &domain) const override
Generates the requested number of particles in the domain.
Domain represented by triangular mesh.
Object representing a path on a filesystem.
std::string native() const
Returns the native version of the path.
Path extension() const
Returns the extension of the filename.
static const Settings & getDefaults()
\brief Returns a reference to object containing default values of all settings.
Object holding various statistics about current run.
Statistics & set(const StatisticsId idx, TValue &&value)
Sets new values of a statistic.
Container storing all quantities used within the simulations.
Quantity & insert(const QuantityId key, const OrderEnum order, const TValue &defaultValue)
Creates a quantity in the storage, given its key, value type and order.