Files | |
| file | io_tools.f |
| Set of I/O related tools for KTH modules. | |
| file | io_tools_block.f |
| Block data to initialise common block for I/O routines. | |
Functions/Subroutines | |
| subroutine | io_register () |
| Register io tool module. More... | |
| subroutine | io_file_freeid (iunit, ierr) |
| Get free file unit number and store max unit value. More... | |
| subroutine | io_file_close () |
| Close all opened files up to sotred max unit numer. More... | |
| subroutine | io_mfo_fname (fname, bname, prefix, ierr) |
| Generate file name according to nek rulles without opening the file. More... | |
| subroutine | io_mbyte_open (hname, ierr) |
| Open field file. More... | |
| subroutine | io_mbyte_close (ierr) |
| Close field file. More... | |
| subroutine | io_mfov (offs, lvx, lvy, lvz, lnx, lny, lnz, lnel, lnelg, lndim) |
| Write single vector to the file. More... | |
| subroutine | io_mfos (offs, lvs, lnx, lny, lnz, lnel, lnelg, lndim) |
| Write single scalar to the file. More... | |
| subroutine | io_mfis (offs, uf, lnx, lny, lnz, lnel, ifskip) |
| Read scalar filed from the file. More... | |
| subroutine io_file_close |
Close all opened files up to sotred max unit numer.
| subroutine io_file_freeid | ( | integer | iunit, |
| integer | ierr | ||
| ) |
Get free file unit number and store max unit value.
| [out] | iunit | file unit |
| [out] | ierr | error mark |
| subroutine io_mbyte_close | ( | integer | ierr | ) |
Close field file.
This routine closes the file (serial or parallel depending on parmeter set by io_init) using Nek5000 C routines.
| [out] | ierr | error mark |
| subroutine io_mbyte_open | ( | character*132 | hname, |
| integer | ierr | ||
| ) |
Open field file.
This routine opens the file (serial or parallel depending on parmeter set by io_init) using Nek5000 C routines. I need it for a number of tools writing restart files that do not directly stick to the numbering scheme used in mfo_open_files.
| [in] | hname | file name |
| [out] | ierr | error mark |
| subroutine io_mfis | ( | integer*8 | offs, |
| real, dimension(lnx*lny*lnz,lnel) | uf, | ||
| integer | lnx, | ||
| integer | lny, | ||
| integer | lnz, | ||
| integer | lnel, | ||
| logical | ifskip | ||
| ) |
Read scalar filed from the file.
This is version of mfi_gets that does not perform interpolation and allows to specify element size.
| [in,out] | offs | offset of global vector beginning |
| [out] | uf | scalar field |
| [in] | lnx,lny,lnz | element size |
| [in] | lnel | number of elements |
| [in] | ifskip | reading flag (for non-mpi formats) |
| subroutine io_mfo_fname | ( | character*132 | fname, |
| character*132 | bname, | ||
| character*3 | prefix, | ||
| integer | ierr | ||
| ) |
Generate file name according to nek rulles without opening the file.
It is a modified version of mfo_open_files from prepost.f but without equivalence and file opening part. I split file name generation and file opening as different tools can require this.
| [out] | fname | file name |
| [in] | bname | base name |
| [in] | prefix | prefix |
| [out] | ierr | error mark |
| subroutine io_mfos | ( | integer*8 | offs, |
| real, dimension(lnx,lny,lnz,lnel) | lvs, | ||
| integer | lnx, | ||
| integer | lny, | ||
| integer | lnz, | ||
| integer | lnel, | ||
| integer | lnelg, | ||
| integer | lndim | ||
| ) |
Write single scalar to the file.
This routine is based on mfo_outfld but can be used for writing 2D sections of 3D simulation.
| [in,out] | offs | offset of global vector beginning |
| [in] | lvs | scalar to write |
| [in] | lnx,lny,lnz | element dimensions |
| [in] | lnel | local number of field elements |
| [in] | lnelg | global number of filed elements |
| [in] | lndim | written domain dimension |
| subroutine io_mfov | ( | integer*8 | offs, |
| real, dimension(lnx,lny,lnz,lnel) | lvx, | ||
| real, dimension(lnx,lny,lnz,lnel) | lvy, | ||
| real, dimension(lnx,lny,lnz,lnel) | lvz, | ||
| integer | lnx, | ||
| integer | lny, | ||
| integer | lnz, | ||
| integer | lnel, | ||
| integer | lnelg, | ||
| integer | lndim | ||
| ) |
Write single vector to the file.
This routine is based on mfo_outfld but can be used for writing 2D sections of 3D simulation.
| [in,out] | offs | offset of global vector beginning |
| [in] | lvx,lvy,lvz | vector to write |
| [in] | lnx,lny,lnz | element dimensions |
| [in] | lnel | local number of filed elements |
| [in] | lnelg | global number of filed elements |
| [in] | lndim | written domain dimension |
| subroutine io_register |
Register io tool module.