KTH framework for Nek5000 toolboxes; testing version
0.0.1
|
Set of post-processing routines of 2D statistics. More...
Files | |
file | pstat2D.f |
Post processing for statistics module. | |
file | pstat2D_IO.f |
Post processing I/O routines for statistics module. | |
Functions | |
subroutine | pstat2d_register () |
Register post processing statistics module. More... | |
subroutine | pstat2d_init () |
Initilise pstat module. More... | |
logical function | pstat2d_is_initialised () |
Check if module was initialised. More... | |
subroutine | pstat2d_main |
Main interface of pstat module. More... | |
subroutine | pstat2d_mesh_amr |
Manipulate mesh to get proper AMR refinement. More... | |
subroutine | pstat2d_mesh_map (ifrref) |
Find mapping of sts mesh to the existing in the run. More... | |
subroutine | pstat2d_transfer () |
Reshuffle elements between sts and current ordering. More... | |
subroutine | pstat2d_sts_avg |
Read in fields and average them. More... | |
subroutine | pstat2d_deriv |
Calculate derivatives. More... | |
subroutine | pstat2d_interp |
Interpolate int the set of points. More... | |
subroutine | pstat2d_mfi_crd2d (fidl) |
Read nonconforming data from the file. More... | |
subroutine | pstat2d_mfi_interp |
Read interpolation points position and redistribute them. More... | |
subroutine | pstat2d_mfo_interp |
Geather data and write it down. More... | |
Set of post-processing routines of 2D statistics.
This tools allows post-processing of 2D statistics files generated by the stats tool. In particular, it allows to do two things:
sts
to generate a single set of corresponding files.In addition, when doing the above the tool will compute a number of extra fields. Details below.
The following workflow is suggested to use the module:
ldimt
variable in the SIZE file for this case to 69..usr
and .par
and makefile_usr.inc
files according to the examples herein. (See also the phill_PSTAT2D example case.) Compile the case.sts
and c2D
to this folder. It is important that the numbering of the sts
files is continuous. The number of the first and last files are given by runtime parameters. If you are not interested in point interpolation the next 2 steps can be skipped.int_pos
using the Python API in writer_int_pos.py
. This file will contain the locations of the points, to which the averaged data will be interpolated.int_pos
file to the DATA folder.int_pos
file will be found. That is OK.As a result, the tool will produce two files with prefix s1
and s2
containing data averaged across STS_NFILE
of the provided sts
files, exlcluding those collected at times less than STS_STIME
. The full list of fields computed, and their order is provided in the field_list.txt file in this directory. The s1
file will contain the same fields as in the sts
files generated by the stats tool, but in slightly different order. The s2
file will contain the extra derivative fields. The interpolated point data is saved to a file called int_fld
. It can be read using the functions in reader_int_fld.py
Python file.
Varaible | Type | Runtime parameter | Description |
---|---|---|---|
pstat_amr_irnr | integer | _pstat2d:IOStep | Nr. of inital refinements (AMR only) |
pstat_ffile | integer | _pstat2d:STS_FFILE | First sts file number |
pstat_nfile | integer | _pstat2d:STS_NFILE | Last sts file number |
pstat_stime | float | _pstat2d:STS_STIME | Statistics starting time |
pstat_nstep | integer | _pstat2d:STS_NSTEP | Number of steps between averaging in collected sts files |
subroutine pstat2d_deriv |
Calculate derivatives.
Definition at line 859 of file pstat2D.f.
References copy(), geom_reset(), gradm1(), outpost2(), and rzero().
subroutine pstat2d_init |
Initilise pstat module.
Definition at line 99 of file pstat2D.f.
References mntr_log(), mntr_tmr_add(), mntr_warn(), pstat2d_mesh_amr(), pstat2d_mfi_crd2d(), and rprm_rp_get().
subroutine pstat2d_interp |
Interpolate int the set of points.
Definition at line 1138 of file pstat2D.f.
References io_file_freeid(), mntr_abort(), pstat2d_mfi_interp(), and pstat2d_mfo_interp().
logical function pstat2d_is_initialised |
subroutine pstat2d_main |
Main interface of pstat module.
Definition at line 187 of file pstat2D.f.
References mntr_log(), mntr_tmr_add(), pstat2d_deriv(), pstat2d_interp(), and pstat2d_sts_avg().
subroutine pstat2d_mesh_amr |
Manipulate mesh to get proper AMR refinement.
Definition at line 229 of file pstat2D.f.
References mntr_abort(), mntr_logi(), and pstat2d_mesh_map().
subroutine pstat2d_mesh_map | ( | logical | ifrref | ) |
Find mapping of sts mesh to the existing in the run.
[in] | ifrref | flag to return after refinement mark |
Definition at line 282 of file pstat2D.f.
References gllel(), gllnid(), io_file_freeid(), ituple_sort(), mntr_abort(), and mntr_check_abort().
subroutine pstat2d_mfi_crd2d | ( | integer | fidl | ) |
Read nonconforming data from the file.
[in] | fidl | file number |
Definition at line 10 of file pstat2D_IO.f.
References addfid(), bcast(), blank(), byte_close, byte_close_mpi(), byte_open, byte_open_mpi(), byte_read, byte_read_mpi(), byte_reverse, byte_set_view(), copy(), copy4r(), io_file_freeid(), io_init(), io_mfo_fname(), mntr_abort(), and mntr_check_abort().
subroutine pstat2d_mfi_interp |
Read interpolation points position and redistribute them.
Definition at line 198 of file pstat2D_IO.f.
References bcast(), blank(), byte_close, byte_open, byte_read, byte_reverse, byte_reverse8, copy(), copy4r(), crecv2(), csend(), io_file_freeid(), mntr_check_abort(), and mntr_logi().
subroutine pstat2d_mfo_interp |
Geather data and write it down.
Definition at line 391 of file pstat2D_IO.f.
References byte_close, byte_open, byte_write, copy(), copyx4(), crecv2(), csend(), and mntr_check_abort().
subroutine pstat2d_register |
Register post processing statistics module.
Definition at line 10 of file pstat2D.f.
References mntr_abort(), mntr_mod_is_name_reg(), mntr_mod_reg(), mntr_tmr_add(), mntr_tmr_is_name_reg(), mntr_tmr_reg(), mntr_warn(), rprm_rp_reg(), rprm_sec_reg(), and rprm_sec_set_act().
subroutine pstat2d_sts_avg |
Read in fields and average them.
Definition at line 713 of file pstat2D.f.
References add2s2(), addfid(), cmult(), copy(), io_init(), io_mfo_fname(), mfi(), mntr_abort(), mntr_logi(), outpost2(), pstat2d_mesh_map(), pstat2d_mfi_crd2d(), pstat2d_transfer(), and rzero().
subroutine pstat2d_transfer |
Reshuffle elements between sts and current ordering.
Definition at line 610 of file pstat2D.f.
References gllel(), gllnid(), and mntr_abort().