96 INTEGER(INTG),
INTENT(OUT) :: ERR
100 enters(
"HISTORY_CLOSE",err,error,*999)
102 IF(
ASSOCIATED(history))
THEN 103 history%UNIT_NUMBER=0
105 CALL flagerror(
"History is not associated.",err,error,*999)
108 exits(
"HISTORY_CLOSE")
110 999 errorsexits(
"HISTORY_CLOSE",err,error)
123 INTEGER(INTG),
INTENT(OUT) :: ERR
127 enters(
"HISTORY_CREATE_FINISH",err,error,*999)
129 IF(
ASSOCIATED(history))
THEN 130 history%HISTORY_FINISHED=.true.
132 CALL flagerror(
"History is not associated.",err,error,*999)
135 exits(
"HISTORY_CREATE_FINISH")
137 999 errorsexits(
"HISTORY_CREATE_FINISH",err,error)
151 INTEGER(INTG),
INTENT(OUT) :: ERR
155 enters(
"HISTORY_CREATE_START",err,error,*999)
157 IF(
ASSOCIATED(control_loop))
THEN 158 IF(
ASSOCIATED(history))
THEN 159 CALL flagerror(
"History is already associated.",err,error,*999)
163 CALL flagerror(
"Control loop is not associated.",err,error,*999)
166 exits(
"HISTORY_CREATE_START")
168 999 errorsexits(
"HISTORY_CREATE_START",err,error)
181 INTEGER(INTG),
INTENT(OUT) :: ERR
185 enters(
"HISTORY_DESTROY",err,error,*999)
187 IF(
ASSOCIATED(history))
THEN 190 CALL flagerror(
"History is not associated.",err,error,*999)
193 exits(
"HISTORY_DESTROY")
195 999 errorsexits(
"HISTORY_DESTROY",err,error)
208 INTEGER(INTG),
INTENT(OUT) :: ERR
212 enters(
"HISTORY_FINALISE",err,error,*999)
214 IF(
ASSOCIATED(history))
THEN 215 IF(history%UNIT_NUMBER/=0)
CALL history_close(history,err,error,*999)
219 exits(
"HISTORY_FINALISE")
221 999 errorsexits(
"HISTORY_FINALISE",err,error)
234 INTEGER(INTG),
INTENT(OUT) :: ERR
238 enters(
"HISTORY_INITIALISE",err,error,*999)
240 IF(
ASSOCIATED(control_loop))
THEN 241 IF(
ASSOCIATED(control_loop%HISTORY))
THEN 242 CALL flagerror(
"Control loop history is already associated.",err,error,*999)
244 ALLOCATE(control_loop%HISTORY,stat=err)
245 IF(err/=0)
CALL flagerror(
"Could not allocate control loop history.",err,error,*999)
246 control_loop%HISTORY%CONTROL_LOOP=>control_loop
247 control_loop%HISTORY%HISTORY_FINISHED=.false.
249 control_loop%HISTORY%FILENAME=
"History" 250 control_loop%HISTORY%UNIT_NUMBER=0
253 CALL flagerror(
"Control loop is not associated.",err,error,*999)
256 exits(
"HISTORY_INITIALISE")
258 999 errorsexits(
"HISTORY_INITIALISE",err,error)
271 INTEGER(INTG),
INTENT(IN) :: FILE_FORMAT
272 INTEGER(INTG),
INTENT(OUT) :: ERR
277 enters(
"HISTORY_FILE_FORMAT_SET",err,error,*999)
279 IF(
ASSOCIATED(history))
THEN 280 IF(history%HISTORY_FINISHED)
THEN 281 CALL flagerror(
"History has been finished.",err,error,*999)
283 SELECT CASE(file_format)
289 local_error=
"The supplied file format of "//
trim(
number_to_vstring(file_format,
"*",err,error))//
" is invalid." 290 CALL flagerror(local_error,err,error,*999)
294 CALL flagerror(
"History is not associated.",err,error,*999)
297 exits(
"HISTORY_FILE_FORMAT_SET")
299 999 errorsexits(
"HISTORY_FILE_FORMAT_SET",err,error)
312 CHARACTER(LEN=*),
INTENT(IN) :: FILENAME
313 INTEGER(INTG),
INTENT(OUT) :: ERR
317 enters(
"HISTORY_FILENAME_SET_C",err,error,*999)
319 IF(
ASSOCIATED(history))
THEN 320 IF(history%HISTORY_FINISHED)
THEN 321 CALL flagerror(
"History has been finished.",err,error,*999)
324 history%FILENAME=filename
327 CALL flagerror(
"History is not associated.",err,error,*999)
330 exits(
"HISTORY_FILENAME_SET_C")
332 999 errorsexits(
"HISTORY_FILENAME_SET_C",err,error)
346 INTEGER(INTG),
INTENT(OUT) :: ERR
350 enters(
"HISTORY_FILENAME_SET_VS",err,error,*999)
352 IF(
ASSOCIATED(history))
THEN 353 IF(history%HISTORY_FINISHED)
THEN 354 CALL flagerror(
"History has been finished.",err,error,*999)
357 history%FILENAME=filename
360 CALL flagerror(
"Problem is not associated.",err,error,*999)
363 exits(
"HISTORY_FILENAME_SET_VS")
365 999 errorsexits(
"HISTORY_FILENAME_SET_VS",err,error)
378 INTEGER(INTG),
INTENT(OUT) :: ERR
382 enters(
"HISTORY_OPEN",err,error,*999)
384 IF(
ASSOCIATED(history))
THEN 385 IF(history%HISTORY_FINISHED)
THEN 387 CALL flagerror(
"History has not been finished.",err,error,*999)
390 CALL flagerror(
"History is not associated.",err,error,*999)
393 exits(
"HISTORY_OPEN")
395 999 errorsexits(
"HISTORY_OPEN",err,error)
subroutine, public history_file_format_set(HISTORY, FILE_FORMAT, ERR, ERROR,)
Sets/changes the file type for a history file.
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
Sets/changes the filename for a history file.
This module handles all problem wide constants.
Converts a number to its equivalent varying string representation.
subroutine history_finalise(HISTORY, ERR, ERROR,)
Finalises a history file and deallocates all memory.
subroutine history_filename_set_c(HISTORY, FILENAME, ERR, ERROR,)
Sets/changes the character string filename for a history file.
subroutine history_filename_set_vs(HISTORY, FILENAME, ERR, ERROR,)
Sets/changes the varying string filename for a history file.
This module contains all string manipulation and transformation routines.
Contains information on a control loop.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
This module handles all history file routines.
subroutine history_close(HISTORY, ERR, ERROR,)
Closes a history file.
subroutine history_open(HISTORY, ERR, ERROR,)
Opens a history file.
subroutine, public exits(NAME)
Records the exit out of the named procedure.
This module contains all type definitions in order to avoid cyclic module references.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
subroutine, public history_destroy(HISTORY, ERR, ERROR,)
Destroys a history file.
Contains information about a history file for a control loop.
subroutine, public history_create_start(CONTROL_LOOP, HISTORY, ERR, ERROR,)
Starts the process of creating a history file.
subroutine, public history_create_finish(HISTORY, ERR, ERROR,)
Finishes the process of creating a history file.
Flags an error condition.
This module contains all kind definitions.
subroutine history_initialise(CONTROL_LOOP, ERR, ERROR,)
Initialises a history file.