GRIDMAN
grid managment library
|
Converting grid into format which can be used for VTK. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | gridman_2dgrid2vtk (GRID, NPOINTS, NCELLS, NVERTEX, X, IFIRST, LVERTEX, IVERTEX, CTYPE, IERR, NTHETA, THETA) |
Convert 2D grid into VTK format. More... | |
subroutine | gridman_2dgrid2vtk_index (GRID, N, M, RINDEXES, SINDEXES, IERR) |
Translate cell and edge indices in VTK input in the sense of GRIDMAN_2DGRID2VTK. More... | |
subroutine | gridman_vtk_grid2d_write (FNAME, HEADER, GRID, NELEMENTS, NCS, NCV, NPS, NPV, IERR, CELL_SCALAR, CSNAME, CELL_VECTOR, CVNAME, POINT_SCALAR, PSNAME, POINT_VECTOR, PVNAME) |
Write 2D grid and data in VTK ASCII legacy format. More... | |
subroutine | gridman_3dgrid2vtk (GRID, NPOINTS, NCELLS, NVERTEX, X, IFIRST, LVERTEX, IVERTEX, CTYPE, IERR) |
Convert 3D grid into VTK format. Only grid w/o cells is implemented at the moment !!! More... | |
subroutine | gridman_3dgrid2vtk_index (GRID, N, M, RINDEXES, SINDEXES, IERR) |
Translate edge indices in VTK input in the sense of GRIDMAN_3DGRID2VTK (in the current implementation of GRIDMAN_3DGRID2VTK only grid edges are treated) More... | |
subroutine | gridman_vtk_grid3d_write (FNAME, HEADER, GRID, NELEMENTS, NCS, NCV, NPS, NPV, IERR, CELL_SCALAR, CSNAME, CELL_VECTOR, CVNAME, POINT_SCALAR, PSNAME, POINT_VECTOR, PVNAME) |
Write 3D grid and data in VTK ASCII legacy format. Only grid w/o cells is implemented at the moment !!! More... | |
Converting grid into format which can be used for VTK.
Definition in file vtk.f.
subroutine gridman_2dgrid2vtk | ( | type(gridman_grid) | GRID, |
integer(gridman_sp), intent(out) | NPOINTS, | ||
integer(gridman_sp), intent(out) | NCELLS, | ||
integer(gridman_sp), intent(out) | NVERTEX, | ||
real(gridman_dp), dimension(:,:), intent(out), allocatable | X, | ||
integer(gridman_sp), dimension(:), intent(out), allocatable | IFIRST, | ||
integer(gridman_sp), dimension(:), intent(out), allocatable | LVERTEX, | ||
integer(gridman_sp), dimension(:), intent(out), allocatable | IVERTEX, | ||
integer, dimension(:), intent(out), allocatable | CTYPE, | ||
integer, intent(out) | IERR, | ||
integer, intent(in) | NTHETA, | ||
real(gridman_dp), dimension(ntheta), intent(in), optional | THETA | ||
) |
Convert 2D grid into VTK format.
VTK representation includes cells and edges which do not belong to any cell
grid | Original grid | |
[out] | npoints | Number of points |
[out] | ncells | Number of cells |
[out] | nvertex | Total number of vertices |
[out] | x | Array of coordinates, X(ND,NPOINTS) |
[out] | ifirst | First index which corresponds to each cell in array IVERTEX, IFIRST(NCELLS) |
[out] | lvertex | Number of vertices of each cell, LVERTEX(NCELLS) |
[out] | ivertex | List of points (vertices) belonging to each cell, IVERTEX(NVERTEX) |
[out] | ctype | VTK cell type index, CTYPE(NCELLS) |
[out] | ierr | Error code |
[in] | ntheta | Number of nodes in THETA grid |
[in] | theta | Cylindrical angle, THETA(NTHETA), [radian] |
If NTHETA and THETA(NTHETA) are defined, then axi-symmetric grid is generated
If resulting grid is 3D, then edges not belonging to any cell are skipped. The axi-symmetric grid is represented in X-Y-Z coordinates
Definition at line 36 of file vtk.f.
References gridman_grid2d_chains(), gridman_grid2d_check(), and gridman_indlist_deallocate().
Referenced by gridman_vtk_grid2d_write().
subroutine gridman_2dgrid2vtk_index | ( | type(gridman_grid) | GRID, |
integer(gridman_sp), intent(out) | N, | ||
integer, intent(out) | M, | ||
real(gridman_dp), dimension(:,:), intent(out), allocatable | RINDEXES, | ||
character(gridman_length), dimension(:), intent(out), allocatable | SINDEXES, | ||
integer, intent(out) | IERR | ||
) |
Translate cell and edge indices in VTK input in the sense of GRIDMAN_2DGRID2VTK.
grid | Original grid | |
[out] | n | Number of elements in cell scalars array |
[out] | m | Number of cell scalars arrays |
[out] | rindexes | Cells scalars array, RINDEXES(N,M) |
This array contains indices of cells and of edge not belonging to any cell. Zero is used for elements for which indices are not defined.
[out] | sindexes | Name of each RINDEXES(:,I), SINDEXES(M) |
I<number of index>_<number of column>_<INDEXCOLUMNS> Designation of edge indices has same format but starts from E instead of I
[out] | ierr | Error code |
Definition at line 438 of file vtk.f.
References gridman::gridman_dp, gridman_grid2d_check(), gridman_grid_count(), and gridman::gridman_sp.
Referenced by gridman_vtk_grid2d_write().
subroutine gridman_vtk_grid2d_write | ( | character(*), intent(in) | FNAME, |
character(*), intent(in) | HEADER, | ||
type(gridman_grid) | GRID, | ||
integer, intent(in) | NELEMENTS, | ||
integer, intent(in) | NCS, | ||
integer, intent(in) | NCV, | ||
integer, intent(in) | NPS, | ||
integer, intent(in) | NPV, | ||
integer, intent(out) | IERR, | ||
real(gridman_dp), dimension(nelements,ncs), intent(in), optional | CELL_SCALAR, | ||
character(*), dimension(ncs), intent(in), optional | CSNAME, | ||
real(gridman_dp), dimension(2,nelements,ncv), intent(in), optional | CELL_VECTOR, | ||
character(*), dimension(ncv), intent(in), optional | CVNAME, | ||
real(gridman_dp), dimension(grid%npoints,nps), intent(in), optional | POINT_SCALAR, | ||
character(*), dimension(nps), intent(in), optional | PSNAME, | ||
real(gridman_dp), dimension(2,grid%npoints,npv), intent(in), optional | POINT_VECTOR, | ||
character(*), dimension(npv), intent(in), optional | PVNAME | ||
) |
Write 2D grid and data in VTK ASCII legacy format.
Interface to GRIDMAN_VTK_WRITE which calls GRIDMAN_2DGRID2VTK.
[in] | fname | Name of the output file |
[in] | header | String with short description of the data set |
grid | 2D grid object | |
[in] | nelements | First dimension of arrays CELL_SCALAR, CELL_VECTOR |
This quantity must be equal to GRIDNCELLS plus the number of "free" edges which do not belong to any cell. Calculated by GRIDMAN_GRID_COUNT.
[in] | ncs | Number of scalar cell data sets |
[in] | ncv | Number of vector cell data sets |
[in] | nps | Number of scalar point data sets |
[in] | npv | Number of vector point data sets |
[out] | ierr | Error code |
[in] | cell_scalar | Scalar cell data |
[in] | csname | Names of the scalar cell data sets |
[in] | cell_vector | Vector cell data |
[in] | cvname | Names of the vector cell data sets |
[in] | point_scalar | Scalar point data |
[in] | psname | Names of the scalar point data sets |
[in] | point_vector | Vector cell data |
[in] | pvname | Names of the vector point data sets |
Definition at line 611 of file vtk.f.
References gridman_2dgrid2vtk(), gridman_2dgrid2vtk_index(), gridman::gridman_dp, gridman_grid_count(), gridman::gridman_sp, and gridman_vtk_write().
subroutine gridman_3dgrid2vtk | ( | type(gridman_grid) | GRID, |
integer(gridman_sp), intent(out) | NPOINTS, | ||
integer(gridman_sp), intent(out) | NCELLS, | ||
integer(gridman_sp), intent(out) | NVERTEX, | ||
real(gridman_dp), dimension(:,:), intent(out), allocatable | X, | ||
integer(gridman_sp), dimension(:), intent(out), allocatable | IFIRST, | ||
integer(gridman_sp), dimension(:), intent(out), allocatable | LVERTEX, | ||
integer(gridman_sp), dimension(:), intent(out), allocatable | IVERTEX, | ||
integer, dimension(:), intent(out), allocatable | CTYPE, | ||
integer, intent(out) | IERR | ||
) |
Convert 3D grid into VTK format. Only grid w/o cells is implemented at the moment !!!
grid | Original grid | |
[out] | npoints | Number of points |
[out] | ncells | Number of cells |
[out] | nvertex | Total number of vertices |
[out] | x | Array of coordinates, X(3,NPOINTS) |
[out] | ifirst | First index which corresponds to each cell in array IVERTEX, IFIRST(NCELLS) |
[out] | lvertex | Number of vertices of each cell, LVERTEX(NCELLS) |
[out] | ivertex | List of points (vertices) belonging to each cell, IVERTEX(NVERTEX) |
[out] | ctype | VTK cell type index, CTYPE(NCELLS) |
[out] | ierr | Error code |
Definition at line 850 of file vtk.f.
References gridman::gridman_dp, and gridman::gridman_sp.
Referenced by gridman_vtk_grid3d_write().
subroutine gridman_3dgrid2vtk_index | ( | type(gridman_grid) | GRID, |
integer(gridman_sp), intent(out) | N, | ||
integer, intent(out) | M, | ||
real(gridman_dp), dimension(:,:), intent(out), allocatable | RINDEXES, | ||
character(gridman_length), dimension(:), intent(out), allocatable | SINDEXES, | ||
integer, intent(out) | IERR | ||
) |
Translate edge indices in VTK input in the sense of GRIDMAN_3DGRID2VTK (in the current implementation of GRIDMAN_3DGRID2VTK only grid edges are treated)
grid | Original grid | |
[out] | n | Number of elements in cell scalars array |
[out] | m | Number of cell scalars arrays |
[out] | rindexes | Cells scalars array, RINDEXES(N,M) |
This array contains indexes of edges (in current implementation). Zero is used for the elements for which no index is defined.
[out] | sindexes | Name of each RINDEXES(:,I), SINDEXES(M) |
E<number of index>_<number of column>_<INDEXCOLUMNS>
[out] | ierr | Error code |
Definition at line 940 of file vtk.f.
References gridman::gridman_dp, gridman_grid_check(), and gridman::gridman_sp.
Referenced by gridman_vtk_grid3d_write().
subroutine gridman_vtk_grid3d_write | ( | character(*), intent(in) | FNAME, |
character(*), intent(in) | HEADER, | ||
type(gridman_grid) | GRID, | ||
integer(gridman_sp), intent(in) | NELEMENTS, | ||
integer, intent(in) | NCS, | ||
integer, intent(in) | NCV, | ||
integer, intent(in) | NPS, | ||
integer, intent(in) | NPV, | ||
integer, intent(out) | IERR, | ||
real(gridman_dp), dimension(nelements,ncs), intent(in), optional | CELL_SCALAR, | ||
character(*), dimension(ncs), intent(in), optional | CSNAME, | ||
real(gridman_dp), dimension(3,nelements,ncv), intent(in), optional | CELL_VECTOR, | ||
character(*), dimension(ncv), intent(in), optional | CVNAME, | ||
real(gridman_dp), dimension(grid%npoints,nps), intent(in), optional | POINT_SCALAR, | ||
character(*), dimension(nps), intent(in), optional | PSNAME, | ||
real(gridman_dp), dimension(3,grid%npoints,npv), intent(in), optional | POINT_VECTOR, | ||
character(*), dimension(npv), intent(in), optional | PVNAME | ||
) |
Write 3D grid and data in VTK ASCII legacy format. Only grid w/o cells is implemented at the moment !!!
Interface to GRIDMAN_VTK_WRITE which calls GRIDMAN_3DGRID2VTK
[in] | fname | Name of the output file |
[in] | header | String with short description of the data set |
grid | Fuller grid object | |
[in] | nelements | First dimension of arrays CELL_SCALAR, CELL_VECTOR In current implementation must be equal to GRIDNEDGES |
[in] | ncs | Number of scalar cell data sets |
[in] | ncv | Number of vector cell data sets |
[in] | nps | Number of scalar point data sets |
[in] | npv | Number of vector point data sets |
[out] | ierr | Error code |
[in] | cell_scalar | Scalar cell data |
[in] | csname | Names of the scalar cell data sets |
[in] | cell_vector | Vector cell data |
[in] | cvname | Names of the vector cell data sets |
[in] | point_scalar | Scalar point data |
[in] | psname | Names of the scalar point data sets |
[in] | point_vector | Vector cell data |
[in] | pvname | Names of the vector point data sets |
Definition at line 1048 of file vtk.f.
References gridman_3dgrid2vtk(), gridman_3dgrid2vtk_index(), gridman::gridman_dp, gridman::gridman_sp, and gridman_vtk_write().