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 --- Dragon/src/FMAC04.f | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Dragon/src/FMAC04.f (limited to 'Dragon/src/FMAC04.f') diff --git a/Dragon/src/FMAC04.f b/Dragon/src/FMAC04.f new file mode 100644 index 0000000..ad4ca0b --- /dev/null +++ b/Dragon/src/FMAC04.f @@ -0,0 +1,55 @@ +*DECK FMAC04 + SUBROUTINE FMAC04(NGPRT,NGP,NPART,NK,H) +* +*----------------------------------------------------------------------- +* +*Purpose: +* Reorganize boundary information from FMAC-M array. +* +*Copyright: +* Copyright (C) 2020 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): C. Bienvenue +* +*Parameters: input +* NGPRT number of energy groups per particle. +* NGP number of energy groups for all particles. +* NPART number of particles in FMAC-M file. +* NK number of mixtures +* H boundary informations array from FMAC-M file. +* +*Parameters: output +* H boundary informations array organized by particle. +* +*----------------------------------------------------------------------- +* +*---- +* SUBROUTINE ARGUMENTS +*---- + INTEGER NGPRT(NPART),NGP,NPART + REAL H(NK,NGP+NPART),HTEMP(NK,NGP+NPART) +* + NGT1=0 + NGT2=0 + DO I=1,NPART + DO J=1,NGPRT(I)+1 + DO K=1,NK + IF(J.LE.NGPRT(I)) THEN + HTEMP(k,NGT2+J)=H(k,NGT1+J) + ELSE + HTEMP(k,NGT2+J)=H(k,NGP+NPART+1-I) + ENDIF + ENDDO + ENDDO + NGT1=NGT1+NGPRT(I) + NGT2=NGT2+NGPRT(I)+1 + ENDDO + + H=HTEMP + + RETURN + END -- cgit v1.2.3