MPS-Basic
Loading...
Searching...
No Matches
loader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "common.hpp"
4#include "input.hpp"
5#include "particles.hpp"
7
8#include <filesystem>
9#include <utility>
10#include <vector>
11
12namespace fs = std::filesystem;
13
22class Loader {
23public:
24 Loader() = default;
25
34 Input load(const fs::path& settingPath, const fs::path& outputDirectory);
35
36private:
37 std::unique_ptr<ParticlesLoader::Interface> particlesLoader;
38
39 std::unique_ptr<ParticlesLoader::Interface> getParticlesLoader(const fs::path& particlesPath);
40 void copyInputFileToOutputDirectory(const fs::path& inputFilePath, const fs::path& outputDirectory);
41 Settings loadSettingYaml(const fs::path& settingPath);
42};
Class for loading setting file and particle file.
Definition loader.hpp:22
std::unique_ptr< ParticlesLoader::Interface > particlesLoader
Definition loader.hpp:37
std::unique_ptr< ParticlesLoader::Interface > getParticlesLoader(const fs::path &particlesPath)
Get the Particles Loader object according to the input file extension.
Definition loader.cpp:39
void copyInputFileToOutputDirectory(const fs::path &inputFilePath, const fs::path &outputDirectory)
Copy the input file to the output directory.
Definition loader.cpp:57
Loader()=default
Input load(const fs::path &settingPath, const fs::path &outputDirectory)
Load the setting file and the particle file.
Definition loader.cpp:16
Settings loadSettingYaml(const fs::path &settingPath)
Definition loader.cpp:67
Represents the input data for MPS simulation.
Definition input.hpp:12
Struct for settings of calculation.
Definition settings.hpp:15