-
Notifications
You must be signed in to change notification settings - Fork 6
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
Helical/Snake Boundaries #28
Comments
So I think this only makes sense for square/rectangle lattice IIUC? I'm actually thinking about maybe we can just flatten the configuration array for helical boundaries when someone needs it? |
it's applicable for triangular/hexagonal/kagome as well probably also for higher dimensional bravais lattices, though i don't know how it'd be implemented in those cases |
I didn't know about this package -- nice! It seems like something that a physics lattices package should ideally have, and certainly should be possible to do. |
@dpsanders would you mind showing some more specific case how that was used so maybe we can have a better idea on how to hook it in?
True, I'm more thinking about how to make it compatible with
I think for the 2D case, Helical boundaries can always be implied by flattening the final configuration/iterator our lattice types generates, e.g if we go column-wise, the |
i'm not quite sure what you mean by flattening? |
e.g when you get the sites of a square lattice, by flattening it to a |
not quite, the nearest neighbors for periodic and helical boundaries are fairly different, so you can't get helical BCs from PBC Consider an The (1st) nearest neighbors for PBC are (cartesian indexes on the left, and the corresponding linear index on the right): In Helical BCs the nearest neighbors are: you can show that (1) and (4) are the same, meaning (in the row-major case) the neighbours in the vertical direction for PBC and HBC are the same, but not the neighbours in the horizontal direction (it's the opposite in the column-major case). |
Helical BCs are a fast approximation to Periodic BCs which make use of the linear storage of arrays to scrape off some computational overhead associated with accessing N-dimensional arrays. See Chapter 13 of Newman and Barkema's book: "Monte Carlo Methods in Statistical Physics" for an overview, or Wikipedia for a very brief summary of the HyperCubic case. People familiar with DMRG will recognize this as something similar to the "Snake" boundary condition.
It is, however, difficult to implement in a clean way:
Coordinate
s. This isn't a type-stability issue (since we're dispatching on the BC type anyway), more of a user-experience one.So my question is: will people use Helical BCs? Please comment below if you believe you will.
The text was updated successfully, but these errors were encountered: