GRIDMAN
grid managment library
Functions/Subroutines
vtk.f File Reference

Writing files in VTK format for graphical programms (e.g. Paraview) More...

Go to the source code of this file.

Functions/Subroutines

subroutine gridman_vtk_write (FNAME, HEADER, NPOINTS, NCELLS, NVERTEX, ND, X, IFIRST, LVERTEX, IVERTEX, CTYPE, NCS, NCV, NPS, NPV, IERR, CELL_SCALAR, CSNAME, CELL_VECTOR, CVNAME, POINT_SCALAR, PSNAME, POINT_VECTOR, PVNAME)
 Write grid and data in VTK ASCII legacy format (interface) More...
 
subroutine gridman_vtk_write_grid (IOUT, HEADER, NPOINTS, NCELLS, NVERTEX, ND, X, IFIRST, LVERTEX, IVERTEX, CTYPE, IERR)
 Write header and grid in VTK ASCII legacy format. More...
 
subroutine gridman_vtk_write_scalars (IOUT, DATANAME, N, S, IERR)
 Write scalar data in VTK format. More...
 
subroutine gridman_vtk_write_vectors (IOUT, DATANAME, N, ND, V, IERR)
 Write vector data in VTK format. More...
 

Detailed Description

Writing files in VTK format for graphical programms (e.g. Paraview)

Definition in file vtk.f.

Function/Subroutine Documentation

subroutine gridman_vtk_write ( character(*), intent(in)  FNAME,
character(*), intent(in)  HEADER,
integer(gridman_sp), intent(in)  NPOINTS,
integer(gridman_sp), intent(in)  NCELLS,
integer(gridman_sp), intent(in)  NVERTEX,
integer, intent(in)  ND,
real(gridman_dp), dimension(nd,npoints), intent(in)  X,
integer(gridman_sp), dimension(ncells), intent(in)  IFIRST,
integer(gridman_sp), dimension(ncells), intent(in)  LVERTEX,
integer(gridman_sp), dimension(nvertex), intent(in)  IVERTEX,
integer, dimension(ncells), intent(in)  CTYPE,
integer, intent(in)  NCS,
integer, intent(in)  NCV,
integer, intent(in)  NPS,
integer, intent(in)  NPV,
integer, intent(out)  IERR,
real(gridman_dp), dimension(ncells,ncs), intent(in), optional  CELL_SCALAR,
character(*), dimension(ncs), intent(in), optional  CSNAME,
real(gridman_dp), dimension(nd,ncells,ncv), intent(in), optional  CELL_VECTOR,
character(*), dimension(ncv), intent(in), optional  CVNAME,
real(gridman_dp), dimension(npoints,nps), intent(in), optional  POINT_SCALAR,
character(*), dimension(nps), intent(in), optional  PSNAME,
real(gridman_dp), dimension(nd,npoints,npv), intent(in), optional  POINT_VECTOR,
character(*), dimension(npv), intent(in), optional  PVNAME 
)

Write grid and data in VTK ASCII legacy format (interface)

Parameters
[in]fnameName of the output file
[in]headerString with short description of the data set
[in]npointsNumber of points
[in]ncellsNumber of cells
[in]nvertexTotal number of vertices
[in]ndFirst dimension of array X, can be 2 or 3

If ND=2 then third dimension is set to 0

Parameters
[in]xArray of coordinates
[in]ifirstFirst index which corresponds to each cell in array IVERTEX
[in]lvertexNumber of vertices of each cell
[in]ivertexList of points (vertices) belonging to each cell

WARNING: in VTK indexing begins from 0, not from 1. IVERTEX must contain VTK indexing, that is, index in X shifted by "minus one"

