# Path: gusto/kernels.py
# class GaussianElimination(object):
# class Average(object):
# class AverageWeightings(object):
# class PhysicsRecoveryTop():
# class PhysicsRecoveryBottom():
#     def __init__(self, DG1):
#     def apply(self, v_DG1_old, v_DG1, act_coords, eff_coords, num_ext):
#     def __init__(self, V):
#     def apply(self, v_out, weighting, v_in):
#     def __init__(self, V):
#     def apply(self, w):
#     def __init__(self):
#     def apply(self, v_DG1, v_CG1):
#     def __init__(self):
#     def apply(self, v_DG1, v_CG1):


from firedrake import (IntervalMesh, Function, BrokenElement, VectorElement,
                       FunctionSpace, FiniteElement, ExtrudedMesh,
                       interval, TensorProductElement, SpatialCoordinate)
from gusto import kernels
import numpy as np
import pytest
            if field is not None and new_value is not None:
                field.dat.data[i] = new_value
            break

    if not point_found:
        raise ValueError('Your coordinates do not appear to match the coordinates of a DoF')

    if field is None or new_value is None:
        return point_index


@pytest.mark.parametrize("boundary", ["top", "bottom"])
def test_physics_recovery_kernels(boundary):

    m = IntervalMesh(3, 3)
    mesh = ExtrudedMesh(m, layers=3, layer_height=1.0)

    cell = m.ufl_cell().cellname()
    hori_elt = FiniteElement("DG", cell, 0)
    vert_elt = FiniteElement("CG", interval, 1)
    theta_elt = TensorProductElement(hori_elt, vert_elt)
    Vt = FunctionSpace(mesh, theta_elt)
    Vt_brok = FunctionSpace(mesh, BrokenElement(theta_elt))

    initial_field = Function(Vt)
    true_field = Function(Vt_brok)
    new_field = Function(Vt_brok)

    initial_field, true_field, boundary_index = setup_values(boundary, initial_field, true_field)


# Path: gusto/kernels.py
# class GaussianElimination(object):
# class Average(object):
# class AverageWeightings(object):
# class PhysicsRecoveryTop():
# class PhysicsRecoveryBottom():
#     def __init__(self, DG1):
#     def apply(self, v_DG1_old, v_DG1, act_coords, eff_coords, num_ext):
#     def __init__(self, V):
#     def apply(self, v_out, weighting, v_in):
#     def __init__(self, V):
#     def apply(self, w):
#     def __init__(self):
#     def apply(self, v_DG1, v_CG1):
#     def __init__(self):
#     def apply(self, v_DG1, v_CG1):


# Path: tests/kernel_tests/test_phys_rec_kernels.py
from firedrake import (IntervalMesh, Function, BrokenElement, VectorElement,
                       FunctionSpace, FiniteElement, ExtrudedMesh,
                       interval, TensorProductElement, SpatialCoordinate)
from gusto import kernels
import numpy as np
import pytest

            if field is not None and new_value is not None:
                field.dat.data[i] = new_value
            break

    if not point_found:
        raise ValueError('Your coordinates do not appear to match the coordinates of a DoF')

    if field is None or new_value is None:
        return point_index


@pytest.mark.parametrize("boundary", ["top", "bottom"])
def test_physics_recovery_kernels(boundary):

    m = IntervalMesh(3, 3)
    mesh = ExtrudedMesh(m, layers=3, layer_height=1.0)

    cell = m.ufl_cell().cellname()
    hori_elt = FiniteElement("DG", cell, 0)
    vert_elt = FiniteElement("CG", interval, 1)
    theta_elt = TensorProductElement(hori_elt, vert_elt)
    Vt = FunctionSpace(mesh, theta_elt)
    Vt_brok = FunctionSpace(mesh, BrokenElement(theta_elt))

    initial_field = Function(Vt)
    true_field = Function(Vt_brok)
    new_field = Function(Vt_brok)

    initial_field, true_field, boundary_index = setup_values(boundary, initial_field, true_field)


    kernel = kernels.PhysicsRecoveryTop() if boundary == "top" else kernels.PhysicsRecoveryBottom()