Lift the pig cheeks out of the pot, then put them in a dish, cover and chill in the fridge overnight, or for long enough that they are completely chilled, so give them at least two hours (you want the glaze to stick to them when you come to finishing off the dish, and if the cheeks are still warm when you do so, they will fall apart).
Turn down the heat to a simmer and leave to cook for three hours, until the meat is very tender; if you prefer, slow-roast the meat in a 160C (140C fan)/325F/gas 3 oven for two to two and a half hours.
Put the seared meat in a large casserole dish for which you have a lid, then add the onion, carrot, leek, celery, garlic, cloves, star anise, peppercorns, bay leaf and thyme.
Once the gratin has cooled, cover with clingfilm or similar, then weigh it down with a heavy object, such as another oven dish, that will fit neatly on top, then put in the fridge to press for up to 12 hours.
Pour enough of the cream mixture over the potatoes and celeriac to cover, then bake for 45 minutes, until slightly golden on top and cooked through (test for doneness with the tip of a small sharp knife).