Closed tobson closed 7 years ago
Also, not that I see an immediate use case for this, but we could also get a noisy start with a coherent density perturbation by letting U
be a uniformly distributed random number, right?
Regarding the noisy start: That should work, yes.
Regarding the lines: I think this will not work anymore as kyy1 will not be the same as before. So if y1 is in grid units ky should be iky2*pi/ny.
I think I prefer the previous solution where we converted just before storing the result in the particle array.
In DensityPerturbation.__call__()
, the new y1
isn't actually in grid units. I just changed the expression so that it's y1
as defined in InitialCondition.__call__()
times manifold.dy
.
I'll merge this in if this test succeeds. It has Lx=4
so it should be sensitive to not getting the units of the particle positions right.
You need to add sympy to requirements.txt
I love GitHub.
We can rebase and merge now, right?
Yep.
@tberlok Please check if this line is correct. I made this change just so that it looks more similar to the corresponding code in the InitialCondition class.