-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcomputeExp.H
79 lines (62 loc) · 1.71 KB
/
computeExp.H
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
List<List<List<List<scalar> > > > F1(energyGroups);
forAll(F1, energyI)
{
F1[energyI]=List<List<List<scalar> > >(klines);
forAll(F1[energyI], lines)
{
F1[energyI][lines]=
List<List<scalar> >(npo);
forAll(F1[energyI][lines], j)
{
F1[energyI][lines][j]=
List<scalar>(raySegments[lines]);
forAll(F1[energyI][lines][j], seg)
{
label ind = cellIndices[lines][seg];
F1[energyI][lines][j][seg]=
1.0 -Foam::exp(-segLengths[lines][seg]
* sigmaT[energyI][ind]/sintheta[j]);
}
}
}
}
List<List<List<List<scalar> > > > H(energyGroups);
List<List<List<List<scalar> > > > G1(energyGroups);
List<List<List<List<scalar> > > > G2(energyGroups);
if(linearSource)
{
forAll(H, energyI)
{
H[energyI]=List<List<List<scalar> > >(klines);
G1[energyI]=List<List<List<scalar> > >(klines);
G2[energyI]=List<List<List<scalar> > >(klines);
forAll(H[energyI], lines)
{
H[energyI][lines]=
List<List<scalar> >(npo);
G1[energyI][lines]=
List<List<scalar> >(npo);
G2[energyI][lines]=
List<List<scalar> >(npo);
forAll(H[energyI][lines], j)
{
H[energyI][lines][j]=
List<scalar>(raySegments[lines]);
G1[energyI][lines][j]=
List<scalar>(raySegments[lines]);
G2[energyI][lines][j]=
List<scalar>(raySegments[lines]);
forAll(H[energyI][lines][j], seg)
{
label ind = cellIndices[lines][seg];
scalar tau=segLengths[lines][seg] * sigmaT[energyI][ind]/sintheta[j];
scalar f1=F1[energyI][lines][j][seg];
scalar G=1 + tau/2 - (1 + 1/tau)*f1;
H[energyI][lines][j][seg]=tau/2 - G;
G1[energyI][lines][j][seg]=G;
G2[energyI][lines][j][seg]=2*tau/3 -(1 + 2/tau)*G;
}
}
}
}
}