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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
*DECK SYB7TW
SUBROUTINE SYB7TW (NRD,MRE,XICOTE,IRMIN,DELTCW,DELTCS,ORIPH6,
& ORIPHI,COSPH6,SINPHI,ISW2,LGTRAW,DELTAW)
*
*-----------------------------------------------------------------------
*
*Purpose:
* Compute the intersection lenghts of a track in a sectorized hexagonal
* cell, following a singular point at west.
*
*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
* NRD one plus the number of tubes in the cell.
* MRE first radius intersection the side or first region in contact
* with the external side.
* XICOTE intersections with the side.
* IRMIN region index in contact with the external side.
* DELTCW distance from the south-west corner.
* DELTCS distance from the south-east corner.
* ORIPH6 distance at the middle of south-west side.
* ORIPHI distance at the middle of south side.
* COSPH6 cosinus ($\\pi$/6-Phi).
* SINPHI sinus (Phi).
*
*Parameters: input/output
* ISW2 half side on west (2-3 followed by 4-5 or SW (N-S) followed by
* south (W-E)).
*
*Parameters: output
* LGTRAW removing/addition flag of the next intersection. The formula
* corresponding to case ISW2=5 is complex. In this case, the
* tangent can pass on both sides.
* DELTAW distance of the next track.
*
*-----------------------------------------------------------------------
*
*----
* SUBROUTINE ARGUMENTS
*----
INTEGER NRD,MRE,IRMIN,ISW2
REAL XICOTE(NRD-1),DELTCW,DELTCS,ORIPH6,ORIPHI,COSPH6,SINPHI,
& DELTAW
LOGICAL LGTRAW
*
** Le cas le plus courant est : Secteur Suivant (Sud)
** Le cas general est nettement plus complexe :
*
* NE PAS CONFONDRE
* Intervalle et Limite
*
* Le Suivant depasse le Milieu du Cote Sud-West
IF (ISW2 .EQ. 2) THEN
IF (IRMIN .LE. MRE) THEN
ISW2 = 3
ENDIF
ENDIF
*
* Le Suivant depasse le Milieu du Cote Sud
IF (ISW2 .EQ. 4) THEN
IF (IRMIN .LE. MRE) THEN
ISW2 = 5
ENDIF
ENDIF
*
* Limite suivante Sud-West Nord (Haut)
IF (ISW2 .EQ. 2) THEN
LGTRAW = .TRUE.
DELTAW = ORIPH6 - XICOTE(IRMIN-1) * COSPH6
*
* Limite suivante de Sud-West Sud (Bas)
ELSEIF (ISW2 .EQ. 3) THEN
*
LGTRAW = IRMIN .EQ. NRD
*
* Limite suivante (secteur) coin SSW
IF (LGTRAW) THEN
DELTAW = DELTCW
*
* Limite suivante egalement Sud-West Sud (Bas)
ELSE
DELTAW = ORIPH6 + XICOTE(IRMIN) * COSPH6
ENDIF
*
* Limite suivante de Sud West (Horizontal Gauche)
ELSEIF (ISW2 .EQ. 4) THEN
LGTRAW = .TRUE.
DELTAW = ORIPHI - XICOTE(IRMIN-1) * SINPHI
*
* Limite suivante de Sud West (Horizontal Gauche)
ELSE
*
* Limite suivante (secteur) coin Extreme SSE
IF (IRMIN .GE. NRD) THEN
LGTRAW = .FALSE.
DELTAW = DELTCS
ELSE
LGTRAW = .TRUE.
DELTAW = ORIPHI + XICOTE(IRMIN) * SINPHI
ENDIF
ENDIF
*
RETURN
END
|