AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
VTK.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 VTK_H_INCLUDED
25#define VTK_H_INCLUDED
26
27#include <pthread.h>
28
29#include <vtkVersion.h>
30#include <vtkSmartPointer.h>
31#include <vtkXMLUnstructuredGridWriter.h>
32#include <vtkXMLUnstructuredGridReader.h>
33#include <vtkUnstructuredGrid.h>
34#include <vtkFloatArray.h>
35#include <vtkIntArray.h>
36#include <vtkUnsignedIntArray.h>
37#include <vtkPointData.h>
38#include <vtkPoints.h>
39#include <vtkVertex.h>
40#include <vtkCellArray.h>
41
42#include <xercesc/dom/DOM.hpp>
43#include <xercesc/dom/DOMDocument.hpp>
44#include <xercesc/dom/DOMDocumentType.hpp>
45#include <xercesc/dom/DOMElement.hpp>
46#include <xercesc/dom/DOMImplementation.hpp>
47#include <xercesc/dom/DOMImplementationLS.hpp>
48#include <xercesc/dom/DOMNodeIterator.hpp>
49#include <xercesc/dom/DOMNodeList.hpp>
50#include <xercesc/dom/DOMText.hpp>
51#include <xercesc/parsers/XercesDOMParser.hpp>
52#include <xercesc/framework/StdOutFormatTarget.hpp>
53#include <xercesc/framework/LocalFileFormatTarget.hpp>
54#include <xercesc/util/XMLUni.hpp>
55
56#include <sphPrerequisites.h>
58
59namespace Aqua {
60namespace InputOutput {
61
92class VTK : public Particles
93{
94 public:
103 VTK(ProblemSetup& sim_data,
104 unsigned int iset,
105 unsigned int offset,
106 unsigned int n = 0);
107
110
115 void save(float t);
116
119 void load();
120
129
130 private:
134 const unsigned int compute_n();
135
142 vtkXMLUnstructuredGridWriter* create();
143
150 void updatePVD(float t);
151
160 xercesc::DOMDocument* getPVD(bool generate = true);
161
165 const std::string filenamePVD();
166
168 unsigned int _next_file_index;
169
171 std::string _namePVD;
172
174 std::vector<pthread_t> _tids;
175
176}; // class InputOutput
177
178}
179} // namespaces
180
181#endif // VTK_H_INCLUDED
Particles files manager. (See Aqua::InputOutput::Particles for details)
Particles file loader/saver base class.
Definition: Particles.h:52
unsigned int n()
Get the number of particles managed by this instance.
Definition: Particles.h:78
Simulation configuration data.
Definition: ProblemSetup.h:91
VTK particles data files loader/saver.
Definition: VTK.h:93
void save(float t)
Save the data.
void load()
Load the data.
void waitForSavers()
Wait for the parallel saving threads.
VTK(ProblemSetup &sim_data, unsigned int iset, unsigned int offset, unsigned int n=0)
Constructor.
__kernel void generate(__global int *imove, __global int *iset, __global const unsigned int *isplit, __global unsigned int *split_invperm, __global unsigned int *ilevel, __global unsigned int *level, __global int *miter, __global uint *mybuffer, unsigned int N, unsigned int nbuffer)
Associate a buffer particle to a seed.
Definition: Coalesce.cl:368
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45
Set of definitions and macros related with the implementation.