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

Report error in the trace of particle density matrices #40

Open
dwillcox opened this issue Jan 11, 2021 · 5 comments · Fixed by #82
Open

Report error in the trace of particle density matrices #40

dwillcox opened this issue Jan 11, 2021 · 5 comments · Fixed by #82

Comments

@dwillcox
Copy link
Member

dwillcox commented Jan 11, 2021

We can report the L2 and max norm of the error in the trace of the particles' density matrices.

Currently, for each particle the flavor vector length L is calculated from N_ab, the matrix storing the number of neutrinos in each state. We also have the particle weight N_p which is just the number of neutrinos in each particle.

Error in Tr(rho) = 1 can significantly affect the number of neutrinos that transform if L ~ N_p, since the size of L controls the maximum amount of flavor transformation. We can define an error E = |L(rho) * N_p - L_0| where L_0 is the initial length stored in the particles and L(rho) * N_p is the flavor vector length calculated from rho, scaled by the particle weight. Then take the L2 and max norms of E by computing Ep^2 for each particle and depositing it onto the grid E, then use sum and max to get L2 and max norms on the grid.

We can then add an input parameter for the error reporting frequency, like report_error_every.

The idea is that this will tell us when our simulations would benefit from symbolically making the assumption that Tr(rho_ab) = 1 => Tr(N_ab) = N_p, eliminating one of the diagonal components algebraically, and evolving a traceless matrix N_ab_p for particles.

@srichers
Copy link
Collaborator

I think there will be a problem when the error in Tr(rho) is comparable to the flavor vector length of rho, rather than when Tr(rho) is comparable to the flavor vector length of rho.

@dwillcox
Copy link
Member Author

Ah, got it, that's simpler to calculate :)

@dwillcox
Copy link
Member Author

So that would just be E_p = |Tr(rho) - 1| then, the way rho is currently defined, I think ...

@srichers
Copy link
Collaborator

Yes, that's right. There is also the error in the length, so E2_p = |length - old_length|

@srichers srichers linked a pull request Mar 1, 2023 that will close this issue
@srichers
Copy link
Collaborator

srichers commented Mar 1, 2023

The realtime_reduced_data branch reports a sum of Tr(rho) over the entire domain. Initially it is equal to the number of particles and should remain so throughout the calculation.

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

Successfully merging a pull request may close this issue.

2 participants