DO NOT SQUASH Add PyOP2 to Firedrake repository #23
7853 tests run, 373 passed, 1192 skipped, 6288 failed.
Annotations
Check failure on line 1 in tests/firedrake/demos/test_demos_run.py
github-actions / Firedrake complex
test_demos_run.tests.firedrake.demos.test_demos_run
tests.firedrake.demos.test_demos_run
Check failure on line 1 in tests/firedrake/demos/test_notebooks_run.py
github-actions / Firedrake complex
test_notebooks_run.tests.firedrake.demos.test_notebooks_run
tests.firedrake.demos.test_notebooks_run
Check failure on line 3 in tests/firedrake/supermesh/test_assemble_mixed_mass_matrix.py
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
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
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
github-actions / Firedrake complex
test_replacement.tests.firedrake.unit.test_fml.test_replacement
tests.firedrake.unit.test_fml.test_replacement
Check failure on line 8 in tests/firedrake/regression/test_ufl.py
github-actions / Firedrake complex
test_ufl.test_cellsize_1d[1]
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
n = 1
@pytest.mark.parametrize('n', [1, 3, 16])
def test_cellsize_1d(n):
> assert abs(assemble(CellSize(UnitIntervalMesh(n))*dx) - 1.0/n) < 1e-14
tests/firedrake/regression/test_ufl.py:8:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:355: in CellSize
mesh.init()
firedrake/mesh.py:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 18 in tests/firedrake/regression/test_assemble.py
github-actions / Firedrake complex
test_assemble.test_one_form[cg1dg0[1]]
failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
request = <SubRequest 'fs' for <Function test_one_form[cg1dg0[1]]>>
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1)
@pytest.fixture(scope='module', params=['cg1', 'vcg1', 'tcg1',
'cg1cg1', 'cg1cg1[0]', 'cg1cg1[1]',
'cg1vcg1[0]', 'cg1vcg1[1]',
'cg1dg0', 'cg1dg0[0]', 'cg1dg0[1]',
'cg2dg1', 'cg2dg1[0]', 'cg2dg1[1]'])
def fs(request, mesh):
> cg1 = FunctionSpace(mesh, "CG", 1)
tests/firedrake/regression/test_assemble.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 60 in tests/firedrake/macro/test_macro_interp_project.py
github-actions / Firedrake complex
test_macro_interp_project.test_projection_scalar_monomial[square-proj_bc-alfeld-d]
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
op = <function proj_bc at 0x7f42ae090a40>
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1)
degree = 2, variant = 'alfeld'
@pytest.mark.parametrize(('variant', 'degree'),
[(None, 2),
("integral", 'd'),
('alfeld', 1),
('alfeld', 'd'),
('iso(2)', 2)])
@pytest.mark.parametrize('op', (interp, proj, proj_bc, h1_proj, h1_proj_bc))
def test_projection_scalar_monomial(op, mesh, degree, variant):
if degree == 'd':
degree = mesh.geometric_dimension()
> V = FunctionSpace(mesh, "CG", degree=degree, variant=variant)
tests/firedrake/macro/test_macro_interp_project.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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
github-actions / Firedrake complex
test_scaled_mass.test_math_functions[vector-Function-f=(-1)-expr=(sqrt(f*f))]
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1)
expr = 'sqrt(f*f)', value = -1, 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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 43 in tests/firedrake/output/test_hdf5file_checkpoint.py
github-actions / Firedrake complex
test_hdf5file_checkpoint.test_write_read[quad-CG-1]
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
mesh = Mesh(VectorElement(FiniteElement('Q', quadrilateral, 1), dim=2), 1)
fs = 'CG', degree = 1, dumpfile = '/tmp/tmpkp1i3p83/dump'
def test_write_read(mesh, fs, degree, dumpfile):
> run_write_read(mesh, fs, degree, dumpfile)
tests/firedrake/output/test_hdf5file_checkpoint.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/firedrake/output/test_hdf5file_checkpoint.py:43: in run_write_read
V = FunctionSpace(mesh, fs, 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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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
github-actions / Firedrake complex
test_zero_forms.test_math_functions[True-f + tanh(f)-10-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 = 'f + tanh(f)', value = 10, 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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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
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 0x7f32181d0860>)
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:3305: in VertexOnlyMesh
mesh.init()
firedrake/mesh.py:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 7 in tests/firedrake/regression/test_fieldsplit_breadcrumbs.py
github-actions / Firedrake complex
test_fieldsplit_breadcrumbs
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
def test_fieldsplit_breadcrumbs():
mesh = UnitSquareMesh(10, 10)
> V_u = VectorFunctionSpace(mesh, 'DG', 1)
tests/firedrake/regression/test_fieldsplit_breadcrumbs.py:7:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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
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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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
github-actions / Firedrake complex
test_interpolation_from_parent.test_vector_function_interpolation_parallel[immersedsphere-mesh-100-coords-FunctionSpace(N2curl2)]
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-FunctionSpace(N2curl2)]>>
@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:2740: 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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 8 in tests/firedrake/regression/test_ufl.py
github-actions / Firedrake complex
test_ufl.test_cellsize_1d[3]
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
n = 3
@pytest.mark.parametrize('n', [1, 3, 16])
def test_cellsize_1d(n):
> assert abs(assemble(CellSize(UnitIntervalMesh(n))*dx) - 1.0/n) < 1e-14
tests/firedrake/regression/test_ufl.py:8:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:355: in CellSize
mesh.init()
firedrake/mesh.py:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 338 in tests/firedrake/regression/test_mesh_generation.py
github-actions / Firedrake complex
test_mesh_generation.test_bendy_icos_unit[2]
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
degree = 2
def test_bendy_icos_unit(degree):
> return run_bendy_icos_unit(degree)
tests/firedrake/regression/test_mesh_generation.py:348:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/firedrake/regression/test_mesh_generation.py:338: in run_bendy_icos_unit
m = UnitIcosahedralSphereMesh(refinement_level=1, degree=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/utility_meshes.py:2118: in UnitIcosahedralSphereMesh
return IcosahedralSphereMesh(
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/utility_meshes.py:2071: in IcosahedralSphereMesh
functionspace.VectorFunctionSpace(m, "CG", 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: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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 18 in tests/firedrake/regression/test_assemble.py
github-actions / Firedrake complex
test_assemble.test_zero_form[cg1dg0[1]]
failed on setup with "ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'"
Raw output
request = <SubRequest 'fs' for <Function test_one_form[cg1dg0[1]]>>
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1)
@pytest.fixture(scope='module', params=['cg1', 'vcg1', 'tcg1',
'cg1cg1', 'cg1cg1[0]', 'cg1cg1[1]',
'cg1vcg1[0]', 'cg1vcg1[1]',
'cg1dg0', 'cg1dg0[0]', 'cg1dg0[1]',
'cg2dg1', 'cg2dg1[0]', 'cg2dg1[1]'])
def fs(request, mesh):
> cg1 = FunctionSpace(mesh, "CG", 1)
tests/firedrake/regression/test_assemble.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 60 in tests/firedrake/macro/test_macro_interp_project.py
github-actions / Firedrake complex
test_macro_interp_project.test_projection_scalar_monomial[square-proj_bc-iso(2)-2]
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
op = <function proj_bc at 0x7f42ae090a40>
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 2)
degree = 2, variant = 'iso(2)'
@pytest.mark.parametrize(('variant', 'degree'),
[(None, 2),
("integral", 'd'),
('alfeld', 1),
('alfeld', 'd'),
('iso(2)', 2)])
@pytest.mark.parametrize('op', (interp, proj, proj_bc, h1_proj, h1_proj_bc))
def test_projection_scalar_monomial(op, mesh, degree, variant):
if degree == 'd':
degree = mesh.geometric_dimension()
> V = FunctionSpace(mesh, "CG", degree=degree, variant=variant)
tests/firedrake/macro/test_macro_interp_project.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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
github-actions / Firedrake complex
test_scaled_mass.test_math_functions[vector-Function-f=(-1)-expr=(1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f))]
AttributeError: 'MeshTopology' object has no attribute 'coordinates'
Raw output
mesh = Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1)
expr = '1.0/tanh(sqrt(f*f)) + 1.0/f + sqrt(f*f)', value = -1, 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:2756: AttributeError
Check failure on line 33 in tests/firedrake/submesh/test_submesh_interpolate.py
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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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
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 0x7f32181d06c0>)
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:3305: in VertexOnlyMesh
mesh.init()
firedrake/mesh.py:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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 8 in tests/firedrake/regression/test_ufl.py
github-actions / Firedrake complex
test_ufl.test_cellsize_1d[16]
ValueError: Buffer dtype mismatch, expected 'PetscScalar' but got 'complex double'
Raw output
n = 16
@pytest.mark.parametrize('n', [1, 3, 16])
def test_cellsize_1d(n):
> assert abs(assemble(CellSize(UnitIntervalMesh(n))*dx) - 1.0/n) < 1e-14
tests/firedrake/regression/test_ufl.py:8:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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:355: in CellSize
mesh.init()
firedrake/mesh.py:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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
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:2242: in init
self._callback(self)
firedrake/mesh.py:2265: 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