Detect all the grid points on the wall boundary condition and store them in a single file
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | ierr | Integer to store error |
|||
integer, | private | :: | new_type | Create new type for MPI |
|||
integer, | private | :: | thisfile | File hadler |
|||
integer, | private, | parameter | :: | maxlen | = | 70 | Maximum length for string |
real(kind=wp), | private, | dimension(:, :), allocatable, target | :: | wallc | Centre of wall surface |
||
real(kind=wp), | private, | dimension(:), pointer | :: | wall_x | X coordiante of center of wall surface |
||
real(kind=wp), | private, | dimension(:), pointer | :: | wall_y | Y coordiante of center of wall surface |
||
real(kind=wp), | private, | dimension(:), pointer | :: | wall_z | Z coordiante of center of wall surface |
||
integer, | private, | dimension(6) | :: | no_slip_flag | = | 0 | Flag to detect wall |
integer, | public | :: | n_wall | Number of points on the wall |
|||
integer, | public | :: | total_n_wall | Total number of points on the block across all processes |
|||
character(len=maxlen), | private, | dimension(:), allocatable | :: | str | Store all wall corridnate of current process in a string vector |
||
character(len=maxlen), | private | :: | line | Line to write in output file |
|||
character, | private, | parameter | :: | lf | = | Achar(10) | End of line character |
integer, | private, | dimension(:), allocatable | :: | n_wall_buf | Store n_wall points of all processors in a array form |
||
integer, | private, | dimension(:), allocatable | :: | write_flag | Check if current processor has any wall points to write |
||
integer, | private | :: | imx | ||||
integer, | private | :: | jmx | ||||
integer, | private | :: | kmx |
Extract and write the wall surface node points in a file shared by all the MPI processes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(filetype), | intent(in) | :: | files | |||
type(nodetype), | intent(in), | dimension(-2:dims%imx+3,-2:dims%jmx+3,-2:dims%kmx+3) | :: | nodes | ||
type(controltype), | intent(in) | :: | control | |||
type(boundarytype), | intent(in) | :: | bc | |||
type(extent), | intent(in) | :: | dims |
Allocate memory to str and wallc variable array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(controltype), | intent(in) | :: | control |
Link pointers wall_x, wall_y, wall_z to wallc
Open MPI_shared write file, allocate memory and setup pointers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(filetype), | intent(in) | :: | files | |||
type(controltype), | intent(in) | :: | control | |||
type(boundarytype), | intent(in) | :: | bc |
Setup wall flag for all six boundary of the block
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(boundarytype), | intent(in) | :: | bc |
Extract surface points and store them in a string vector str(ind)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nodetype), | intent(in), | dimension(-2:imx+3,-2:jmx+3,-2:kmx+3) | :: | nodes |