AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Report.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 REPORT_H_INCLUDED
25#define REPORT_H_INCLUDED
26
27#include <string>
28#include <stdexcept>
29#include <sphPrerequisites.h>
31
32namespace Aqua {
33namespace InputOutput {
34
55class Report : public InputOutput
56{
57 public:
62 virtual void save(float t) = 0;
63
70 virtual void load() { throw std::logic_error("Report cannot load files"); }
71
75 std::string file() { return _output_file; }
76
77 protected:
79 Report();
80
82 virtual ~Report();
83
88 void file(std::string filename);
89
100 void file(std::string basename, unsigned int start_index);
101
102 private:
104 std::string _output_file;
105
106}; // class InputOutput
107
108}
109} // namespaces
110
111#endif // REPORT_H_INCLUDED
Base class for all the input/output file managers. (See Aqua::InputOutput::InputOutput for details)
Base class for input/output file managers.
Definition: InputOutput.h:38
Base class for all the report file managers.
Definition: Report.h:56
std::string file()
Get the used output file path.
Definition: Report.h:75
virtual void load()
Load the data.
Definition: Report.h:70
virtual ~Report()
Destructor.
Definition: Report.cpp:35
virtual void save(float t)=0
Save the data.
Report()
Constructor.
Definition: Report.cpp:33
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45
static std::string filename
Definition: AuxiliarMethods.cpp:336
Set of definitions and macros related with the implementation.