suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
vtkBase.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (C) 2017-2026 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
******************************************************************************/
30
#ifndef VTKBASE_H
31
#define VTKBASE_H
32
33
#ifdef SUANPAN_VTK
34
#include <vtkCell.h>
35
#include <vtkPoints.h>
36
#include <vtkSmartPointer.h>
37
#endif
38
39
enum class
OutputType
;
40
41
class
vtkBase
{
42
#ifdef SUANPAN_VTK
43
[[nodiscard]]
virtual
vtkSmartPointer<vtkCell> GetCell()
const
{
return
nullptr
; }
44
45
public
:
46
vtkBase
() =
default
;
47
virtual
~vtkBase
() =
default
;
48
49
[[nodiscard]] vtkSmartPointer<vtkCell> Setup(
const
uvec
& encoding)
const
{
50
auto
cell = GetCell();
51
if
(cell)
52
for
(vtkIdType I = 0; I < cell->GetNumberOfPoints(); ++I) cell->GetPointIds()->SetId(I,
static_cast<
vtkIdType
>
(encoding(I)));
53
return
cell;
54
}
55
64
virtual
mat GetData(
OutputType
) {
return
{}; }
65
66
virtual
mat GetDeformation(
double
) {
return
{}; }
67
#endif
68
};
69
70
#endif
71
OutputType
OutputType
Definition
OutputType.h:23
uvec
vtkBase
The vtkBase class.
Definition
vtkBase.h:41
Element
Visualisation
vtkBase.h
Generated by
1.9.8