Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2lpt for multi fluid #12

Open
energy-berkeley opened this issue Sep 3, 2017 · 1 comment
Open

2lpt for multi fluid #12

energy-berkeley opened this issue Sep 3, 2017 · 1 comment

Comments

@energy-berkeley
Copy link

For the problem in code line 214 # FIXME: Add 2LPT. According to Vlah, the 2LPT of CDM is the only,

Isn't it already fixed by:

    if order == 2:
        source1[...] /= Omega_tot
        source1[...] /= pt.D1(a) # goto z=0

        source2 = lpt2source(source1)

        for spname, sp in species.items():
            DX2 = lpt1(source2, Q)
            sp.S[...] += pt.D2(a) * DX2
            sp.V[...] += a ** 2 * pt.f2(a) * pt.E(a) * pt.D2(a) * DX2

    state = StateVector(self.cosmology, species, self.pm.comm)
    state.a['S'] = a
    state.a['P'] = a
@rainwoodman
Copy link
Owner

This is not exactly correct -- but likely good enough. Feel free to update the comment in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants