diff options
| author | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
|---|---|---|
| committer | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
| commit | 7dfcc480ba1e19bd3232349fc733caef94034292 (patch) | |
| tree | 03ee104eb8846d5cc1a981d267687a729185d3f3 /Donjon/src/HSTGSD.f | |
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Donjon/src/HSTGSD.f')
| -rw-r--r-- | Donjon/src/HSTGSD.f | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/Donjon/src/HSTGSD.f b/Donjon/src/HSTGSD.f new file mode 100644 index 0000000..1008d58 --- /dev/null +++ b/Donjon/src/HSTGSD.f @@ -0,0 +1,100 @@ +*DECK HSTGSD + SUBROUTINE HSTGSD(IPHST, MAXI, IOK, DENI, FDEN ) +* +*---------- +* +*Purpose: +* To read from or write to to history file +* isotopic and fuel densities. +*Copyright: +* Copyright (C) 2003 Ecole Polytechnique de Montreal. +* +*Author(s): +* G. Marleau +* +*Parameters: input +* IPHST address of the \dds{history} data structure. +* MAXI maximum number of isotopes. +* +*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; +* --> on output, a value of 0 indicates that +* the required processing took place +* successfully while a negative value indicates +* a failure of the processing. +* DENI isotopic concentration. +* FDEN average fuel density and weight. +* IOK status of read. +* On input -> IOK< 0 means get densities +* densities +* On input -> IOK> 0 means save densities +* On output -> IOK= 0 success +* IOK=-1 error: density missing +* IOK=-2 error: involid processing option +* DENI initial and final isotopic concentration. +* FDEN initial fuel density and heavy element mass. +* +*---------- +* + USE GANLIB + IMPLICIT NONE +*---- +* SUBROUTINE ARGUMENTS +*---- + TYPE(C_PTR) IPHST + INTEGER MAXI,IOK + REAL DENI(0:MAXI) + REAL FDEN(2) +*---- +* LOCAL PARAMETERS +*---- + INTEGER IOUT + CHARACTER NAMSBR*6 + PARAMETER (IOUT=6,NAMSBR='HSTGSD') +*---- +* LOCAL VARIABLES +*---- + INTEGER ILCMLN,ILCMTY +*---- +* Local parameters after refuel +*---- + IF(IOK .LT. 0) THEN + IOK=0 +*---- +* Get isotopes concentration +*---- + CALL LCMLEN(IPHST,'ISOTOPESDENS',ILCMLN,ILCMTY) + IF(ILCMLN .LE. 0 .OR. ILCMLN .GT. MAXI) THEN + IOK=-1 + ELSE + CALL LCMGET(IPHST,'ISOTOPESDENS',DENI(1)) + ENDIF +*---- +* Get fuel density +*---- + CALL LCMLEN(IPHST,'FUELDEN-INIT',ILCMLN,ILCMTY) + IF(ILCMLN .LE. 0 .OR. ILCMLN .GT. 2) THEN + IOK=-1 + ELSE + CALL LCMGET(IPHST,'FUELDEN-INIT',FDEN) + ENDIF + ELSE IF(IOK .GT. 0) THEN + IOK=0 +*---- +* Put isotopes concentration +*---- + CALL LCMPUT(IPHST,'ISOTOPESDENS',MAXI,2,DENI(1)) +*---- +* Put fuel density +*---- + CALL LCMPUT(IPHST,'FUELDEN-INIT',2,2,FDEN) + ELSE + IOK=-2 + ENDIF + RETURN + END |
