Open
Description
Describe the bug
I am trying to invert a block-diagonal matrix using Slate's infrastructure. It works great for simple mass matrix and for a grad-grad matrix in most cases except for DQ-2.
Steps to Reproduce
import firedrake as fd
import time
from firedrake import (
inner,
grad,
dx,
)
N = 100
mesh = fd.UnitSquareMesh(N, N, quadrilateral=True)
V = fd.VectorFunctionSpace(mesh, "DQ", 2) # Works fine with DG
v = fd.TestFunction(V)
u = fd.TrialFunction(V)
# F = inner(u, v) * dx # Works for any order
F = inner(grad(u), grad(v)) * dx # Works for 1, 3, 4, 5...
time_start = time.time()
fd.assemble(fd.Tensor(F).inv)
time_end = time.time()
print(f"Time taken for inverse: {time_end - time_start} seconds")
Expected behavior
No errors
Error message
Getri throws nonzero info.[1] 31916 abort
Environment:
- OS: MacOS
- Python version: 3.11.8
- Output of
firedrake-status
Firedrake Configuration:
package_manager: True
minimal_petsc: False
mpicc: mpicc
mpicxx: mpicxx
mpif90: mpif90
mpiexec: mpiexec
mpihome: /opt/homebrew/
disable_ssh: False
honour_petsc_dir: False
with_parmetis: False
slepc: True
packages: []
honour_pythonpath: False
opencascade: False
torch: False
jax: False
petsc_int_type: int32
cache_dir: /Users/miguel/repos/firedrake-20250204/.cache
complex: False
remove_build_files: False
with_blas: download
netgen: False
Additions:
None
Environment:
PYTHONPATH: None
PETSC_ARCH: None
PETSC_DIR: None
Status of components:
---------------------------------------------------------------------------
|Package |Branch |Revision |Modified |
---------------------------------------------------------------------------
|fiat |master |8839f876 |False |
|firedrake |master |96501362c |False |
|h5py |firedrake |06d2da80 |False |
|libsupermesh |master |f87cbfd |True |
|loopy |main |27aead57 |False |
|petsc |firedrake |4354988f8b6|False |
|pyadjoint |master |da58d45 |False |
|pytest-mpi |main |f5668e4 |False |
|slepc |firedrake |cfa875895 |False |
|ufl |master |5da0ab98 |False |
---------------------------------------------------------------------------