Skip to content

DO NOT SQUASH Add PyOP2 to Firedrake repository #6556

DO NOT SQUASH Add PyOP2 to Firedrake repository

DO NOT SQUASH Add PyOP2 to Firedrake repository #6556

GitHub Actions / Firedrake complex failed Nov 13, 2024 in 0s

7884 tests run, 381 passed, 1226 skipped, 6277 failed.

Annotations

Check failure on line 3 in tests/firedrake/supermesh/test_assemble_mixed_mass_matrix.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_assemble_mixed_mass_matrix.tests.firedrake.supermesh.test_assemble_mixed_mass_matrix

collection failure
Raw output
ImportError while importing test module '/__w/firedrake/firedrake/tests/firedrake/supermesh/test_assemble_mixed_mass_matrix.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/firedrake/supermesh/test_assemble_mixed_mass_matrix.py:3: in <module>
    from firedrake.supermeshing import *
firedrake/supermeshing.py:5: in <module>
    from firedrake.cython.supermeshimpl import assemble_mixed_mass_matrix as ammm, intersection_finder
E   ImportError: supermesh.cpython-312-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory

Check failure on line 3 in tests/firedrake/supermesh/test_galerkin_projection.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_galerkin_projection.tests.firedrake.supermesh.test_galerkin_projection

collection failure
Raw output
ImportError while importing test module '/__w/firedrake/firedrake/tests/firedrake/supermesh/test_galerkin_projection.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/firedrake/supermesh/test_galerkin_projection.py:3: in <module>
    from firedrake.supermeshing import *
firedrake/supermeshing.py:5: in <module>
    from firedrake.cython.supermeshimpl import assemble_mixed_mass_matrix as ammm, intersection_finder
E   ImportError: supermesh.cpython-312-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory

Check failure on line 2 in tests/firedrake/supermesh/test_intersection_finder_nested.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_intersection_finder_nested.tests.firedrake.supermesh.test_intersection_finder_nested

collection failure
Raw output
ImportError while importing test module '/__w/firedrake/firedrake/tests/firedrake/supermesh/test_intersection_finder_nested.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/firedrake/supermesh/test_intersection_finder_nested.py:2: in <module>
    from firedrake.supermeshing import *
firedrake/supermeshing.py:5: in <module>
    from firedrake.cython.supermeshimpl import assemble_mixed_mass_matrix as ammm, intersection_finder
E   ImportError: supermesh.cpython-312-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory

Check failure on line 1 in tests/firedrake/unit/test_fml/test_replacement.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_replacement.tests.firedrake.unit.test_fml.test_replacement

tests.firedrake.unit.test_fml.test_replacement

Check failure on line 13 in tests/firedrake/extrusion/test_variable_layers_numbering.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_variable_layers_numbering.test_disconnected

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
def test_disconnected():
        mesh = UnitIntervalMesh(2)
    
        with pytest.raises(NotImplementedError):
>           ExtrudedMesh(mesh, [[0, 1], [2, 1]],
                         layer_height=1)

tests/firedrake/extrusion/test_variable_layers_numbering.py:13: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/mesh.py:3176: in ExtrudedMesh
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 13 in tests/firedrake/regression/test_mesh_generation.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_mesh_generation.test_unit_tetrahedron

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
def test_unit_tetrahedron():
>       assert abs(integrate_one(UnitTetrahedronMesh()) - 0.5 / 3) < 1e-3

tests/firedrake/regression/test_mesh_generation.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/firedrake/regression/test_mesh_generation.py:13: in integrate_one
    V = FunctionSpace(m, 'CG', 1)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 41 in tests/firedrake/regression/test_tensor_algebra.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_tensor_algebra.test_tensor_algebra_simplification[(-inner(dot(grad(u), mu), outer(conj(v), n)) - inner(outer(conj(u), n), dot(grad(v), mu))) * ds-RT1(tet)]

failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
request = <SubRequest 'form_expect' for <Function test_tensor_algebra_simplification[(-inner(dot(grad(u), mu), outer(conj(v), n)) - inner(outer(conj(u), n), dot(grad(v), mu))) * ds-RT1(tet)]>>
mesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 1)

    @pytest.fixture(scope="module",
                    params=[("mu_s*inner(grad(u), outer(conj(v), n)) * ds",
                             "mu_s*inner(grad(u), outer(conj(v), n)) * ds"),
                            ("mu_s*(-inner(grad(u), outer(conj(v), n), ) - inner(outer(conj(u), n), grad(v))) * ds",
                             "-2*mu_s*(inner(grad(u), outer(conj(v), n))) * ds"),
                            ("-mu_s*(inner(grad(u), outer(conj(v), n)) + inner(outer(conj(u), n), grad(v))) * ds",
                             "-2*mu_s*(inner(grad(u), outer(conj(v), n))) * ds"),
                            ("inner(dot(grad(u), mu), outer(conj(v), n)) * ds",
                             "mu_s*inner(grad(u), outer(conj(v), n)) * ds"),
                            ("(inner(dot(grad(u), mu), outer(conj(v), n)) + inner(outer(conj(u), n), dot(grad(v), mu))) * ds",
                             "2*mu_s*inner(grad(u), outer(conj(v), n)) * ds"),
                            ("-(inner(dot(grad(u), mu), outer(conj(v), n)) + inner(outer(conj(u), n), dot(grad(v), mu))) * ds",
                             "-2*mu_s*inner(grad(u), outer(conj(v), n)) * ds"),
                            ("(-inner(dot(grad(u), mu), outer(conj(v), n)) - inner(outer(conj(u), n), dot(grad(v), mu))) * ds",
                             "-2*mu_s*inner(grad(u), outer(conj(v), n)) * ds")],
                    ids=lambda x: x[0])
    def form_expect(request, mesh):
        dim = mesh.ufl_cell().geometric_dimension()
        if mesh.ufl_cell().cellname() == "quadrilateral":
            V = FunctionSpace(mesh, "RTCF", 1)
        else:
>           V = FunctionSpace(mesh, "RT", 1)

tests/firedrake/regression/test_tensor_algebra.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 70 in tests/firedrake/regression/test_zero_forms.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_zero_forms.test_math_functions[True-2 * tanh(f)--20-function-vector]

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 1)
expr = '2 * tanh(f)', value = -20, typ = 'function', fs_type = 'vector'

    @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'],
                             itertools.product(['f',
                                                '2*f',
                                                'tanh(f)',
                                                '2 * tanh(f)',
                                                'f + tanh(f)',
                                                'cos(f) + sin(f)',
                                                'cos(f)*cos(f) + sin(f)*sin(f)',
                                                'tanh(f) + cos(f) + sin(f)',
                                                '1.0/tanh(f) + 1.0/f',
                                                'sqrt(f*f)',
                                                '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'],
                                               [1, 10, 20, -1, -10, -20],
                                               ['function', 'constant'],
                                               ['scalar', 'vector', 'tensor']))
    def test_math_functions(mesh, expr, value, typ, fs_type):
        if typ == 'function':
            family, degree = 'CG', 1
        elif typ == 'constant':
            family, degree = 'Real', 0
    
        if fs_type == "vector":
>           V = VectorFunctionSpace(mesh, family, degree)

tests/firedrake/regression/test_zero_forms.py:70: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:191: in VectorFunctionSpace
    return FunctionSpace(mesh, element, name=name)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 34 in tests/firedrake/regression/test_scaled_mass.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_scaled_mass.test_math_functions[vector-Function-f=(20)-expr=(f + tanh(f))]

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1)
expr = 'f + tanh(f)', value = 20, typ = 'Function', fs_type = 'vector'

    @pytest.mark.parametrize('expr',
                             ['f',
                              '2*f',
                              'tanh(f)',
                              '2 * tanh(f)',
                              'f + tanh(f)',
                              'cos(f) + sin(f)',
                              'cos(f)*cos(f) + sin(f)*sin(f)',
                              'tanh(f) + cos(f) + sin(f)',
                              '1.0/tanh(f) + 1.0/f',
                              'sqrt(f*f)',
                              '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'],
                             ids=lambda x: 'expr=(%s)' % x)
    @pytest.mark.parametrize('value',
                             [1, 10, 20, -1, -10, -20],
                             ids=lambda x: 'f=(%d)' % x)
    @pytest.mark.parametrize('typ',
                             ['Function', 'Constant'])
    @pytest.mark.parametrize('fs_type',
                             ['scalar', 'vector', 'tensor'])
    def test_math_functions(mesh, expr, value, typ, fs_type):
        if typ == 'Function':
            if fs_type == 'vector':
