Molecular Dynamics Simulation
1.0
|
Wrapper class to abstract the reading of input files. More...
#include <FileInputHandler.h>
Static Public Member Functions | |
static std::tuple< std::vector< Particle >, std::optional< SimulationParams > > | readFile (const std::filesystem::path &input_file_path, bool fresh=false, bool allow_recursion=true) |
Reads the input file and stores the particles in the given ParticleContainer. Other simulation parameters are returned as SimulationParams object. More... | |
Wrapper class to abstract the reading of input files.
This class abstracts the reading and writing of files, so that the Simulation class does not have to know about the concrete implementations. Automatically determines correct file format using the file extension.
Definition at line 17 of file FileInputHandler.h.
|
static |
Reads the input file and stores the particles in the given ParticleContainer. Other simulation parameters are returned as SimulationParams object.
input_file_path | The path to the input file |
fresh | Whether to start a fresh simulation or reuse cached data |
allow_recursion | Whether to allow subsimulations to be started |
Reads the input file, generates particles and returns them in a vector. Parameters are stored in a SimulationParams
object and returned. For more information about the output file formats, see Input File Formats
Definition at line 8 of file FileInputHandler.cpp.