summaryrefslogtreecommitdiff
path: root/Donjon/src/HSTGSL.f
diff options
context:
space:
mode:
authorstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
committerstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
commit7dfcc480ba1e19bd3232349fc733caef94034292 (patch)
tree03ee104eb8846d5cc1a981d267687a729185d3f3 /Donjon/src/HSTGSL.f
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Donjon/src/HSTGSL.f')
-rw-r--r--Donjon/src/HSTGSL.f111
1 files changed, 111 insertions, 0 deletions
diff --git a/Donjon/src/HSTGSL.f b/Donjon/src/HSTGSL.f
new file mode 100644
index 0000000..be685b8
--- /dev/null
+++ b/Donjon/src/HSTGSL.f
@@ -0,0 +1,111 @@
+*DECK HSTGSL
+ SUBROUTINE HSTGSL(IPHST, MAXL, IOK, TIMPOW, PARAML)
+*
+*----------
+*
+*Purpose:
+* To read from or save to history file the local parameters
+*
+*Copyright:
+* Copyright (C) 2003 Ecole Polytechnique de Montreal.
+*
+*Author(s):
+* G. Marleau
+*
+*Parameters: input
+* IPHST address of the \dds{history} data structure.
+* MAXL maximum number of local parameters.
+*
+*Parameters: input/output
+* IOK processing option where:
+* --> on input, a negative value indicates that the
+* information is to be extracted from the \dds{history} data
+* structure and a positive value indicates that the information
+* is to be stored on the \dds{history} data structure
+* (-1 and 1 for before refueling and -2, 2 for after refueling);
+* --> on output, a value of 0 indicates that the required
+* processing took place successfully while a negative
+* value indicates a failure of the processing.
+* TIMPOW burnup time and power density.
+* PARAML local parameters.
+*
+*----------
+*
+ USE GANLIB
+ IMPLICIT NONE
+*----
+* SUBROUTINE ARGUMENTS
+*----
+ TYPE(C_PTR) IPHST
+ INTEGER MAXL,IOK
+ REAL PARAML(0:MAXL)
+ REAL TIMPOW(2)
+*----
+* LOCAL PARAMETERS
+*----
+ INTEGER IOUT
+ CHARACTER NAMSBR*6
+ PARAMETER (IOUT=6,NAMSBR='HSTGSL')
+*----
+* LOCAL VARIABLES
+*----
+ INTEGER ILCMLN,ILCMTY
+*----
+* Local parameters after refuel
+*----
+ IF(IOK .EQ. -2) THEN
+*----
+* Get local parameters after refuel
+*----
+ CALL LCMLEN(IPHST,'PARAMLOCALAR',ILCMLN,ILCMTY)
+ IF(ILCMLN .LE. 0 .OR. ILCMLN .GT. MAXL) THEN
+ IOK=-1
+ ELSE
+ CALL LCMGET(IPHST,'PARAMLOCALAR',PARAML(1))
+ IOK=0
+ ENDIF
+ CALL LCMLEN(IPHST,'PARAMBURNTAR',ILCMLN,ILCMTY)
+ IF(ILCMLN .LE. 0 .OR. ILCMLN .GT. 2) THEN
+ IOK=-1
+ ELSE
+ CALL LCMGET(IPHST,'PARAMBURNTAR',TIMPOW)
+ IOK=0
+ ENDIF
+ ELSE IF(IOK .EQ. -1) THEN
+*----
+* Get local parameters before refuel
+*----
+ PARAML(0)=0
+ CALL LCMLEN(IPHST,'PARAMLOCALBR',ILCMLN,ILCMTY)
+ IF(ILCMLN .LE. 0 .OR. ILCMLN .GT. MAXL) THEN
+ IOK=-1
+ ELSE
+ CALL LCMGET(IPHST,'PARAMLOCALBR',PARAML(1))
+ IOK=0
+ ENDIF
+ CALL LCMLEN(IPHST,'PARAMBURNTBR',ILCMLN,ILCMTY)
+ IF(ILCMLN .LE. 0 .OR. ILCMLN .GT. 2) THEN
+ IOK=-1
+ ELSE
+ CALL LCMGET(IPHST,'PARAMBURNTBR',TIMPOW)
+ IOK=0
+ ENDIF
+ ELSE IF(IOK .EQ. 1) THEN
+*----
+* Save local parameters before refuel
+*----
+ CALL LCMPUT(IPHST,'PARAMLOCALBR',MAXL,2,PARAML(1))
+ CALL LCMPUT(IPHST,'PARAMBURNTBR',2,2,TIMPOW)
+ IOK=0
+ ELSE IF(IOK .EQ. 2) THEN
+*----
+* Save local parameters after refuel
+*----
+ CALL LCMPUT(IPHST,'PARAMLOCALAR',MAXL,2,PARAML(1))
+ CALL LCMPUT(IPHST,'PARAMBURNTAR',2,2,TIMPOW)
+ IOK=0
+ ELSE
+ IOK=-2
+ ENDIF
+ RETURN
+ END