>               V = VectorFunctionSpace(mesh, 'CG', 1)

tests/firedrake/regression/test_scaled_mass.py:34: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:191: in VectorFunctionSpace
    return FunctionSpace(mesh, element, name=name)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 22 in tests/firedrake/regression/test_facets.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_facets.test_bilinear_interior_facet_integral[restrictions13]

failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
@pytest.fixture(scope='module')
    def dg_trial_test():
        # Interior facet tests hard code order in which cells were
        # numbered, so don't reorder this mesh.
        m = UnitSquareMesh(1, 1, reorder=False)
>       V = FunctionSpace(m, "DG", 0)

tests/firedrake/regression/test_facets.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 218 in tests/firedrake/vertexonly/test_interpolation_from_parent.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_interpolation_from_parent.test_vector_function_interpolation[cube-mesh-0-coords-VectorFunctionSpace(CG2)]

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
parentmesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 1)
vertexcoords = array([], shape=(0, 3), dtype=float64)
vfs = ('CG', 2, <cyfunction VectorFunctionSpace at 0x7f005be66740>)

    def test_vector_function_interpolation(parentmesh, vertexcoords, vfs):
        if parentmesh.name == "immersedsphere":
            vertexcoords = immersed_sphere_vertexcoords(parentmesh, vertexcoords)
        vfs_fam, vfs_deg, vfs_typ = vfs
>       vm = VertexOnlyMesh(parentmesh, vertexcoords, missing_points_behaviour=None)

tests/firedrake/vertexonly/test_interpolation_from_parent.py:218: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/mesh.py:3345: in VertexOnlyMesh
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 19 in tests/firedrake/regression/test_adv_diff_nonsplit.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_adv_diff_nonsplit.test_adv_diff_serial

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
def test_adv_diff_serial():
>       run_adv_diff()

tests/firedrake/regression/test_adv_diff_nonsplit.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/firedrake/regression/test_adv_diff_nonsplit.py:59: in run_adv_diff
    diff = np.array([adv_diff(i) for i in range(5, 8)])
tests/firedrake/regression/test_adv_diff_nonsplit.py:19: in adv_diff
    V = FunctionSpace(mesh, "CG", 1)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 41 in tests/firedrake/vertexonly/test_interpolation_from_parent.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_interpolation_from_parent.test_vector_function_interpolation_parallel[immersedsphere-mesh-1-coords-FunctionSpace(RTCF2)]

failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
request = <SubRequest 'parentmesh' for <Function test_vector_function_interpolation_parallel[immersedsphere-mesh-1-coords-FunctionSpace(RTCF2)]>>

    @pytest.fixture(params=["interval",
                            "square",
                            "squarequads",
                            "extruded",
                            pytest.param("extrudedvariablelayers", marks=pytest.mark.skip(reason="Extruded meshes with variable layers not supported and will hang when created in parallel")),
                            "cube",
                            "tetrahedron",
                            "immersedsphere",
                            "immersedsphereextruded",
                            "periodicrectangle",
                            "shiftedmesh"],
                    ids=lambda x: f"{x}-mesh")
    def parentmesh(request):
        if request.param == "interval":
            return UnitIntervalMesh(1)
        elif request.param == "square":
            return UnitSquareMesh(1, 1)
        elif request.param == "squarequads":
            return UnitSquareMesh(2, 2, quadrilateral=True)
        elif request.param == "extruded":
            return ExtrudedMesh(UnitSquareMesh(2, 2), 3)
        elif request.param == "extrudedvariablelayers":
            return ExtrudedMesh(UnitIntervalMesh(3), np.array([[0, 3], [0, 3], [0, 2]]), np.array([3, 3, 2]))
        elif request.param == "cube":
            return UnitCubeMesh(1, 1, 1)
        elif request.param == "tetrahedron":
            return UnitTetrahedronMesh()
        elif request.param == "immersedsphere":
            m = UnitIcosahedralSphereMesh(refinement_level=2, name='immersedsphere')
