daschaich / BadHonnef

Templates and model solutions for summer school exercises

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository contains some template code that may be useful for algorithms-related exercises from the July 2021 Bad Honnef Physics School, Methods of Effective Field Theory and Lattice Field Theory. There's no need to use it if you already have a preferred codebase. Model solutions (with no guarantee of correctness) are in a separate branch.

Hybrid Monte Carlo

The goal is to write and test a hybrid Monte Carlo (HMC) algorithm for scalar phi^4 field theory in three dimensions. We can break this up into several small exercises, adapting larger-scale tutorials run by Stefan Schaefer at the 2009 Les Houches Summer School, Modern perspectives in lattice QCD.

First are fundamental coding tasks:

  • Generate gaussian-distributed momenta
  • Implement the computation of the effective hamiltonian H
  • Derive the 'force' needed to update the momenta
  • Implement the elementary updates of the scalar field variables and their conjugate momenta
  • Combine the elementary updates into a leap-frog integrator
  • Implement the computation of ΔH and set up the accept/reject test

Now we can test the code (optionally using the model solution):

  • Check the reversibility of the integrator
  • Check that the root-mean-square ΔH scales appropriately with the step size
  • Check the Creutz equality
  • Combine the elementary updates into an Omelyan--Mryglod--Folk integrator and compare the root-mean-square ΔH vs. the leap-frog integrator

Once the tests are passed, we can compute more interesting things:

  • Measure the magnetization
  • Monitor the equilibration of the magnetization across the critical line
  • Estimate the auto-correlation time of the magnetization across the critical line
  • Experiment as curiosity drives you (hep-lat/9806012 might provide inspiration)

Conjugate gradient

The goal is to write a conjugate gradient (CG) algorithm to invert a lattice fermion operator. Since lattice fermions are trickier than scalar field theories, a more complete framework is provided for those who don't have an existing codebase they would prefer to work with.

The provided code considers the tight-binding hamiltonian of graphene on the spatial honeycomb lattice. It is not suitable for serious research, in part because the fermion operator is implemented as a full matrix rather than a function carrying out the matrix--vector operation. On the other hand, this may make the CG implementation more transparent.

Note that this template code needs LAPACK in order to handle more than two spatial sites (L=1).

While the CG implementation is the only coding task here, there are various experiments to do once it is in place (optionally using the model solution):

  • Monitor the residual as a function of iteration number
  • Check how the convergence changes for different stopping conditions (resid in run)
  • Check how the convergence changes for different L or Nt (the setup time increases rapidly for larger L)

About

Templates and model solutions for summer school exercises

License:GNU General Public License v3.0


Languages

Language:C 95.2%Language:Shell 2.1%Language:Perl 1.6%Language:Makefile 1.2%