AQUAgpusph
5.0.4
Loading...
Searching...
No Matches
aquagpusph
aquagpusph
InputOutput
VTK.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 VTK_H_INCLUDED
25
#define VTK_H_INCLUDED
26
27
#include <vtkVersion.h>
28
#include <vtkSmartPointer.h>
29
#include <vtkXMLUnstructuredGridWriter.h>
30
#include <vtkXMLUnstructuredGridReader.h>
31
#include <vtkUnstructuredGrid.h>
32
#include <vtkFloatArray.h>
33
#include <vtkDoubleArray.h>
34
#include <vtkTypeInt32Array.h>
35
#include <vtkTypeInt64Array.h>
36
#include <vtkTypeUInt32Array.h>
37
#include <vtkTypeUInt64Array.h>
38
#include <vtkPointData.h>
39
#include <vtkPoints.h>
40
#include <vtkVertex.h>
41
#include <vtkCellArray.h>
42
43
#ifdef VTK_NLOHMANN_JSON
44
#include <vtk_nlohmannjson.h>
45
#include VTK_NLOHMANN_JSON(json.hpp)
46
#else
47
#include <nlohmann/json.hpp>
48
#endif
// VTK_NLOHMANN JSON
49
50
#include "
aquagpusph/sphPrerequisites.hpp
"
51
#include "
Particles.hpp
"
52
53
namespace
Aqua
{
54
namespace
InputOutput
{
55
86
class
VTK
:
public
Particles
87
{
88
public
:
97
VTK
(
ProblemSetup
& sim_data,
98
unsigned
int
iset,
99
size_t
offset,
100
size_t
n
= 0);
101
103
~VTK
();
104
109
void
save
(
float
t);
110
113
void
load
();
114
119
void
print_file
() final;
120
121
private:
128
vtkUnstructuredGrid* makeVTK();
129
133
void
editVTK();
134
138
size_t
compute_n();
139
146
vtkXMLUnstructuredGridWriter* create();
147
154
void
updateSeries(
float
t);
155
159
const
std::
string
filenameSeries();
160
162
unsigned
int
_next_file_index;
163
165
vtkUnstructuredGrid* _vtk;
166
168
std::
string
_name_series;
169
171
nlohmann::
json
_data_series;
172
173
};
// class InputOutput
174
175
}
176
}
// namespaces
177
178
#endif
// VTK_H_INCLUDED
Particles.hpp
Particles files manager. (See Aqua::InputOutput::Particles for details)
json
nlohmann::json json
Definition
Performance.cpp:38
Aqua::InputOutput::Particles::Particles
Particles(ProblemSetup &sim_data, unsigned int iset, size_t offset, size_t n=0)
Constructor.
Definition
Particles.cpp:34
Aqua::InputOutput::Particles::n
size_t n() const
Get the number of particles managed by this instance.
Definition
Particles.hpp:80
Aqua::InputOutput::ProblemSetup
Simulation configuration data.
Definition
ProblemSetup.hpp:91
Aqua::InputOutput::VTK::VTK
VTK(ProblemSetup &sim_data, unsigned int iset, size_t offset, size_t n=0)
Constructor.
Aqua::InputOutput::VTK::save
void save(float t)
Save the data.
Aqua::InputOutput::VTK::print_file
void print_file() final
Print the data to a file.
Aqua::InputOutput::VTK::load
void load()
Load the data.
Aqua::InputOutput::VTK::~VTK
~VTK()
Destructor.
const
#define const
Definition
getopt.c:38
Aqua::InputOutput
Input/Output data interfaces.
Definition
ArgumentsManager.cpp:51
Aqua
Main AQUAgpusph namespace.
Definition
ArgumentsManager.cpp:50
sphPrerequisites.hpp
Set of definitions and macros related with the implementation.
Generated by
1.14.0