Skip to content

Conversation

zjwegert
Copy link

@zjwegert zjwegert commented Jul 30, 2025

(WIP) DO NOT MERGE

Sister PR to Gridap#1136

TODO:

  • Tests
  • SkeletonTriangulation

Notes:

The below was fixed in #180
It appears there is a bug when trying to operate on CellFields. This should go in a separate issue.

using Gridap
using GridapDistributed
using PartitionedArrays

np = (2,2)
ranks = with_debug() do distribute
  distribute(LinearIndices((prod(np),)))
end

domain = (0,1,0,1)
partition = (5,5)
model = CartesianDiscreteModel(ranks,np,domain,partition)
Γ = BoundaryTriangulation(model)
V1 = FESpace(Γ,ReferenceFE(lagrangian,Float64,1))
V2 = FESpace(model,ReferenceFE(lagrangian,Float64,1))
uh1 = zero(V1);
uh2 = zero(V2);
uh1*uh2

This produces an error because _to_common_domain fails with the unreachable error. This appears to be because of the following: for DistributedTriangulations resulting from BoundaryTriangulation, we're in Case 4 of add_ghost_cells , so we create a new create a new triangulation with the ghost cells. The issue then appears to be that the glue information is missing, so both cases of

is_change_possible(_trian_a,_trian_b)
is_change_possible(_trian_b,_trian_a)

return false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants