References
Contents
Index
VTKLegacy.RectilinearGridVTKLegacy.StructuredGridVTKLegacy.StructuredPointsVTKLegacy.UnstructuredGridVTKLegacy.VTKDataSetBase.getindexBase.showVTKLegacy.LoadVTKVTKLegacy.WriteVTKVTKLegacy.integrateVTKLegacy.magnitudeVTKLegacy.magnitudeVTKLegacy.magnitudeVTKLegacy.ranges
API
VTKLegacy.RectilinearGrid — Type
RectilinearGridObject that contains all the information and datasets from a Legacy VTK file with a RECTILINEAR_GRID geometry/topology.
Fields
title::String: Title of the VTK file.nx::Int32: Number of points in thexdirection.ny::Int32: Number of points in theydirection.nz::Int32: Number of points in thezdirection.dimensions::Vector{Int64}: Number of points in each dimension:[nx,ny,nz].xCoordinates::Vector{Float64}: Domain subdivisions in the "x" axis.yCoordinates::Vector{Float64}: Domain subdivisions in the "y" axis.zCoordinates::Vector{Float64}: Domain subdivisions in the "z" axis.cellData::Union{Array{AbstractFloat,4}, Nothing}: Array containing each dataset in the CELL_DATA section.cellDataNames::Vector{String}: Name of each dataset in the CELL_DATA section.cellDataAttributes::Vector{String}: Attribute of each dataset in the CELL_DATA section.cellDict::Dict{String,IntOrRng}: Dictionary with thecellDataNamesas thekeysand the indexes ofcellDataas thevalues.pointData::Union{Array{AbstractFloat,4}, Nothing}: Array containing each dataset in the POINT_DATA section.pointDataNames::Vector{String}: Name of each dataset in the POINT_DATA section.pointDataAttributes::Vector{String}: Attribute of each dataset in the POINT_DATA section.pointDict::Dict{String,IntOrRng}: Dictionary with thepointDataNamesas thekeysand the indexes ofpointDataas thevalues.
VTKLegacy.StructuredGrid — Type
StructuredGridObject that contains all the information and datasets from a Legacy VTK file with a STRUCTURED_GRID geometry/topology.
Fields
title::String: Title of the VTK file.nx::Int32: Number of points in thexdirection.ny::Int32: Number of points in theydirection.nz::Int32: Number of points in thezdirection.dimensions::Vector{Int64}: Number of points in each dimension:[nx,ny,nz].npoints::Int32: Number of points that define the cells.points::Array{AbstractFloat,2}: Array containing the coordinates of the points in the grid.cellData::Union{Array{AbstractFloat,4}, Nothing}: Array containing each dataset in the CELL_DATA section.cellDataNames::Vector{String}: Name of each dataset in the CELL_DATA section.cellDataAttributes::Vector{String}: Attribute of each dataset in the CELL_DATA section.cellDict::Dict{String,IntOrRng}: Dictionary with thecellDataNamesas thekeysand the indexes ofcellDataas thevalues.pointData::Union{Array{AbstractFloat,4}, Nothing}: Array containing each dataset in the POINT_DATA section.pointDataNames::Vector{String}: Name of each dataset in the POINT_DATA section.pointDataAttributes::Vector{String}: Attribute of each dataset in the POINT_DATA section.pointDict::Dict{String,IntOrRng}: Dictionary with thepointDataNamesas thekeysand the indexes ofpointDataas thevalues.
VTKLegacy.StructuredPoints — Type
StructuredPointsObject that contains all the information and datasets from a Legacy VTK file with a STRUCTURED_POINTS geometry/topology.
Fields
title::String: Title of the VTK file.nx::Int32: Number of points in thexdirection.ny::Int32: Number of points in theydirection.nz::Int32: Number of points in thezdirection.dx::Float64: Distance between points in thexdirection.dy::Float64: Distance between points in theydirection.dz::Float64: Distance between points in thezdirection.x0::Float64: Position of origin in thexdirection.y0::Float64: Position of origin in theydirection.z0::Float64: Position of origin in thezdirection.x::Vector{Float64}: Points positions in thexdirection.y::Vector{Float64}: Points positions in theydirection.z::Vector{Float64}: Points positions in thezdirection.dimensions::Vector{Int32}: Number of points in each dimension:[nx,ny,nz].spacing::Vector{Float64}: Spacing size in each dimension:[dx,dy,dz].origin::Vector{Float64}: Origin of the mesh:[x0,y0,z0].cellData::Union{Array{AbstractFloat,4}, Nothing}: Array containing each dataset in the CELL_DATA section.cellDataNames::Vector{String}: Name of each dataset in the CELL_DATA section.cellDataAttributes::Vector{String}: Attribute of each dataset in the CELL_DATA section.cellDict::Dict{String,IntOrRng}: Dictionary with thecellDataNamesas thekeysand the indexes ofcellDataas thevalues.pointData::Union{Array{AbstractFloat,4}, Nothing}: Array containing each dataset in the POINT_DATA section.pointDataNames::Vector{String}: Names of each dataset in the POINT_DATA section.pointDataAttributes::Vector{String}: Attribute of each dataset in the POINT_DATA section.pointDict::Dict{String,IntOrRng}: Dictionary with thepointDataNamesas thekeysand the indexes ofpointDataas thevalues.
VTKLegacy.UnstructuredGrid — Type
UnstructuredGridObject that contains all the information and datasets from a Legacy VTK file with a UNSTRUCTURED_GRID geometry/topology.
Fields
title::String: Title of the VTK file.npoints::Int32: Number of points that define the cells.ncells::Int32: Number of cells in the file.points::Array{AbstractFloat,2}: Array containing the coordinates of the points in the grid.cells::Vector{Int32}: Number and indexes of points defining each cell.cellTypes::Vector{Int32}: Type of each cell. Integer value between 1 and 16cellData::Array{AbstractFloat,2}: Array containing each dataset in the CELL_DATA section.cellDataNames::Vector{String}: Name of each dataset in the CELL_DATA section.cellDataAttributes::Vector{String}: Attribute of each dataset in the CELL_DATA section.cellDict::Dict{String,IntOrRng}: Dictionary with thecellDataNamesas thekeysand the indexes ofcellDataas thevalues.pointData::Array{AbstractFloat,2}: Array containing each dataset in the POINT_DATA section.pointDataNames::Vector{String}: Name of each dataset in the POINT_DATA section.pointDataAttributes::Vector{String}: Attribute of each dataset in the POINT_DATA section.pointDict::Dict{String,IntOrRng}: Dictionary with thepointDataNamesas thekeysand the indexes ofpointDataas thevalues.
VTKLegacy.VTKDataSet — Type
VTKDataSetAbstract supertype for all vtk geometry/topology objects (e.g. StructuredPoints)
Base.getindex — Method
getindex(m::VTKDataSet, name::String)Retrieve the array stored in the m.pointData or m.cellData field with name name. The name should be an element of m.pointDataNames or m.cellDataNames, if not throws an error. If the name is an element of both throws an error. The syntax m["name"] is converted by the compiler to getindex(m,"name").
VTKLegacy.LoadVTK — Method
LoadVTK(filename::String)Read the VTK file filename in to an object of type StructuredPoints or UnstructuredGrid. Currently only StructuredPoints and UnstructuredGrid are supported.
VTKLegacy.WriteVTK — Method
WriteVTK(filename::String, m::VTKDataSet)Write a VTK file with with name filename with the contents of m. The file will have geometry/topology according with typeof(m).
VTKLegacy.integrate — Function
integrate(m::StructuredPoints,var::Union{Int64,String,Vector{Union{Int64,String}}}=1; data::Union{Symbol,Nothing}=nothing)Compute the discrete integral of one or more variables stored in m.pointData or m.cellData using the following formula:
\[I = \sum_{(i,j,k)=(1,1,1)}^{N_x,N_y,N_z}\text{var}_{(i,j,k)}\Delta x\Delta y\Delta z.\]
Use data=:point to integrate fields from POINT_DATA. Use data=:cell to integrate fields from CELL_DATA.
If var is unspecified, and there is only point/cell data available, integrate the first available dataset. If there is point and cell data available, and var is unspecified, throws an error.
The function returns a dictionary with the variable names as keys and their corresponding integrals as values. If var is a vector of variable names or indices, the returned dictionary will contain an entry for each variable. Examples ```julia integrate(m) integrate(m, "rho") integrate(m, ["rho", "pressure"]) integrate(m, "rho"; data=:cell)
VTKLegacy.magnitude — Method
magnitude(arr::Array{AbstractFloat,3})Returns the magnitude of a vector dataset of size (axis,nx,ny) where axis is 3 ("x", "y" and "z" dimensions) and nx and ny are the number of cells in each axis.
VTKLegacy.magnitude — Method
magnitude(arr::Array{AbstractFloat,4})Returns the magnitude of a vector dataset of size (axis,nx,ny,nz) where axis is 3 ("x", "y" and "z" dimensions) and nx, ny and nz are the number of cells in each axis.
VTKLegacy.magnitude — Method
magnitude(m::StructuredPoints, vector::String; data::Union{Symbol,Nothing}=nothing)Returns the magnitude of a vector dataset in m.
If data is unspecified, the function tries to find vector automatically in pointData or cellData. If the same name exists in both sections, use data=:point or data=:cell.
VTKLegacy.ranges — Function
ranges(m::StructuredPoints, io::Union{IO,Nothing}=nothing; data::Symbol=:both)Print the maximum and minimum values of each dataset in m.
Use data=:point for POINTDATA, data=:cell for CELLDATA, or data=:both for both sections.
If io is unspecified, prints to stdout.