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 --- Trivac/src/TRINDX.f | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 Trivac/src/TRINDX.f (limited to 'Trivac/src/TRINDX.f') diff --git a/Trivac/src/TRINDX.f b/Trivac/src/TRINDX.f new file mode 100755 index 0000000..da5ec16 --- /dev/null +++ b/Trivac/src/TRINDX.f @@ -0,0 +1,43 @@ +*DECK TRINDX + SUBROUTINE TRINDX(I,IP,MAX) +* +*----------------------------------------------------------------------- +* +*Purpose: +* Set the perdue storage indices. +* +*Copyright: +* Copyright (C) 2002 Ecole Polytechnique de Montreal +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version +* +*Author(s): A. Hebert +* +*Parameters: input +* I index of the new information element. +* IP array of perdue storage indices. +* MAX size of array IP. +* +*Parameters: output +* IP array of perdue storage indices. +* +*----------------------------------------------------------------------- +* +*---- +* SUBROUTINE ARGUMENTS +*---- + INTEGER I,MAX,IP(MAX) +* + DO 10 I0=1,MAX + IF(IP(I0).EQ.I) THEN + RETURN + ELSE IF(IP(I0).EQ.0) THEN + IP(I0)=I + RETURN + ENDIF + 10 CONTINUE + CALL XABORT('TRINDX: INDEX SEARCH FAILURE.') + RETURN + END -- cgit v1.2.3