AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
SetTabFile.hpp
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
23
24#ifndef SETTABFILE_H_INCLUDED
25#define SETTABFILE_H_INCLUDED
26
27#include <fstream>
29#include "Report.hpp"
30
31namespace Aqua {
32namespace CalcServer {
33namespace Reports {
34
64{
65 public:
80 SetTabFile(const std::string tool_name,
81 const std::string fields,
82 size_t first,
83 size_t n,
84 const std::string output_file,
85 unsigned int ipf = 1,
86 float fps = 0.f);
87
91
94 void setup();
95
100 void print();
101
102 protected:
107 cl_event _execute(const std::vector<cl_event> events);
108
113 ulvec2 bounds() { return _bounds; }
114
120 std::vector<cl_event> download(std::vector<InputOutput::Variable*> vars);
121
122 private:
126 void clearList(std::vector<void*>* data);
127
129 ulvec2 _bounds;
131 std::vector<void*> _data;
132
134 std::string _output_file;
136 std::ofstream _f;
137};
138
139}
140}
141} // namespace
142
143#endif // SETTABFILE_H_INCLUDED
Runtime output base class. (See Aqua::CalcServer::Reports::Report for details)
Runtime outputs base class.
Definition Report.hpp:50
const std::string data(bool with_title=true, bool with_names=true, bool synced=false)
Return the text string of the data to be printed.
Definition Report.cpp:63
SetTabFile(const std::string tool_name, const std::string fields, size_t first, size_t n, const std::string output_file, unsigned int ipf=1, float fps=0.f)
Constructor.
Definition SetTabFile.cpp:35
cl_event _execute(const std::vector< cl_event > events)
Definition SetTabFile.cpp:208
~SetTabFile()
Destructor.
Definition SetTabFile.cpp:58
std::vector< cl_event > download(std::vector< InputOutput::Variable * > vars)
Definition SetTabFile.cpp:256
void setup()
Initialize the tool.
Definition SetTabFile.cpp:66
void print()
Definition SetTabFile.cpp:124
ulvec2 bounds()
Get the particle index bounds of the "set of particles" managed by this class.
Definition SetTabFile.hpp:113
__kernel void fields(__global const unsigned int *iset, __global const uint *isplit, __global const usize *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, __constant float *dr_level0, usize N, LINKLIST_LOCAL_PARAMS)
Collect the children, and the seed itself, in order to compute the field values of the buffer partner...
Definition Coalesce.cl:426
Runtime outputs name space.
Definition Dump.cpp:34
Calculation server name space.
Definition Assert.cpp:32
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50
Set of definitions and macros related with the implementation.