PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
vtkParticleReader.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2024 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#ifndef RW_VTK_PARTICLE_READER_H
12#define RW_VTK_PARTICLE_READER_H
13
14#include <string>
15
16// if clion does not load vtk header files, invalidate cache in File menu following https://stackoverflow.com/a/78215443
17#include <vtkSmartPointer.h>
18#include <vtkUnstructuredGrid.h>
19#include <vtkXMLUnstructuredGridReader.h>
20
21// forward declaration
22namespace model {
23class ModelData;
24}
25
26namespace rw {
27
28namespace reader {
29
32
33public:
38 explicit VtkParticleReader(const std::string &filename);
39
50
52 void close();
53
54private:
56 vtkSmartPointer<vtkXMLUnstructuredGridReader> d_reader_p;
57
59 vtkSmartPointer<vtkUnstructuredGrid> d_grid_p;
60};
61
62} // namespace reader
63
64} // namespace rw
65
66#endif // RW_VTK_PARTICLE_READER_H
A class to store model data.
Definition modelData.h:47
A vtk writer for simple point data and complex fem mesh data.
vtkSmartPointer< vtkUnstructuredGrid > d_grid_p
Unstructured grid.
void close()
Closes the file and store it to the hard disk.
void readNodes(model::ModelData *model)
Writes the nodes to the file.
vtkSmartPointer< vtkXMLUnstructuredGridReader > d_reader_p
XML unstructured grid writer.
Collection of methods and database related to reading and writing.