AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
FileManager.h
Go to the documentation of this file.
1/*
2 * This file is part of AQUAgpusph, a free CFD program based on SPH.
3 * Copyright (C) 2012 Jose Luis Cercos Pita <jl.cercos@upm.es>
4 *
5 * AQUAgpusph is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * AQUAgpusph is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with AQUAgpusph. If not, see <http://www.gnu.org/licenses/>.
17 */
18
24#ifndef FILEMANAGER_H_INCLUDED
25#define FILEMANAGER_H_INCLUDED
26
27#include <string>
28#include <vector>
29
30#include <sphPrerequisites.h>
31#include <ProblemSetup.h>
32#include <CalcServer.h>
33#include <InputOutput/State.h>
35
36namespace Aqua {
38namespace InputOutput {
39
50{
51 public:
54
57
66 void inputFile(std::string path);
67
76 std::string inputFile() { return _in_file; }
77
90 ProblemSetup& problemSetup() { return _simulation; }
91
103
115 void save(float t);
116
125 void waitForSavers();
126
127 private:
129 State _state;
130
132 ProblemSetup _simulation;
133
135 std::string _in_file;
136
138 std::vector<Particles*> _loaders;
139
141 std::vector<Particles*> _savers;
142}; // class FileManager
143
144}
145} // namespaces
146
147#endif // FILEMANAGER_H_INCLUDED
The calculation main entry point. (See Aqua::CalcServer::CalcServer for details)
Particles files manager. (See Aqua::InputOutput::Particles for details)
Simulation configuration data structures. (See Aqua::InputOutput::ProblemSetup for details)
Simulation configuration files manager. (See Aqua::InputOutput::State for details)
Exception raised when the user manually interrupts the simulation.
Definition: CalcServer.h:92
Input/Output files manager. This class acts as a base class, controlling the subclasses which will lo...
Definition: FileManager.h:50
void save(float t)
Save the output data files.
Definition: FileManager.cpp:139
void waitForSavers()
Wait for the parallel saving threads.
Definition: FileManager.cpp:151
ProblemSetup & problemSetup()
Get the simulation setup, extracted from the XML definition files.
Definition: FileManager.h:90
std::string inputFile()
Get the main XML input file path.
Definition: FileManager.h:76
~FileManager()
Destructor.
Definition: FileManager.cpp:42
CalcServer::CalcServer * load()
Load the input files, generating the calculation server.
Definition: FileManager.cpp:59
FileManager()
Constructor.
Definition: FileManager.cpp:35
Simulation configuration data.
Definition: ProblemSetup.h:91
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45
Definition: State.py:1
Set of definitions and macros related with the implementation.