AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
SetTabFile.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 SETSetTabFile_H_INCLUDED
25#define SETSetTabFile_H_INCLUDED
26
27#include <fstream>
28#include <sphPrerequisites.h>
30
31namespace Aqua{ namespace CalcServer{ namespace Reports{
32
62{
63public:
78 SetTabFile(const std::string tool_name,
79 const std::string fields,
80 unsigned int first,
81 unsigned int n,
82 const std::string output_file,
83 unsigned int ipf=1,
84 float fps=0.f);
85
89
92 void setup();
93
94protected:
99 cl_event _execute(const std::vector<cl_event> events);
100
105 uivec2 bounds(){return _bounds;}
106
112 std::vector<void*> download(std::vector<InputOutput::Variable*> vars);
113
114private:
118 void clearList(std::vector<void*> *data);
119
121 uivec2 _bounds;
122
124 std::string _output_file;
126 std::ofstream _f;
127};
128
129}}} // namespace
130
131#endif // SETSetTabFile_H_INCLUDED
Runtime output base class. (See Aqua::CalcServer::Reports::Report for details)
Runtime outputs base class.
Definition: Report.h:49
const std::string data(bool with_title=true, bool with_names=true)
Return the text string of the data to be printed.
Definition: Report.cpp:56
Particles set runtime output.
Definition: SetTabFile.h:62
cl_event _execute(const std::vector< cl_event > events)
Definition: SetTabFile.cpp:83
~SetTabFile()
Destructor.
Definition: SetTabFile.cpp:54
std::vector< void * > download(std::vector< InputOutput::Variable * > vars)
Definition: SetTabFile.cpp:244
void setup()
Initialize the tool.
Definition: SetTabFile.cpp:59
uivec2 bounds()
Get the particle index bounds of the "set of particles" managed by this class.
Definition: SetTabFile.h:105
__kernel void fields(__global const unsigned int *iset, __global const uint *isplit, __global const uint *mybuffer, __global const unsigned int *ilevel, __global const float *split_weight, __global float *m0, __global float *m, __global vec *r, __global vec *u, __global vec *dudt, __global float *rho, __global float *drhodt, __global const uint *icell, __global const uint *ihoc, __constant float *dr_level0, unsigned int N, uivec4 n_cells)
Collect the children, and the seed itself, in order to compute the field values of the buffer partner...
Definition: Coalesce.cl:435
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45
Set of definitions and macros related with the implementation.