>           m.init_cell_orientations(SpatialCoordinate(m))

tests/firedrake/vertexonly/test_interpolation_from_parent.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/mesh.py:2780: in init_cell_orientations
    fs = functionspace.FunctionSpace(self, 'DG', 0)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 41 in tests/firedrake/regression/test_tensor_algebra.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_tensor_algebra.test_tensor_algebra_simplification[(-inner(dot(grad(u), mu), outer(conj(v), n)) - inner(outer(conj(u), n), dot(grad(v), mu))) * ds-RT1(triangle)]

failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
request = <SubRequest 'form_expect' for <Function test_tensor_algebra_simplification[(-inner(dot(grad(u), mu), outer(conj(v), n)) - inner(outer(conj(u), n), dot(grad(v), mu))) * ds-RT1(triangle)]>>
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 2)

    @pytest.fixture(scope="module",
                    params=[("mu_s*inner(grad(u), outer(conj(v), n)) * ds",
                             "mu_s*inner(grad(u), outer(conj(v), n)) * ds"),
                            ("mu_s*(-inner(grad(u), outer(conj(v), n), ) - inner(outer(conj(u), n), grad(v))) * ds",
                             "-2*mu_s*(inner(grad(u), outer(conj(v), n))) * ds"),
                            ("-mu_s*(inner(grad(u), outer(conj(v), n)) + inner(outer(conj(u), n), grad(v))) * ds",
                             "-2*mu_s*(inner(grad(u), outer(conj(v), n))) * ds"),
                            ("inner(dot(grad(u), mu), outer(conj(v), n)) * ds",
                             "mu_s*inner(grad(u), outer(conj(v), n)) * ds"),
                            ("(inner(dot(grad(u), mu), outer(conj(v), n)) + inner(outer(conj(u), n), dot(grad(v), mu))) * ds",
                             "2*mu_s*inner(grad(u), outer(conj(v), n)) * ds"),
                            ("-(inner(dot(grad(u), mu), outer(conj(v), n)) + inner(outer(conj(u), n), dot(grad(v), mu))) * ds",
                             "-2*mu_s*inner(grad(u), outer(conj(v), n)) * ds"),
                            ("(-inner(dot(grad(u), mu), outer(conj(v), n)) - inner(outer(conj(u), n), dot(grad(v), mu))) * ds",
                             "-2*mu_s*inner(grad(u), outer(conj(v), n)) * ds")],
                    ids=lambda x: x[0])
    def form_expect(request, mesh):
        dim = mesh.ufl_cell().geometric_dimension()
        if mesh.ufl_cell().cellname() == "quadrilateral":
            V = FunctionSpace(mesh, "RTCF", 1)
        else:
>           V = FunctionSpace(mesh, "RT", 1)

tests/firedrake/regression/test_tensor_algebra.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 10 in tests/firedrake/equation_bcs/test_bcs_reconstruct.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_bcs_reconstruct.test_bc_on_sub_sub_domain

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
def test_bc_on_sub_sub_domain():
    
        # Solve a vector poisson problem
    
        mesh = UnitSquareMesh(50, 50)
    
>       V = VectorFunctionSpace(mesh, "CG", 1)

tests/firedrake/equation_bcs/test_bcs_reconstruct.py:10: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:191: in VectorFunctionSpace
    return FunctionSpace(mesh, element, name=name)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 22 in tests/firedrake/regression/test_facets.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_facets.test_bilinear_interior_facet_integral[restrictions14]

failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
@pytest.fixture(scope='module')
    def dg_trial_test():
        # Interior facet tests hard code order in which cells were
        # numbered, so don't reorder this mesh.
        m = UnitSquareMesh(1, 1, reorder=False)
>       V = FunctionSpace(m, "DG", 0)

