# 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, RectangleMesh,
                       VectorFunctionSpace, SpatialCoordinate)
from gusto import kernels
import numpy as np
import pytest
    num_points = len(coord_field.dat.data[:])
    point_found = False

    for i in range(num_points):
        # Do the coordinates at the ith point match our desired coords?
        if np.allclose(coord_field.dat.data[i], coords, rtol=1e-14):
            point_found = True
            point_index = i
            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("geometry", ["1D", "2D"])
def test_average(geometry, mesh):

    vec_CG1 = VectorFunctionSpace(mesh, "CG", 1)

    # We will fill DG_field with values, and average them to CG_field
    weights = Function(vec_CG1)
    true_values = Function(vec_CG1)

    true_values = setup_values(geometry, true_values)


# 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_weighting_kernel.py
from firedrake import (IntervalMesh, Function, RectangleMesh,
                       VectorFunctionSpace, SpatialCoordinate)
from gusto import kernels
import numpy as np
import pytest

    num_points = len(coord_field.dat.data[:])
    point_found = False

    for i in range(num_points):
        # Do the coordinates at the ith point match our desired coords?
        if np.allclose(coord_field.dat.data[i], coords, rtol=1e-14):
            point_found = True
            point_index = i
            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("geometry", ["1D", "2D"])
def test_average(geometry, mesh):

    vec_CG1 = VectorFunctionSpace(mesh, "CG", 1)

    # We will fill DG_field with values, and average them to CG_field
    weights = Function(vec_CG1)
    true_values = Function(vec_CG1)

    true_values = setup_values(geometry, true_values)


    kernel = kernels.AverageWeightings(vec_CG1)