Setting `bfield` in upper levels of NestedBlockstate does not work as expected
Ni! Oiê.
Tested with current git version compiled on Fedora 32, python-3.8, gcc-10.1.1, boost-1.69.0. Also tested with 2.31.
This assumes bfield
was intended to be settable at upper levels. Sorry if I'm mistaken, still, in that case, would it be feasible and, if not, perhaps add a warning?
The expected behavior is to freeze part of the vertices and blocks at all levels, leaving the rest free to move but not into the frozen blocks.
A minimal self-contained example is attached: test_bfield_mcmc.py
In the example, frozen vertices and blocks respect bfield
as expected, and free vertices respect the constraint that they do not enter frozen blocks. However, free blocks do move into upper blocks they are not supposed to, such as occupying block 0
despite the fact they start at block 1
and their bfield is [-inf, 0.]
.
I'll try to debug once confirmed that this is supposed to work. In that case, any ideas on where to look for the issue?
[Possibly off-topic]: To the same end I had been using the vertices
parameter with a small tweak to _h_sweep_gen
that transposed it across levels. I came back to bfield
in the hopes of using multiflip, and because my tweak stopped working in recent versions. This is only important if it would be easier to make vertices
work with multiflip across levels, rather than bfield
.
Cheers.