tests/firedrake/regression/test_facets.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 218 in tests/firedrake/vertexonly/test_interpolation_from_parent.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_interpolation_from_parent.test_vector_function_interpolation[cube-mesh-0-coords-FunctionSpace(N1curl2)]

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
parentmesh = Mesh(VectorElement(FiniteElement('Lagrange', tetrahedron, 1), dim=3), 2)
vertexcoords = array([], shape=(0, 3), dtype=float64)
vfs = ('N1curl', 2, <cyfunction FunctionSpace at 0x7f005be665a0>)

    def test_vector_function_interpolation(parentmesh, vertexcoords, vfs):
        if parentmesh.name == "immersedsphere":
            vertexcoords = immersed_sphere_vertexcoords(parentmesh, vertexcoords)
        vfs_fam, vfs_deg, vfs_typ = vfs
>       vm = VertexOnlyMesh(parentmesh, vertexcoords, missing_points_behaviour=None)

tests/firedrake/vertexonly/test_interpolation_from_parent.py:218: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/mesh.py:3345: in VertexOnlyMesh
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 64 in tests/firedrake/regression/test_scaled_mass.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_scaled_mass.test_math_functions[vector-Function-f=(20)-expr=(cos(f) + sin(f))]

AttributeError: 'MeshTopology' object has no attribute 'coordinates'
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1)
expr = 'cos(f) + sin(f)', value = 20, typ = 'Function', fs_type = 'vector'

    @pytest.mark.parametrize('expr',
                             ['f',
                              '2*f',
                              'tanh(f)',
                              '2 * tanh(f)',
                              'f + tanh(f)',
                              'cos(f) + sin(f)',
                              'cos(f)*cos(f) + sin(f)*sin(f)',
                              'tanh(f) + cos(f) + sin(f)',
                              '1.0/tanh(f) + 1.0/f',
                              'sqrt(f*f)',
                              '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'],
                             ids=lambda x: 'expr=(%s)' % x)
    @pytest.mark.parametrize('value',
                             [1, 10, 20, -1, -10, -20],
                             ids=lambda x: 'f=(%d)' % x)
    @pytest.mark.parametrize('typ',
                             ['Function', 'Constant'])
    @pytest.mark.parametrize('fs_type',
                             ['scalar', 'vector', 'tensor'])
    def test_math_functions(mesh, expr, value, typ, fs_type):
        if typ == 'Function':
            if fs_type == 'vector':
                V = VectorFunctionSpace(mesh, 'CG', 1)
            elif fs_type == 'tensor':
                V = TensorFunctionSpace(mesh, 'CG', 1)
            else:
                V = FunctionSpace(mesh, 'CG', 1)
            f = Function(V)
            f.assign(value)
            if fs_type == 'vector':
                f = dot(f, f)
            elif fs_type == 'tensor':
                f = inner(f, f)
        elif typ == 'Constant':
            if fs_type == 'vector':
                f = Constant([value, value])
                f = dot(f, f)
            elif fs_type == 'tensor':
                f = Constant([[value, value], [value, value]])
                f = inner(f, f)
            else:
                f = Constant(value)
    
        H = FunctionSpace(mesh, 'CG', 1)
        u = TrialFunction(H)
        v = TestFunction(H)
    
        C = eval(expr)
    
        a = (C)*inner(u, v) * dx
        L = (C)*conj(v) * dx
        actual = Function(H)
>       solve(a == L, actual)

tests/firedrake/regression/test_scaled_mass.py:64: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/adjoint_utils/solving.py:57: in wrapper
    output = solve(*args, **kwargs)
firedrake/solving.py:141: in solve
    _solve_varproblem(*args, **kwargs)
