Initializes a formula for libmesh and pyamg