From 7dfcc480ba1e19bd3232349fc733caef94034292 Mon Sep 17 00:00:00 2001 From: stainer_t Date: Mon, 8 Sep 2025 13:48:49 +0200 Subject: Initial commit from Polytechnique Montreal --- Donjon/src/TINFL.f | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Donjon/src/TINFL.f (limited to 'Donjon/src/TINFL.f') 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 -- cgit v1.2.3