Skip to content

Commit 33294d5

Browse files
minor fix
1 parent 8488b46 commit 33294d5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pgens/decay_turbulence/pgen.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ namespace user {
5959
real_t value { ZERO };
6060
for (size_t i = 0; i < n2 - n1 + 1; ++i) {
6161
for (size_t j = 0; j < n2 - n1 + 1; ++j) {
62-
value += 2.0 * b_rms * (n1 + i) / (n2 - n1) / math::sqrt(SQR(n1 + i) + SQR(n1 + j))
62+
value += 2.0 * b_rms * (n1 + i) / (n2 - n1 + ONE) / math::sqrt(SQR(n1 + i) + SQR(n1 + j))
6363
* math::sin(constant::TWO_PI * (n1 + j) * x_Ph[0] / lx + phases(i, j, 0))
6464
* math::cos(constant::TWO_PI * (n1 + i) * x_Ph[1] / lx + phases(i, j, 1));
6565
}
@@ -75,7 +75,7 @@ namespace user {
7575
real_t value { ZERO };
7676
for (size_t i = 0; i < n2 - n1 + 1; ++i) {
7777
for (size_t j = 0; j < n2 - n1 + 1; ++j) {
78-
value += - 2.0 * b_rms * (n1 + j) / (n2 - n1) / math::sqrt(SQR(n1 + i) + SQR(n1 + j))
78+
value += - 2.0 * b_rms * (n1 + j) / (n2 - n1 + ONE) / math::sqrt(SQR(n1 + i) + SQR(n1 + j))
7979
* math::cos(constant::TWO_PI * (n1 + j) * x_Ph[0] / lx + phases(i, j, 0))
8080
* math::sin(constant::TWO_PI * (n1 + i) * x_Ph[1] / lx + phases(i, j, 1));
8181
}

0 commit comments

Comments
 (0)