Repository navigation
Conversation
|
If this claims to fix about 10 bugs can they please be separate PRs. |
I don't think that's necessary. The commit history is clean enough |
It's a question of reviewability. It is vastly easier for me to review small changes. We have a policy of squashing commits anyway so it would be better for our commit history as well. |
It should be fine. |
A MATIS was preallocated with a global MATPREALLOCATOR, which records only the rows that a rank owns. The local rows of ghost degrees of freedom therefore had no nonzero pattern, so assembly in parallel lost their contributions, and Dirichlet BCs failed on them. The preallocator of a MATIS is now a MATIS whose local matrix is a MATPREALLOCATOR, so the sparsity loop records the local pattern. Local degrees of freedom that no local insertion touches are masked out of the local-to-global maps, as PyOP2 did, so the local matrices have no empty rows. This re-enables test_assemble_matis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
get_entity_coordinates computes the entity coordinates with a firedrake.par_loop instead of an op2.Kernel. BrokenDirichletBC overrides _nodes, which DirichletBC uses for its node set, so that cellwise BCs take effect. The par_loop in get_primal_indices indexes the marker with the (node, component) shape of par_loop arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Dat that is passed to a C string kernel without a loop index (for example the Dat of a Constant) has a symbolic size. Loopy needs an integer shape, so take the local maximum of the size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d2792d1 to
3dbfc3d
Compare
3dbfc3d to
4ec2436
Compare
…ments Port FDMPC.condense, which applies the exact Schur complement on the facets with a local KSP that inverts the interior block on each cell. The local KSP is attached to an empty Mat because a pyop3 local kernel can only receive PETSc objects of type Mat. Add a test that uses pc_use_amat with static condensation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port extrude_interior_facet_maps, which the SIPG terms of PoissonFDMPC use. Extruded meshes are DMPlex meshes, so the maps come from the interior vertical and horizontal facet sets instead of the layers. Re-enable the DG and RT cases of test_ipdg_direct_solver. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4ec2436 to
294b666
Compare
| ) -> None: | ||
| if not isinstance(obj, PETSc.Object): | ||
| raise TypeError(f"'obj' must be a PETSc object, not {type(obj).__name__}.") | ||
| name = utils.maybe_generate_name(name, prefix, self.DEFAULT_PREFIX) |
There was a problem hiding this comment.
The maybe_ is weird. Why not name = name or utils.generate_name(prefix, self.DEFAULT_PREFIX)?
This is just a comment. I am not going to continue this discussion.
Summary
Re-enables the BDDC and FDM tests that #3318 (pyop3) disabled. Fixes the bugs that they exposed in pyop3 and Firedrake.
The
block_diagonalbranch ofFDMPC.assemble_coefficientsis unchanged. It depends on matrix-free context attributes from an unmerged PR.Evidence
regression/test_assemble.py::test_assemble_matis(unskipped)allclose(A_is - A_aij, 0)failsregression/test_bddc.py(module skip removed)create_matis;MatZeroRowsColumnsLocal"new nonzero"regression/test_fdm.py(dg/rt xfail removed,test_static_condensation_amatnew)NotImplementedErrorregression/test_bcs.py::test_set_function_on_bc_nodes(new)assert np.isscalartest_bcs.py: 102 at n=1, 1 at n=2)pyop3/insn/test_loop.py::test_c_string_kernel_with_unindexed_global(new)test_loop.py: 23 pass, 1 existing xfail)Also run:
test_facet_split.py6 pass (n=1, 3),test_star_pc.py22 pass (n=1, 2),make srclintclean.Merge Danger
Door: two-way
Blast Radius: moderate
mat_type="is") get a new local pattern and masked l2g maps. AIJ/BAIJ/nest preallocation is unchanged.Contributions in this PR were assisted by Claude Code (Claude Opus 5.5) and Codex.