-
Notifications
You must be signed in to change notification settings - Fork 2
/
VTKBase.jl
57 lines (41 loc) · 1.26 KB
/
VTKBase.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
module VTKBase
include("VTKCellTypes/VTKCellTypes.jl")
using .VTKCellTypes
export VTKCellTypes, VTKCellType
"""
VTKDataType
Union of integer, float and string data types allowed by VTK.
"""
const VTKDataType = Union{Int8, UInt8, Int16, UInt16, Int32, UInt32,
Int64, UInt64, Float32, Float64, String}
"""
AbstractFieldData
Abstract type representing any kind of dataset.
"""
abstract type AbstractFieldData end
"""
VTKPointData <: AbstractFieldData
Represents data that is to be attached to grid points.
"""
struct VTKPointData <: AbstractFieldData end
"""
VTKCellData <: AbstractFieldData
Represents data that is to be attached to grid cells.
"""
struct VTKCellData <: AbstractFieldData end
"""
VTKFieldData <: AbstractFieldData
Represents data that is not attached to the grid geometry.
This is typically used for lightweight metadata, such as timestep information or
strings.
"""
struct VTKFieldData <: AbstractFieldData end
export VTKPointData, VTKCellData, VTKFieldData
# These are the VTK names associated to each data "location".
node_type(::VTKPointData) = "PointData"
node_type(::VTKCellData) = "CellData"
node_type(::VTKFieldData) = "FieldData"
include("grid_types.jl")
include("mesh_cells.jl")
include("polydata.jl")
end