1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
|