Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single source of truth #3929

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/element_list.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from finat.ufl.elementlist import ufl_elements
# ~ from ufl.finiteelement.elementlist import ufl_elements
from tsfc.finatinterface import supported_elements
from finat.element_factory import supported_elements
import csv

shape_names = {
Expand Down
2 changes: 1 addition & 1 deletion firedrake/assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import numpy
from pyadjoint.tape import annotate_tape
from tsfc import kernel_args
from tsfc.finatinterface import create_element
from finat.element_factory import create_element
from tsfc.ufl_utils import extract_firedrake_constants
import ufl
import finat.ufl
Expand Down
2 changes: 1 addition & 1 deletion firedrake/cython/dmcommon.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from mpi4py import MPI
from firedrake.utils import IntType, ScalarType
from libc.string cimport memset
from libc.stdlib cimport qsort
from tsfc.finatinterface import as_fiat_cell
from finat.element_factory import as_fiat_cell

cimport numpy as np
cimport mpi4py.MPI as MPI
Expand Down
2 changes: 1 addition & 1 deletion firedrake/cython/extrusion_numbering.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ from mpi4py.libmpi cimport (MPI_Op_create, MPI_OP_NULL, MPI_Op_free,
MPI_User_function)
from pyop2 import op2
from firedrake.utils import IntType
from tsfc.finatinterface import as_fiat_cell
from finat.element_factory import as_fiat_cell

cimport numpy
cimport mpi4py.MPI as MPI
Expand Down
2 changes: 1 addition & 1 deletion firedrake/extrusion_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pyop2.caching import serial_cache
from firedrake.petsc import PETSc
from firedrake.utils import IntType, RealType, ScalarType
from tsfc.finatinterface import create_element
from finat.element_factory import create_element
import loopy as lp
from loopy.version import LOOPY_USE_LANGUAGE_VERSION_2018_2 # noqa: F401
from firedrake.parameters import target
Expand Down
2 changes: 1 addition & 1 deletion firedrake/functionspacedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from decorator import decorator
from functools import partial

from tsfc.finatinterface import create_element as _create_element
from finat.element_factory import create_element as _create_element

from pyop2 import op2
from firedrake.utils import IntType
Expand Down
2 changes: 1 addition & 1 deletion firedrake/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from pyop2 import op2
from pyop2.caching import memory_and_disk_cache

from tsfc.finatinterface import create_element, as_fiat_cell
from finat.element_factory import create_element, as_fiat_cell
from tsfc import compile_expression_dual_evaluation
from tsfc.ufl_utils import extract_firedrake_constants

Expand Down
2 changes: 1 addition & 1 deletion firedrake/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
ngsPETSc = None
# Only for docstring
import mpi4py # noqa: F401
from tsfc.finatinterface import as_fiat_cell
from finat.element_factory import as_fiat_cell


__all__ = [
Expand Down
4 changes: 2 additions & 2 deletions firedrake/mg/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from tsfc.driver import TSFCIntegralDataInfo
from tsfc.kernel_interface.common import lower_integral_type
from tsfc.parameters import default_parameters
from tsfc.finatinterface import create_element
from finat.element_factory import create_element
from finat.quadrature import make_quadrature
from firedrake.pointquery_utils import dX_norm_square, X_isub_dX, init_X, inside_check, is_affine, celldist_l1_c_expr
from firedrake.pointquery_utils import to_reference_coords_newton_step as to_reference_coords_newton_step_body
Expand All @@ -45,7 +45,7 @@ def to_reference_coordinates(ufl_coordinate_element, parameters=None):
parameters = _

# Create FInAT element
element = tsfc.finatinterface.create_element(ufl_coordinate_element)
element = finat.element_factory.create_element(ufl_coordinate_element)
gdim, = ufl_coordinate_element.reference_value_shape
cell = ufl_coordinate_element.cell

Expand Down
2 changes: 1 addition & 1 deletion firedrake/output/paraview_reordering.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tsfc.finatinterface import create_base_element
from finat.element_factory import create_base_element
import numpy as np
from pyop2.utils import as_tuple

Expand Down
2 changes: 1 addition & 1 deletion firedrake/pointquery_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def compile_coordinate_element(mesh: MeshGeometry, contains_eps: float, paramete

ufl_coordinate_element = mesh.ufl_coordinate_element()
# Create FInAT element
element = tsfc.finatinterface.create_element(ufl_coordinate_element)
element = finat.element_factory.create_element(ufl_coordinate_element)

code = {
"geometric_dimension": mesh.geometric_dimension(),
Expand Down
2 changes: 1 addition & 1 deletion firedrake/preconditioners/fdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from firedrake_citations import Citations
from ufl.algorithms.ad import expand_derivatives
from ufl.algorithms.expand_indices import expand_indices
from tsfc.finatinterface import create_element
from finat.element_factory import create_element
from pyop2.compilation import load
from pyop2.mpi import COMM_SELF
from pyop2.sparsity import get_preallocation
Expand Down
2 changes: 1 addition & 1 deletion firedrake/preconditioners/pmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from firedrake.solving_utils import _SNESContext
from firedrake.tsfc_interface import extract_numbered_coefficients
from firedrake.utils import ScalarType_c, IntType_c, cached_property
from tsfc.finatinterface import create_element
from finat.element_factory import create_element
from tsfc import compile_expression_dual_evaluation
from pyop2 import op2
from pyop2.caching import serial_cache
Expand Down
2 changes: 1 addition & 1 deletion firedrake/slate/slac/kernel_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from firedrake.slate.slac.tsfc_driver import compile_terminal_form

from tsfc import kernel_args
from tsfc.finatinterface import create_element
from finat.element_factory import create_element
from tsfc.loopy import create_domains, assign_dtypes

from pytools import UniqueNameGenerator
Expand Down
4 changes: 2 additions & 2 deletions tests/firedrake/regression/test_interpolate_p3intmoments.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from FIAT.quadrature import make_quadrature
from FIAT.polynomial_set import ONPolynomialSet
from finat.fiat_elements import ScalarFiatElement
from tsfc.finatinterface import convert, as_fiat_cell
from finat.element_factory import convert, as_fiat_cell
import finat.ufl

ufcint = UFCInterval()
Expand Down Expand Up @@ -89,7 +89,7 @@ def __init__(self, cell, degree):
super().__init__(P3IntMoments(cell, degree))


# Replace the old tsfc.finatinterface.convert dispatch with a new one that
# Replace the old finat.element_factory.convert dispatch with a new one that
# gives the the new FInAT element for P3 on an interval with variant
# "interior-moment"
old_convert = convert.dispatch(finat.ufl.FiniteElement)
Expand Down
150 changes: 0 additions & 150 deletions tests/tsfc/test_create_fiat_element.py

This file was deleted.

Loading
Loading