USER_PROBLEM: Make sure the wave numbers are not fractions of 2 pi.
If the wave number of the perturbation is a fraction of 2 pi there in no match at the periodic boundary. Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
019f3245cc
commit
09284fcf25
@ -307,9 +307,9 @@ module user_problem
|
|||||||
ux(n) = cos(thh) * cos(thv)
|
ux(n) = cos(thh) * cos(thv)
|
||||||
uy(n) = sin(thh) * cos(thv)
|
uy(n) = sin(thh) * cos(thv)
|
||||||
uz(n) = sin(thv)
|
uz(n) = sin(thv)
|
||||||
kx(n) = pi2 * kper * ux(n)
|
kx(n) = pi2 * nint(kper * ux(n))
|
||||||
ky(n) = pi2 * kper * uy(n)
|
ky(n) = pi2 * nint(kper * uy(n))
|
||||||
kz(n) = pi2 * kper * uz(n)
|
kz(n) = pi2 * nint(kper * uz(n))
|
||||||
tt = 0.0d+00
|
tt = 0.0d+00
|
||||||
do while(tt < 1.0d-08)
|
do while(tt < 1.0d-08)
|
||||||
thh = pi2 * randuni()
|
thh = pi2 * randuni()
|
||||||
@ -326,8 +326,8 @@ module user_problem
|
|||||||
uy(n) = fc * uy(n) / tt
|
uy(n) = fc * uy(n) / tt
|
||||||
uz(n) = fc * uz(n) / tt
|
uz(n) = fc * uz(n) / tt
|
||||||
#else /* NDIMS == 3 */
|
#else /* NDIMS == 3 */
|
||||||
kx(n) = pi2 * kper * cos(thh)
|
kx(n) = pi2 * nint(kper * cos(thh))
|
||||||
ky(n) = pi2 * kper * sin(thh)
|
ky(n) = pi2 * nint(kper * sin(thh))
|
||||||
kz(n) = 0.0d+00
|
kz(n) = 0.0d+00
|
||||||
ux(n) = fc * sin(thh)
|
ux(n) = fc * sin(thh)
|
||||||
uy(n) = fc * cos(thh)
|
uy(n) = fc * cos(thh)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user