Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Jan 15, 2024
1 parent 9005eac commit 7238b74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/PatchBasedSmoothers/PatchBasedSmoothers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ module PatchBasedSmoothers
using FillArrays, BlockArrays
using LinearAlgebra
using Gridap
using Gridap.Helpers
using Gridap.Algebra
using Gridap.Arrays
using Gridap.Geometry
using Gridap.FESpaces
using Gridap.Helpers, Gridap.Algebra, Gridap.Arrays
using Gridap.Geometry, Gridap.FESpaces, Gridap.Adaptivity

using PartitionedArrays
using GridapDistributed
Expand Down
11 changes: 9 additions & 2 deletions src/PatchBasedSmoothers/seq/PatchFESpaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ function Gridap.FESpaces.get_cell_dof_ids(a::PatchFESpace,trian::PatchTriangulat
return get_cell_dof_ids(trian.trian,a,trian)
end

function Gridap.FESpaces.get_cell_dof_ids(t::AdaptedTriangulation,a::PatchFESpace,trian::PatchTriangulation)
return get_cell_dof_ids(t.trian,a,trian)
end

function Gridap.FESpaces.get_cell_dof_ids(::Triangulation,a::PatchFESpace,trian::PatchTriangulation)
return a.patch_cell_dofs_ids
end
Expand All @@ -107,9 +111,12 @@ end
function Gridap.FESpaces.get_cell_dof_ids(::SkeletonTriangulation,a::PatchFESpace,trian::PatchTriangulation)
cell_dof_ids = get_cell_dof_ids(a)
pfaces_to_pcells = trian.pfaces_to_pcells

pcells_plus = isempty(pfaces_to_pcells) ? Int[] : lazy_map(x->x[1],pfaces_to_pcells)
pcells_minus = isempty(pfaces_to_pcells) ? Int[] : lazy_map(x->x[2],pfaces_to_pcells)

plus = lazy_map(Reindex(cell_dof_ids),lazy_map(x->x[1],pfaces_to_pcells))
minus = lazy_map(Reindex(cell_dof_ids),lazy_map(x->x[2],pfaces_to_pcells))
plus = lazy_map(Reindex(cell_dof_ids),pcells_plus)
minus = lazy_map(Reindex(cell_dof_ids),pcells_minus)
return lazy_map(Gridap.Fields.BlockMap(2,[1,2]),plus,minus)
end

Expand Down

0 comments on commit 7238b74

Please sign in to comment.