def METHOD_NAME():
    N = 4
    mesh = UnitCubeMesh(2**N, 2**N, 2**N)
    V = FunctionSpace(mesh, "N1curl", 1)
    u = TrialFunction(V)
    v = TestFunction(V)
    a = inner(curl(u), curl(v))*dx
    L = inner(Constant((0., 0., 0.)), v)*dx
    x, y, z = SpatialCoordinate(mesh)
    B0 = 1
    constant_field = as_vector([-0.5*B0*(y - 0.5), 0.5*B0*(x - 0.5), 0])
    bc = DirichletBC(V, constant_field, (1, 2, 3, 4))
    params = {'snes_type': 'ksponly',
              'ksp_type': 'cg',
              'ksp_max_it': '30',
              'ksp_rtol': '1e-8',
              'pc_type': 'python',
              'pc_python_type': 'firedrake.HypreAMS',
              'pc_hypre_ams_zero_beta_poisson': True
              }
    A = Function(V)
    problem = LinearVariationalProblem(a, L, A, bcs=bc)
    solver = LinearVariationalSolver(problem, solver_parameters=params)
    solver.solve()
    assert solver.snes.ksp.getIterationNumber() < 10