firedrake/solving.py:168: in _solve_varproblem
    problem = vs.LinearVariationalProblem(eq.lhs, eq.rhs, u, bcs, Jp,
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/variational_solver.py:373: in __init__
    super(LinearVariationalProblem, self).__init__(F, u, bcs, J, aP,
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
../firedrake_venv/src/pyadjoint/pyadjoint/tape.py:110: in wrapper
    return function(*args, **kwargs)
firedrake/adjoint_utils/variational_solver.py:23: in wrapper
    dFdu = derivative(self.F,
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/ufl_expr.py:243: in derivative
    is_dX = u_is_x or u is mesh.coordinates
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1)
name = 'coordinates'

    def __getattr__(self, name):
>       val = getattr(self._topology, name)
E       AttributeError: 'MeshTopology' object has no attribute 'coordinates'

firedrake/mesh.py:2796: AttributeError

Check failure on line 33 in tests/firedrake/submesh/test_submesh_interpolate.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_submesh_interpolate.test_submesh_interpolate_cell_cell_hex_1_processes[None-LT-LT-LT-fe_fesub0-2]

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
fe_fesub = [('DQ', 0), ('DQ', 0)], nelem = 2
condx = <class 'ufl.conditional.LT'>, condy = <class 'ufl.conditional.LT'>
condz = <class 'ufl.conditional.LT'>, distribution_parameters = None

    @pytest.mark.parametrize('nelem', [2, 4, 8, None])
    @pytest.mark.parametrize('fe_fesub', [[("DQ", 0), ("DQ", 0)],
                                          [("Q", 4), ("DQ", 5)]])
    @pytest.mark.parametrize('condx', [LT])
    @pytest.mark.parametrize('condy', [LT])
    @pytest.mark.parametrize('condz', [LT])
    @pytest.mark.parametrize('distribution_parameters', [None, {"overlap_type": (DistributedMeshOverlapType.NONE, 0)}])
    def test_submesh_interpolate_cell_cell_hex_1_processes(fe_fesub, nelem, condx, condy, condz, distribution_parameters):
        if nelem is None:
            mesh = Mesh(join(cwd, "..", "meshes", "cube_hex.msh"), distribution_parameters=distribution_parameters)
        else:
            mesh = UnitCubeMesh(nelem, nelem, nelem, hexahedral=True, distribution_parameters=distribution_parameters)
        x, y, z = SpatialCoordinate(mesh)
        cond = conditional(condx(x, .5), 1,
               conditional(condy(y, .5), 1,       # noqa: E128
               conditional(condz(z, .5), 1, 0)))  # noqa: E128
>       _test_submesh_interpolate_cell_cell(mesh, cond, fe_fesub)

tests/firedrake/submesh/test_submesh_interpolate.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/firedrake/submesh/test_submesh_interpolate.py:33: in _test_submesh_interpolate_cell_cell
    DG0 = FunctionSpace(mesh, "DG", 0)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 47 in tests/firedrake/extrusion/test_variable_layers_numbering.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_variable_layers_numbering.test_numbering_one_d_P1

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
def test_numbering_one_d_P1():
        #      7----10
        #      |    |
        #      |    |
        #      6----9
        #      |    |
        #      |    |
        # 2----5----8
        # |    |
        # |    |
        # 1----4
        # |    |
        # |    |
        # 0----3
        mesh = UnitIntervalMesh(2)
    
>       extmesh = ExtrudedMesh(mesh, layers=[[0, 2], [2, 2]],
                               layer_height=1)

tests/firedrake/extrusion/test_variable_layers_numbering.py:47: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/mesh.py:3176: in ExtrudedMesh
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 38 in tests/firedrake/regression/test_trace_galerkin_projection.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_trace_galerkin_projection.test_trace_galerkin_projection[False-1]

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
degree = 1, quad = False

    @pytest.mark.parametrize('degree', range(1, 4))
    @pytest.mark.parametrize('quad', [False, True])
    def test_trace_galerkin_projection(degree, quad):
        """Tests the accuracy of the trace solution for the Galerkin
        projection problem."""
>       tr_err = trace_galerkin_projection(degree=degree,
                                           quad=quad,
                                           conv_test_flag=0)

tests/firedrake/regression/test_trace_galerkin_projection.py:76: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/firedrake/regression/test_trace_galerkin_projection.py:38: in trace_galerkin_projection
    T = FunctionSpace(mesh, "HDiv Trace", degree)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 22 in tests/firedrake/regression/test_facets.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_facets.test_bilinear_interior_facet_integral[restrictions15]

failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
@pytest.fixture(scope='module')
    def dg_trial_test():
        # Interior facet tests hard code order in which cells were
        # numbered, so don't reorder this mesh.
        m = UnitSquareMesh(1, 1, reorder=False)
>       V = FunctionSpace(m, "DG", 0)

tests/firedrake/regression/test_facets.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 41 in tests/firedrake/vertexonly/test_interpolation_from_parent.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_interpolation_from_parent.test_vector_function_interpolation_parallel[immersedsphere-mesh-100-coords-VectorFunctionSpace(CG2)]

failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
request = <SubRequest 'parentmesh' for <Function test_vector_function_interpolation_parallel[immersedsphere-mesh-100-coords-VectorFunctionSpace(CG2)]>>

    @pytest.fixture(params=["interval",
                            "square",
                            "squarequads",
                            "extruded",
                            pytest.param("extrudedvariablelayers", marks=pytest.mark.skip(reason="Extruded meshes with variable layers not supported and will hang when created in parallel")),
                            "cube",
                            "tetrahedron",
                            "immersedsphere",
                            "immersedsphereextruded",
                            "periodicrectangle",
                            "shiftedmesh"],
                    ids=lambda x: f"{x}-mesh")
    def parentmesh(request):
        if request.param == "interval":
            return UnitIntervalMesh(1)
        elif request.param == "square":
            return UnitSquareMesh(1, 1)
        elif request.param == "squarequads":
            return UnitSquareMesh(2, 2, quadrilateral=True)
        elif request.param == "extruded":
            return ExtrudedMesh(UnitSquareMesh(2, 2), 3)
        elif request.param == "extrudedvariablelayers":
            return ExtrudedMesh(UnitIntervalMesh(3), np.array([[0, 3], [0, 3], [0, 2]]), np.array([3, 3, 2]))
        elif request.param == "cube":
            return UnitCubeMesh(1, 1, 1)
        elif request.param == "tetrahedron":
            return UnitTetrahedronMesh()
        elif request.param == "immersedsphere":
            m = UnitIcosahedralSphereMesh(refinement_level=2, name='immersedsphere')
>           m.init_cell_orientations(SpatialCoordinate(m))

tests/firedrake/vertexonly/test_interpolation_from_parent.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/mesh.py:2780: in init_cell_orientations
    fs = functionspace.FunctionSpace(self, 'DG', 0)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 44 in tests/firedrake/equation_bcs/test_equation_bcs.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_equation_bcs.test_EquationBC_poisson_matrix[False-linear]

ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
eq_type = 'linear', with_bbc = False

    @pytest.mark.parametrize("eq_type", ["linear", "nonlinear"])
    @pytest.mark.parametrize("with_bbc", [False, True])
    def test_EquationBC_poisson_matrix(eq_type, with_bbc):
        mat_type = "aij"
        porder = 3
        # Test standard poisson with EquationBCs
        # aij
    
        solver_parameters = {'mat_type': mat_type,
                             'ksp_type': 'preonly',
                             'pc_type': 'lu'}
        err = []
        mesh_sizes = [8, 16]
        if with_bbc:
            # test bcs for bcs
            if eq_type == "linear":
                for mesh_num in mesh_sizes:
                    err.append(linear_poisson_bbc(solver_parameters, mesh_num, porder))
            elif eq_type == "nonlinear":
                for mesh_num in mesh_sizes:
                    err.append(nonlinear_poisson_bbc(solver_parameters, mesh_num, porder))
        else:
            # test bcs for bcs
            if eq_type == "linear":
                for mesh_num in mesh_sizes:
>                   err.append(linear_poisson(solver_parameters, mesh_num, porder))

tests/firedrake/equation_bcs/test_equation_bcs.py:226: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/firedrake/equation_bcs/test_equation_bcs.py:44: in linear_poisson
    V = FunctionSpace(mesh, "CG", porder)
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/functionspace.py:105: in FunctionSpace
    return impl.WithGeometry.make_function_space(mesh, element, name=name)
firedrake/functionspaceimpl.py:360: in make_function_space
    mesh.init()
firedrake/mesh.py:2282: in init
    self._callback(self)
firedrake/mesh.py:2305: in callback
    coordinates_data = dmcommon.reordered_coords(topology.topology_dm, coordinates_fs.dm.getDefaultSection(),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   dm_coords = dm.getCoordinatesLocal().array.reshape(shape)
E   ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'

firedrake/cython/dmcommon.pyx:1923: ValueError

Check failure on line 82 in tests/firedrake/regression/test_zero_forms.py

See this annotation in the file changed.

@github-actions github-actions / Firedrake complex

test_zero_forms.test_math_functions[True-2 * tanh(f)--20-function-tensor]

AttributeError: 'MeshTopology' object has no attribute 'extruded'
Raw output
mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 1)
expr = '2 * tanh(f)', value = -20, typ = 'function', fs_type = 'tensor'

    @pytest.mark.parametrize(['expr', 'value', 'typ', 'fs_type'],
                             itertools.product(['f',
                                                '2*f',
                                                'tanh(f)',
                                                '2 * tanh(f)',
                                                'f + tanh(f)',
                                                'cos(f) + sin(f)',
                                                'cos(f)*cos(f) + sin(f)*sin(f)',
                                                'tanh(f) + cos(f) + sin(f)',
                                                '1.0/tanh(f) + 1.0/f',
                                                'sqrt(f*f)',
                                                '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)'],
                                               [1, 10, 20, -1, -10, -20],
                                               ['function', 'constant'],
                                               ['scalar', 'vector', 'tensor']))
    def test_math_functions(mesh, expr, value, typ, fs_type):
        if typ == 'function':
            family, degree = 'CG', 1
        elif typ == 'constant':
            family, degree = 'Real', 0
    
        if fs_type == "vector":
            V = VectorFunctionSpace(mesh, family, degree)
        elif fs_type == "tensor":
            V = TensorFunctionSpace(mesh, family, degree)
        else:
            V = FunctionSpace(mesh, family, degree)
        f = Function(V)
        f.assign(value)
        if fs_type == "vector":
            f = dot(f, f)
        elif fs_type == "tensor":
            f = inner(f, f)
    
>       actual = assemble(eval(expr)*dx)

tests/firedrake/regression/test_zero_forms.py:82: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
firedrake/adjoint_utils/assembly.py:30: in wrapper
    output = assemble(form, *args, **kwargs)
firedrake/assemble.py:134: in assemble
    return get_assembler(expr, *args, **kwargs).assemble(tensor=tensor)
firedrake/assemble.py:982: in assemble
    self.execute_parloops(tensor)
firedrake/assemble.py:1003: in execute_parloops
    for parloop in self.parloops(tensor):
firedrake/assemble.py:1015: in parloops
    for local_kernel, subdomain_id in self.local_kernels:
/usr/lib/python3.12/functools.py:995: in __get__
    val = self.func(instance)
firedrake/assemble.py:1053: in local_kernels
    kernels = tsfc_interface.compile_form(
petsc4py/PETSc/Log.pyx:188: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
petsc4py/PETSc/Log.pyx:189: in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func
    ???
pyop2/caching.py:522: in wrapper
    k = hashkey(*args, **kwargs)
firedrake/tsfc_interface.py:140: in _compile_form_hashkey
    args[0].signature(),
../firedrake_venv/src/ufl/ufl/form.py:432: in signature
    self._compute_signature()
../firedrake_venv/src/ufl/ufl/form.py:682: in _compute_signature
    self._signature = compute_form_signature(self, self._compute_renumbering())
../firedrake_venv/src/ufl/ufl/algorithms/signature.py:128: in compute_form_signature
    terminal_hashdata = compute_terminal_hashdata(integrands, renumbering)
../firedrake_venv/src/ufl/ufl/algorithms/signature.py:56: in compute_terminal_hashdata
    data = expr._ufl_signature_data_(renumbering)
../firedrake_venv/src/ufl/ufl/coefficient.py:81: in _ufl_signature_data_
    fsdata = self._ufl_function_space._ufl_signature_data_(renumbering)
firedrake/functionspaceimpl.py:131: in _ufl_signature_data_
    super()._ufl_signature_data_(*args, **kwargs))
../firedrake_venv/src/ufl/ufl/functionspace.py:133: in _ufl_signature_data_
    return BaseFunctionSpace._ufl_signature_data_(self, renumbering, "FunctionSpace")
../firedrake_venv/src/ufl/ufl/functionspace.py:105: in _ufl_signature_data_
    ddata = domain._ufl_signature_data_(renumbering)
firedrake/mesh.py:2273: in _ufl_signature_data_
    return (type(self), self.extruded, self.variable_layers,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 1)
name = 'extruded'

    def __getattr__(self, name):
>       val = getattr(self._topology, name)
E       AttributeError: 'MeshTopology' object has no attribute 'extruded'

firedrake/mesh.py:2796: AttributeError