suanPan
vtkParser.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (C) 2017-2024 Theodore Chang
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
******************************************************************************/
17
18
#ifndef VTKPARSER_H
19
#define VTKPARSER_H
20
21
#include <
Recorder/OutputType.h
>
22
#include <
suanPan.h
>
23
24
class
DomainBase
;
25
26
#ifdef SUANPAN_VTK
27
28
#include <vtkSmartPointer.h>
29
30
class
vtkUnstructuredGrid;
31
32
int
vtk_parser
(
const
shared_ptr<DomainBase>&, istringstream&);
33
34
struct
vtkInfo {
35
OutputType
type =
OutputType::U
;
36
double
scale = 1.;
37
bool
on_deformed =
true
;
38
unsigned
font_size = 8;
39
int
canvas_size[2] = {500, 500};
40
bool
save_file =
false
;
41
string
file_name;
42
string
title_name;
43
bool
colorbar =
true
;
44
int
material_type = -1;
45
bool
store_ptr =
false
;
46
vtkSmartPointer<vtkUnstructuredGrid> grid_ptr;
47
};
48
49
vtkInfo vtk_process(istringstream&);
50
51
void
vtk_setup(
const
vtkSmartPointer<vtkUnstructuredGrid>&,
const
vtkInfo&);
52
53
void
vtk_save(vtkSmartPointer<vtkUnstructuredGrid>&&, vtkInfo);
54
55
void
vtk_plot_node_quantity(
const
shared_ptr<DomainBase>&, vtkInfo);
56
57
void
vtk_plot_element_quantity(
const
shared_ptr<DomainBase>&, vtkInfo);
58
59
#else
60
61
inline
int
vtk_parser
(
const
shared_ptr<DomainBase>&, istringstream&) {
return
0; }
62
63
#endif
64
65
#endif
66
OutputType.h
OutputType
OutputType
Definition:
OutputType.h:23
OutputType::U
@ U
DomainBase
The DomainBase class is a template.
Definition:
DomainBase.h:104
suanPan.h
vtk_parser
int vtk_parser(const shared_ptr< DomainBase > &, istringstream &)
Definition:
vtkParser.h:61
Element
Visualisation
vtkParser.h
Generated by
1.9.4