blob: 4d2d6e1f750951bb41a9a608641e03e5d2c0d4db (
plain)
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
58
59
60
61
62
63
|
*DECK XELTCW
SUBROUTINE XELTCW(NANGLE,PTSANG,WGTANG)
*
*-----------------------------------------------------------------------
*
*Purpose:
* Compute the integration weights for cyclic tracking.
*
*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
* NANGLE number of angles.
* PTSANG integration points.
*
*Parameters: output
* WGTANG integration weights.
*
*Reference:
* M.J.Halsall, Cactus, a characteritics solution to the neutron
* transport equations in complicated geometries, UK Atomic Energy
* Authority, 1980.
*
*-----------------------------------------------------------------------
*
IMPLICIT NONE
*----
* Subroutine arguments
*----
INTEGER NANGLE
DOUBLE PRECISION PTSANG(NANGLE),WGTANG(NANGLE)
*----
* Local variables
*----
INTEGER LL
DOUBLE PRECISION XDRCST,PI
DOUBLE PRECISION ACCUW
*----
* Computes weights associated with azimuthal angles (PTSANG)
*----
PI=XDRCST('Pi',' ')
IF(NANGLE>1) THEN
WGTANG(1)=1.0D0-(ACOS(PTSANG(2))+ACOS(PTSANG(1)))/PI
ACCUW=WGTANG(1)
DO LL=2,NANGLE-1
* WGTANG(LL)=(PTSANG(LL+1)+PTSANG(LL))/PI
* -(PTSANG(LL)+PTSANG(LL-1))/PI
WGTANG(LL)=(ACOS(PTSANG(LL-1))-ACOS(PTSANG(LL+1)))/PI
ACCUW=ACCUW+WGTANG(LL)
ENDDO
WGTANG(NANGLE)=(ACOS(PTSANG(NANGLE))+ACOS(PTSANG(NANGLE-1)))/PI
ACCUW=ACCUW+WGTANG(NANGLE)
ELSE
WGTANG(1)=1.0D0
ENDIF
RETURN
END
|