summaryrefslogtreecommitdiff
path: root/Dragon/src/PIJD2R.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/PIJD2R.f
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Dragon/src/PIJD2R.f')
-rw-r--r--Dragon/src/PIJD2R.f57
1 files changed, 57 insertions, 0 deletions
diff --git a/Dragon/src/PIJD2R.f b/Dragon/src/PIJD2R.f
new file mode 100644
index 0000000..6508d5b
--- /dev/null
+++ b/Dragon/src/PIJD2R.f
@@ -0,0 +1,57 @@
+*DECK PIJD2R
+ SUBROUTINE PIJD2R(NREG,NSOUT,PROB,FACTOR,LPIJK,NELPIJ,N2PROB,PIJ)
+*
+*-----------------------------------------------------------------------
+*
+*Purpose:
+* Charge PIJ matrices in the DRAGON symmetrized format.
+*
+*Copyright:
+* Copyright (C) 1994 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
+* NREG number of zones for geometry.
+* NSOUT number of surfaces for geometry.
+* PROB collision probabilities.
+* FACTOR one over total xs.
+* LPIJK PIJK flag.
+* NELPIJ number of terms in PIJ.
+* N2PROB number of terms in PROB.
+*
+*Parameters: output
+* PIJ symmetric probability matrix.
+*
+*-----------------------------------------------------------------------
+*
+ IMPLICIT NONE
+*----
+* VARIABLES
+*----
+ INTEGER NREG,NSOUT,NELPIJ,N2PROB,IUN,JUN,KPRB,IVV
+ DOUBLE PRECISION PROB(N2PROB)
+ REAL FACTOR(NREG),PIJ(NELPIJ),COEF
+ LOGICAL LPIJK
+*----
+* STORE IN SYMMETRIC FORMAT
+*----
+ IVV=0
+ COEF=1.0
+ IF(LPIJK) COEF=1.5
+ KPRB=(NSOUT+1)*(NSOUT+2)/2+NSOUT+1
+ DO 20 IUN=1,NREG
+ DO 10 JUN=1,IUN
+ KPRB=KPRB+1
+ IVV=IVV+1
+ PIJ(IVV)=COEF*REAL(PROB(KPRB))*FACTOR(IUN)*FACTOR(JUN)
+ 10 CONTINUE
+ KPRB=KPRB+NSOUT+1
+ 20 CONTINUE
+*
+ RETURN
+ END