-
- Downloads
Install PT update callback & use it to update pt
Previously, the client-side `update::parallel_tempering` actually took care itself of updating the phase space point, rather than calling into update_phase_point(...). This bypassed the observable-management that is done in the pt_adapter (as well as potentially any other intermediate simulation adapters). The fix I eventually came up with is not a thing of beauty: simulations which want to use PT must define a `install_pt_update_callback(...)` member function as part of their SVM interface; otherwise it is not necessary. This hands it a callback function which invokes `update_phase_point` on the `pt_adapter`. The simulation should store this callback and eventually pass it on to `pt::negotiate_update`. Never should the client code invoke the callback itself. A (somewhat more elegant alternative) would be to make `update_phase_point` a virtual function and invoke it polymorphically that way. This would be more elegant for most codes, but it would still not help for frustmag, where the individual updates do not have access to the simulation class. This may be subject to refactoring. Also, right now the simulation is crashing still.
Showing
- frustmag/hamiltonian/ising.hpp 2 additions, 17 deletionsfrustmag/hamiltonian/ising.hpp
- frustmag/update/mux.hpp 47 additions, 0 deletionsfrustmag/update/mux.hpp
- frustmag/update/parallel_tempering.hpp 9 additions, 7 deletionsfrustmag/update/parallel_tempering.hpp
- pt.hpp 25 additions, 17 deletionspt.hpp
- pt_adapter.hpp 3 additions, 0 deletionspt_adapter.hpp
Loading
Please register or sign in to comment