summaryrefslogtreecommitdiff
path: root/Donjon/src/TINFL.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/TINFL.f
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Donjon/src/TINFL.f')
-rw-r--r--Donjon/src/TINFL.f56
1 files changed, 56 insertions, 0 deletions
diff --git a/Donjon/src/TINFL.f b/Donjon/src/TINFL.f
new file mode 100644
index 0000000..ac3dfb6
--- /dev/null
+++ b/Donjon/src/TINFL.f
@@ -0,0 +1,56 @@
+*DECK TINFL
+ SUBROUTINE TINFL (NNS,NW,NW2,NK)
+*
+*-----------------------------------------------------------------------
+*
+*Purpose:
+* Produce the useful vector for refuelling, according
+* to a given refuelling-scheme
+*
+*Copyright:
+* Copyright (C) 2010 Ecole Polytechnique de Montreal
+*
+*Author(s):
+* E. Varin, M. Guyot
+*
+*Parameters: input/output
+* NNS Number corresponding to the refuelling type
+* NW Vector corresponding to the refuelling type
+* NW > 0 : Position of the bundle before refuelling
+* NW = 0 : Insertion of a new bundle
+* NW2 Vector NW when the refueling is negative
+* NK Number of bundles per channel
+*
+*-----------------------------------------------------------------------
+*
+ IMPLICIT NONE
+*
+ INTEGER NNS,NK,NW(NK),NW2(NK)
+ INTEGER MODEID,I,IP,NL
+*
+ MODEID = NNS
+*
+*---- MODE DE RECHARGEMENT GENERALISE
+*
+ IF(MODEID.GT.NK) THEN
+ WRITE(6,'(13H @TINFL: NNS=,I6,4H NK=,I6)') NNS,NK
+ CALL XABORT('@TINFL: ONLY BI-DIRECTIONNAL REFUELING ')
+ ELSE
+*
+*------- MODE DE RECHARGEMENT DIRECT
+*
+ NW2(:NK)=0
+ NW(:MODEID)=0
+*
+ IF(MODEID.NE.NK) THEN
+ NL = NK - MODEID
+ DO 20 I=1,NL
+ IP = MODEID + I
+ NW(IP) = I
+ NW2(I)=I+NNS
+ 20 CONTINUE
+ ENDIF
+*
+ ENDIF
+ RETURN
+ END