44 solver = makeAuto<HardSphereSolver>(*scheduler, settings);
46 logWriter = makeAuto<NullLogWriter>();
49 triggers.pushBack(makeAuto<ProgressLog>(0.5_f));
54 output->dump(storage, stats);
59 Array<Path> filesToCheck = {
Path(
"galaxy/galaxy_0000.ssf"),
Path(
"galaxy/galaxy_0001.ssf") };
61 for (
Path file : filesToCheck) {
71 for (
Path file : filesToCheck) {
void measureRun(const Path &file, Function< void()> run)
Outcome areFilesApproxEqual(const Path &path1, const Path &path2)
Checks if two .ssf files are almost equal (may have eps-differences in quantities).
const SuccessTag SUCCESS
Global constant for successful outcome.
Generic dynamically allocated resizable storage.
virtual void tearDown(const Storage &storage, const Statistics &stats) override
Called after the run.
virtual void setUp(SharedPtr< Storage > storage) override
Prepares the run, creates logger, output, ...
Defines the interface for a run.
Statistics run(Storage &storage)
Runs the simulation.
Object representing a path on a filesystem.
Settings & set(const TEnum idx, TValue &&value, std::enable_if_t<!std::is_enum< std::decay_t< TValue >>::value, int >=0)
Saves a value into the settings.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
TEST_CASE("Galaxy", "[galaxy]")
@ ACCELERATION
Time step computed from ratio of acceleration and smoothing length.
@ LEAP_FROG
Leap-frog 2nd-order integration.
@ REPEL
Particles are shifted until no overlap happens.
@ RUN_OUTPUT_INTERVAL
Time interval of dumping data to disk.
@ TIMESTEPPING_MAX_TIMESTEP
@ COLLISION_HANDLER
Specifies how the collisions of particles should be handler; see CollisionHandlerEnum.
@ RUN_OUTPUT_PATH
Path where all output files (dumps, logs, ...) will be written.
@ TIMESTEPPING_INITIAL_TIMESTEP
@ TIMESTEPPING_DERIVATIVE_FACTOR
Multiplicative factor k for the derivative criterion; dt = k * v / dv.
@ RUN_OUTPUT_TYPE
Selected format of the output file, see IoEnum.
@ TIMESTEPPING_INTEGRATOR
Selected timestepping integrator.
@ COLLISION_RESTITUTION_TANGENT
@ COLLISION_OVERLAP
Specifies how particle overlaps should be handled.
@ RUN_NAME
User-specified name of the run, used in some output files.
@ GRAVITY_CONSTANT
Gravitational constant. To be generalized.
@ GRAVITY_KERNEL
Gravity smoothing kernel.
@ COLLISION_RESTITUTION_NORMAL
@ RUN_OUTPUT_NAME
File name of the output file (including extension), where d is a placeholder for output number.
SharedPtr< IScheduler > getScheduler(const RunSettings &settings=RunSettings::getDefaults())
Outcome removePath(const Path &path, const Flags< RemovePathFlag > flags=EMPTY_FLAGS)
Storage generateIc(const RunSettings &globals, const GalaxySettings &settings, const IProgressCallbacks &callbacks)