summaryrefslogtreecommitdiff
path: root/Dragon/src/SYBWIJ.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/SYBWIJ.f
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Dragon/src/SYBWIJ.f')
-rw-r--r--Dragon/src/SYBWIJ.f57
1 files changed, 57 insertions, 0 deletions
diff --git a/Dragon/src/SYBWIJ.f b/Dragon/src/SYBWIJ.f
new file mode 100644
index 0000000..a172df4
--- /dev/null
+++ b/Dragon/src/SYBWIJ.f
@@ -0,0 +1,57 @@
+*DECK SYBWIJ
+ SUBROUTINE SYBWIJ (NREG,MAXPTS,SIGW,PIJ)
+*
+*-----------------------------------------------------------------------
+*
+*Purpose:
+* Scattering reduction for collision probabilities.
+*
+*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
+* NREG total number of regions.
+* MAXPTS first dimension of matrix PIJ.
+* SIGW P0 within-group scattering macroscopic cross sections
+* ordered by volume.
+*
+*Parameters: input/output
+* PIJ reduced collision probability matrix on input and
+* scattering-reduced collision probability matrix at output.
+*
+*-----------------------------------------------------------------------
+*
+*----
+* SUBROUTINE ARGUMENTS
+*----
+ INTEGER NREG,MAXPTS
+ REAL SIGW(NREG),PIJ(MAXPTS,NREG)
+*----
+* LOCAL VARIABLES
+*----
+ REAL, ALLOCATABLE, DIMENSION(:,:) :: WIJ
+*
+ ALLOCATE(WIJ(NREG,2*NREG))
+ DO 20 I=1,NREG
+ DO 10 J=1,NREG
+ WIJ(I,NREG+J)=PIJ(I,J)
+ WIJ(I,J)=-PIJ(I,J)*SIGW(J)
+ 10 CONTINUE
+ WIJ(I,I)=1.0+WIJ(I,I)
+ 20 CONTINUE
+ CALL ALSB(NREG,NREG,WIJ,IER,NREG)
+ IF(IER.NE.0) CALL XABORT('SYBWIJ: SINGULAR MATRIX.')
+ DO 40 J=1,NREG
+ DO 30 I=1,NREG
+ PIJ(I,J)=WIJ(I,NREG+J)
+ 30 CONTINUE
+ 40 CONTINUE
+ DEALLOCATE(WIJ)
+ RETURN
+ END