From 9005eac8fc86029eee3ff3cc01de627ffd5fe50a Mon Sep 17 00:00:00 2001 From: JordiManyer Date: Mon, 15 Jan 2024 17:42:26 +1100 Subject: [PATCH] bugfixes --- src/PatchBasedSmoothers/mpi/PatchFESpaces.jl | 2 +- src/PatchBasedSmoothers/seq/PatchFESpaces.jl | 3 ++- src/PatchBasedSmoothers/seq/PatchMultiFieldFESpaces.jl | 8 -------- src/PatchBasedSmoothers/seq/PatchTriangulations.jl | 2 +- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/PatchBasedSmoothers/mpi/PatchFESpaces.jl b/src/PatchBasedSmoothers/mpi/PatchFESpaces.jl index b104a853..a5660c4f 100644 --- a/src/PatchBasedSmoothers/mpi/PatchFESpaces.jl +++ b/src/PatchBasedSmoothers/mpi/PatchFESpaces.jl @@ -3,7 +3,7 @@ function PatchFESpace(space::GridapDistributed.DistributedSingleFieldFESpace, patch_decomposition::DistributedPatchDecomposition, reffe::Union{ReferenceFE,Tuple{<:Gridap.ReferenceFEs.ReferenceFEName,Any,Any}}; conformity=nothing) - cell_conformity = _cell_conformity(patch_decomposition.model,reffe;conformity=conformity) + cell_conformity = MultilevelTools._cell_conformity(patch_decomposition.model,reffe;conformity=conformity) return PatchFESpace(space,patch_decomposition,cell_conformity) end diff --git a/src/PatchBasedSmoothers/seq/PatchFESpaces.jl b/src/PatchBasedSmoothers/seq/PatchFESpaces.jl index 46f246a6..9c9d7066 100644 --- a/src/PatchBasedSmoothers/seq/PatchFESpaces.jl +++ b/src/PatchBasedSmoothers/seq/PatchFESpaces.jl @@ -100,7 +100,8 @@ end function Gridap.FESpaces.get_cell_dof_ids(::BoundaryTriangulation,a::PatchFESpace,trian::PatchTriangulation) cell_dof_ids = get_cell_dof_ids(a) pfaces_to_pcells = trian.pfaces_to_pcells - return lazy_map(Reindex(cell_dof_ids),lazy_map(x->x[1],pfaces_to_pcells)) + pcells = isempty(pfaces_to_pcells) ? Int[] : lazy_map(x->x[1],pfaces_to_pcells) + return lazy_map(Reindex(cell_dof_ids),pcells) end function Gridap.FESpaces.get_cell_dof_ids(::SkeletonTriangulation,a::PatchFESpace,trian::PatchTriangulation) diff --git a/src/PatchBasedSmoothers/seq/PatchMultiFieldFESpaces.jl b/src/PatchBasedSmoothers/seq/PatchMultiFieldFESpaces.jl index 5b85dc28..0272e9db 100644 --- a/src/PatchBasedSmoothers/seq/PatchMultiFieldFESpaces.jl +++ b/src/PatchBasedSmoothers/seq/PatchMultiFieldFESpaces.jl @@ -1,12 +1,4 @@ -# This could be a DistributedSingleFieldFESpace if it accepted all kinds of FESpaces -struct PatchDistributedMultiFieldFESpace{A,B} - spaces :: A - gids :: B -end - -GridapDistributed.local_views(a::PatchDistributedMultiFieldFESpace) = a.spaces - ## PatchFESpace from MultiFieldFESpace function PatchFESpace(space::Gridap.MultiField.MultiFieldFESpace, diff --git a/src/PatchBasedSmoothers/seq/PatchTriangulations.jl b/src/PatchBasedSmoothers/seq/PatchTriangulations.jl index 55b6cef1..454090c6 100644 --- a/src/PatchBasedSmoothers/seq/PatchTriangulations.jl +++ b/src/PatchBasedSmoothers/seq/PatchTriangulations.jl @@ -53,7 +53,7 @@ function Gridap.Geometry.BoundaryTriangulation(PD::PatchDecomposition{Dr,Dc};tag patch_faces = get_patch_faces(PD,Df,is_boundary) pfaces_to_pcells = get_pfaces_to_pcells(PD,Df,patch_faces) - trian = BoundaryTriangulation(model) + trian = BoundaryTriangulation(model;tags) glue = get_glue(trian,Val(Df)) mface_to_tface = Gridap.Arrays.find_inverse_index_map(glue.tface_to_mface,num_faces(model,Df))