Open the output file for AsciiSpatial format.
Each time this routine is called, a new file is written Filename: {tracking_folder}{tracking_label}spatial_{timestamp}.res e.g.: tracking/lineProbe_spatial_00001_01_01378.1.res Each process open its own files
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(hvs_asciiSpatial_type), | intent(inout) | :: | asciiSpatial |
asciiSpatial file output |
||
type(tem_comm_env_type), | intent(in) | :: | outProc |
Parallel environment to use for the output. |
||
type(tem_time_type), | intent(in) | :: | time |
current global time |
||
type(tem_varSys_type), | intent(in) | :: | varSys |
solver-provided variable systems |
||
integer, | intent(in) | :: | varPos(:) |
Position of variables to dump in varSys |
||
integer, | intent(in) | :: | nDofs |
The number of dofs for each scalar variable of the equation system |
subroutine hvs_asciiSpatial_open( asciiSpatial, outProc, time, varSys, & & varPos, nDofs ) ! --------------------------------------------------------------------------- !> asciiSpatial file output type(hvs_asciiSpatial_type ), intent(inout) :: asciiSpatial !> Parallel environment to use for the output. type(tem_comm_env_type ), intent(in) :: outProc !> current global time type(tem_time_type ), intent(in) :: time !> solver-provided variable systems type(tem_varSys_type), intent(in) :: varSys !> Position of variables to dump in varSys integer, intent(in) :: varPos(:) !> The number of dofs for each scalar variable of the equation system integer, intent(in) :: nDofs ! --------------------------------------------------------------------------- integer :: nScalars character(len=pathLen) :: filename ! ascii file name character(len=1024) :: buffer ! --------------------------------------------------------------------------- nScalars = sum(varSys%method%val(varPos(:))%nComponents) ! Write the rank into the string buffer write(buffer,'(i5.5)') outProc%rank asciiSpatial%timestamp = tem_time_sim_stamp( time ) ! Generate ascii file name write(filename,'(a)') trim(asciiSpatial%basename)//'_p'//trim(buffer) & & //'_t'//trim(asciiSpatial%timestamp)//'.res' call tem_open( newunit = asciiSpatial%outunit, & & file = trim(filename), & & recl = 1024, & & status = 'replace' ) write ( asciiSpatial%outUnit , '(a,i7)' ) '# Rank of the process: ', & & outProc%rank write ( buffer, '(a1, 3(1x,a24))' ) '#', 'coordX', 'coordY', 'coordZ' buffer = trim(buffer) & & //trim(getHeader( varSys, varPos, nDofs, .false. )) ! ... and write the header row to the file write ( asciiSpatial%outunit , '(a)' ) trim(buffer) end subroutine hvs_asciiSpatial_open