summaryrefslogtreecommitdiff
path: root/Dragon/src/MCGFMC.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 /Dragon/src/MCGFMC.f
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Dragon/src/MCGFMC.f')
-rw-r--r--Dragon/src/MCGFMC.f73
1 files changed, 73 insertions, 0 deletions
diff --git a/Dragon/src/MCGFMC.f b/Dragon/src/MCGFMC.f
new file mode 100644
index 0000000..5206900
--- /dev/null
+++ b/Dragon/src/MCGFMC.f
@@ -0,0 +1,73 @@
+*DECK MCGFMC
+ SUBROUTINE MCGFMC(KPN,K,NREG,M,NANI,NFUNL,NZON,KEYFLX,KEYCUR,
+ 1 PHIOUT,V,S,ST,KEYANI)
+*
+*-----------------------------------------------------------------------
+*
+*Purpose:
+* Addition of the regional source to the flux when the 'MOCC/MCI'
+* integration strategy is turned on for the method of characteristics
+* integration.
+*
+*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): R. Le Tellier
+*
+*Parameters: input
+* KPN total number of unknowns per group in flux vector.
+* K total number of volumes for which specific values
+* of the neutron flux and reactions rates are required.
+* NREG number of volumes.
+* M number of material mixtures.
+* NANI scattering anisotropy (=1 for isotropic scattering).
+* NFUNL number of moments of the flux (in 2D : NFUNL=NANI*(NANI+1)/2).
+* NZON index-number of the mixture type assigned to each volume.
+* KEYFLX position of flux elements in flux vector.
+* KEYCUR position of current elements in flux vector.
+* V volumes.
+* S source vector.
+* ST total cross sections array.
+* KEYANI 'mode to l' index: l=KEYANI(nu).
+*
+*Parameters: input/output
+* PHIOUT flux vector.
+*
+*-----------------------------------------------------------------------
+*
+ IMPLICIT NONE
+*----
+* SUBROUTINE ARGUMENTS
+*----
+ INTEGER KPN,K,NREG,M,NANI,NFUNL,NZON(K),KEYFLX(NREG,NFUNL),
+ 1 KEYCUR(K-NREG),KEYANI(NFUNL)
+ REAL V(K),ST(0:M)
+ DOUBLE PRECISION PHIOUT(KPN),S(KPN)
+*----
+* LOCAL VARIABLES
+*----
+ INTEGER I,IBM,IL,IND
+*
+ IF(NANI.LE.0) CALL XABORT('MCGFMC: INVALID VALUE OF NANI.')
+ DO I=1,K
+ IF(V(I).GT.0.) THEN
+ IBM=NZON(I)
+ IF (IBM.LT.0) THEN
+ IND=KEYCUR(I-NREG)
+ PHIOUT(IND)=PHIOUT(IND)/DBLE(V(I))
+ ELSE
+ DO IL=1,NFUNL
+ IND=KEYFLX(I,IL)
+ PHIOUT(IND)=PHIOUT(IND)/DBLE(V(I)*ST(IBM))
+ 1 +S(IND)/DBLE(2*KEYANI(IL)+1)
+ ENDDO
+ ENDIF
+ ENDIF
+ ENDDO
+*
+ RETURN
+ END