aportelli / Hadrons

Grid-based workflow management system for lattice field theory simulations
GNU General Public License v2.0
23 stars 32 forks source link

Feat/TopologicalCharge #108

Closed fjosw closed 1 year ago

fjosw commented 1 year ago

I started implementing a new module which can compute the topological charge using the Wilson flow. At the moment the module uses an adaptive integrator, Grid also has a standard integrator which could be used alternatively.

For now, the output is only printed to the log.

aportelli commented 1 year ago

Hi @fjosw thanks this is a great addition. Could you add something that output the result to disk please (it can be a single number HDF5)? My convention is to assume that the primary source of results are files on disk, not the log (although a number of modules show results of part of it in the log). Thanks

fjosw commented 1 year ago

I thought a bit more about the output today and I could imagine outputting both, the energy density and the topological charge, as a function of the flow time instead of just outputting the charge at the final flow time. This would also facilitate the extraction of $t_0$ and $w_0$. If we go down that route a name like FlowObservables would maybe better describe the module.

fjosw commented 1 year ago

I have put this PR on hold for now as Chris Kelly has made relevant changes to the Wilson Flow functionality on the dirichlet branch which Peter intends to merge soon (https://github.com/paboyle/Grid/pull/412). An example of the new functionality can for example be found here.

fjosw commented 1 year ago

I adopted the model to the recent changes from the dirichlet branch, implemented the computation of the flow observables at each step of the Wilson flow smearing and added an hdf5 output to the module.

fjosw commented 1 year ago

I improved the header comment.

The output does not serialize to a 2D array but instead to four 1D arrays with separate descriptions. I followed up on Simon's suggestion and prioritized verbosity over memory efficiency. One would typically only compute the output once per configuration and the file size is about 20k for typical flow times so I think memory overhead is not a concern here.

aportelli commented 1 year ago

Good with me, thanks!