Parameters
[in]ctypeVTK cell type index
[in]ncsNumber of scalar cell data sets
[in]ncvNumber of vector cell data sets
[in]npsNumber of scalar point data sets
[in]npvNumber of vector point data sets
[out]ierrError code
[in]cell_scalarScalar cell data
[in]csnameNames of the scalar cell data sets
[in]cell_vectorVector cell data
[in]cvnameNames of the vector cell data sets
[in]point_scalarScalar point data
[in]psnameNames of the scalar point data sets
[in]point_vectorVector cell data
[in]pvnameNames of the vector point data sets

Definition at line 34 of file vtk.f.

References gridman::gridman_dbg, gridman::gridman_dp, gridman::gridman_sp, gridman::gridman_unit, gridman_vtk_write_grid(), gridman_vtk_write_scalars(), and gridman_vtk_write_vectors().

Referenced by gridman_vtk_grid2d_write(), and gridman_vtk_grid3d_write().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine gridman_vtk_write_grid ( integer, intent(in)  IOUT,
character(*), intent(in)  HEADER,
integer(gridman_sp), intent(in)  NPOINTS,
integer(gridman_sp), intent(in)  NCELLS,
integer(gridman_sp), intent(in)  NVERTEX,
integer, intent(in)  ND,
real(gridman_dp), dimension(nd,npoints), intent(in)  X,
integer(gridman_sp), dimension(ncells), intent(in)  IFIRST,
integer(gridman_sp), dimension(ncells), intent(in)  LVERTEX,
integer(gridman_sp), dimension(nvertex), intent(in)  IVERTEX,
integer, dimension(ncells), intent(in)  CTYPE,
integer, intent(out)  IERR 
)

Write header and grid in VTK ASCII legacy format.

Parameters
[in]ioutIndex of the output unit
[in]headerString with short description of the data set
[in]npointsNumber of points
[in]ncellsNumber of cells
[in]nvertexTotal number of vertices
[in]ndFirst dimension of array X, can be 2 or 3

If ND=2 then third dimension is set to 0

Parameters
[in]xArray of coordinates
[in]ifirstFirst index which corresponds to each cell in array IVERTEX
[in]lvertexNumber of vertices of each cell
[in]ivertexList of points (vertices) belonging to each cell

WARNING: in VTK indexing begins from 0, not from 1. IVERTEX must contain VTK indexing, that is, index in X shifted by "minus one"

Parameters
[in]ctypeVTK cell type index
[out]ierrError code

Definition at line 262 of file vtk.f.

References gridman::gridman_dbg, gridman::gridman_dp, gridman::gridman_sp, and gridman::gridman_unit.

Referenced by gridman_vtk_write().

Here is the caller graph for this function:

subroutine gridman_vtk_write_scalars ( integer, intent(in)  IOUT,
character(*), intent(in)  DATANAME,
integer(gridman_sp), intent(in)  N,
real(gridman_dp), dimension(n), intent(in)  S,
integer, intent(out)  IERR 
)

Write scalar data in VTK format.

Parameters
[in]ioutIndex of the output unit
[in]datanameString with short description of the data set
[in]nLength of the data array
[in]sData array
[out]ierrError code

Definition at line 518 of file vtk.f.

References gridman::gridman_dbg, gridman::gridman_dp, gridman::gridman_sp, and gridman::gridman_unit.

Referenced by gridman_vtk_write().

Here is the caller graph for this function:

subroutine gridman_vtk_write_vectors ( integer, intent(in)  IOUT,
character(*)  DATANAME,
integer(gridman_sp), intent(in)  N,
integer, intent(in)  ND,
real(gridman_dp), dimension(nd,n)  V,
integer, intent(out)  IERR 
)

Write vector data in VTK format.

Parameters
[in]ioutIndex of the output unit
datanameString with short description of the data set
[in]nLength of the data array
[in]ndDimenisonality of vectors, can be 2 or 3
vData array
[out]ierrError code

Definition at line 575 of file vtk.f.

References gridman::gridman_dbg, gridman::gridman_dp, gridman::gridman_sp, and gridman::gridman_unit.

Referenced by gridman_vtk_write().

Here is the caller graph for this function: