FE-Project
Loading...
Searching...
No Matches
scale_file_restart_meshfield Module Reference

module FElib / File / Restart More...

Data Types

type  file_restart_meshfield_component
 Derived type to manage restart file with each component. More...

Functions/Subroutines

subroutine, public file_restart_meshfield_setup ()
 Setup the main restart file.
subroutine, public file_restart_meshfield_finalize ()
 Finalize the main restart file.

Variables

type(file_restart_meshfield), public restart_file
 An object to manage main restart file.
type(file_base_meshfield), target file_main
 A file object to manage main restart file.

Detailed Description

module FElib / File / Restart

Description
A module for outputting data to restart simulations
Author
Yuta Kawai, Team SCALE
NAMELIST
  • PARAM_RESTART
    nametypedefault valuecomment
    OUTPUT_FLAGlogical.false.Flag whether output restart file
    IN_BASENAMEcharacter(*)
    IN_POSTFIX_TIMELABELlogical
    OUT_BASENAMEcharacter(*)
    OUT_POSTFIX_TIMELABELlogical
    OUT_TITLEcharacter(*)
    OUT_DTYPEcharacter(*)

History Output
No history output

Function/Subroutine Documentation

◆ file_restart_meshfield_setup()

subroutine, public scale_file_restart_meshfield::file_restart_meshfield_setup

Setup the main restart file.

Definition at line 136 of file scale_file_restart_meshfield.F90.

137 implicit none
138
139 logical :: OUTPUT_FLAG = .false. !< Flag whether output restart file
140 character(len=H_LONG) :: IN_BASENAME = '' !< Basename of the input file
141 logical :: IN_POSTFIX_TIMELABEL = .false. !< Flag whether timelabel is added to the basename of input file
142 character(len=H_LONG) :: OUT_BASENAME = '' !< Basename of the output file
143 logical :: OUT_POSTFIX_TIMELABEL = .true. !< Flag whether timelabel is added to the basename of output file
144 character(len=H_MID) :: OUT_TITLE = '' !< Title of the output file
145 character(len=H_SHORT) :: OUT_DTYPE = 'DEFAULT' !< Output data type (DEFAULT, REAL4 or REAL8)
146
147 namelist / param_restart / &
148 output_flag, &
149 in_basename, &
150 in_postfix_timelabel, &
151 out_basename, &
152 out_postfix_timelabel, &
153 out_title, &
154 out_dtype
155
156 integer :: ierr
157 !----------------------------------------
158
159 log_newline
160
161 !--- read namelist
162 rewind(io_fid_conf)
163 read(io_fid_conf,nml=param_restart,iostat=ierr)
164 if( ierr < 0 ) then !--- missing
165 log_info("FILE_restart_meshfield_setup",*) 'Not found namelist. Default used.'
166 elseif( ierr > 0 ) then !--- fatal error
167 log_error("FILE_restart_meshfield_setup",*) 'Not appropriate names in namelist PARAM_RESTART. Check!'
168 call prc_abort
169 endif
170 log_nml(param_restart)
171
172 ! Setup the information of the main restart file
173
174 call restart_file%Set_information( in_basename, in_postfix_timelabel, &
175 out_basename, out_postfix_timelabel, out_dtype, out_title )
176
177 restart_file%flag_output = output_flag
178
179 restart_file%file_ptr => null() ! Initialize the pointer to null
180 is_file_main_opened = .false.
181 is_file_main_created = .false.
182 is_file_main_enddef = .false.
183 is_file_main_closed = .false.
184
185 return

References restart_file.

Referenced by mod_dg_driver::dg_driver(), mod_dg_prep::dg_prep(), and scale_file_restart_meshfield::file_restart_meshfield_component::final().

◆ file_restart_meshfield_finalize()

subroutine, public scale_file_restart_meshfield::file_restart_meshfield_finalize

Finalize the main restart file.

Definition at line 190 of file scale_file_restart_meshfield.F90.

191 implicit none
192 !--------------------------------------------------
193 if ( associated(restart_file%file_ptr) ) then
194 call restart_file%file_ptr%Final()
195 nullify( restart_file%file_ptr )
196 end if
197 return

References file_main, and restart_file.

Referenced by mod_dg_driver::dg_driver(), mod_dg_prep::dg_prep(), and scale_file_restart_meshfield::file_restart_meshfield_component::final().

Variable Documentation

◆ restart_file

type(file_restart_meshfield), public scale_file_restart_meshfield::restart_file

An object to manage main restart file.

Definition at line 82 of file scale_file_restart_meshfield.F90.

82 type(FILE_restart_meshfield), public :: restart_file !< An object to manage main restart file

Referenced by mod_dg_driver::dg_driver(), file_restart_meshfield_finalize(), and file_restart_meshfield_setup().

◆ file_main

type(file_base_meshfield), target scale_file_restart_meshfield::file_main

A file object to manage main restart file.

Definition at line 124 of file scale_file_restart_meshfield.F90.

124 type(FILE_base_meshfield), target :: file_main !< A file object to manage main restart file

Referenced by file_restart_meshfield_finalize().