gpt icon indicating copy to clipboard operation
gpt copied to clipboard

some small groundwork for Langevin/HMC

Open krox opened this issue 5 years ago • 3 comments

This PR contains some small additions I needed to make make my Langevin code run. My Langevin(/HMC) code itself is by far not general enough to put it into gpt, so I dont plan to. But these utils might be useful for others doing similar things.

  • qcd.gauge.staple() to create force-term of gauge-actions
  • operator.deriv() to create force-term of fermion-actions
  • reunitize() obviously
  • qcd.gauge.field_strength() and matrix.inv() for some clover-term-based preconditioning (also added clover-term to the wilson-reference-implementation in order to test that I got the signs/prefactors correct)

krox avatar Aug 25 '20 16:08 krox

There are a lot of useful things in this PR. Thank you! I will, however, need to make some changes before merging. Unfortunately, at earliest I can look into it next week. For now, let me share some thoughts:

  • This adds features without associated tests, i.e., our test coverage will decrease after this merge.
  • Some features may be better suited for gpt versus gpt+cgpt such as reunitize and I already have a draft implementation that does not need the added cgpt function.

lehner avatar Aug 27 '20 13:08 lehner

I re-implemented "reunitize()" to not add any cgpt functions, i.e. its pure python now.

While doing so I noticed that Grids "ProjectOnGroup()" actually only produces U(N) matrices, not SU(N) (see here). My new implementation fixes this, i.e. it forces Det=1.

krox avatar Sep 11 '20 15:09 krox

from my side, this is ready to be merged

krox avatar Sep 21 '20 15:09 krox