Skip to content

Commit

Permalink
Merge pull request #101 from zjwegert/distributed
Browse files Browse the repository at this point in the history
Distributed ghost skeleton
  • Loading branch information
JordiManyer authored Nov 25, 2024
2 parents 392b451 + 6850b68 commit 2b7e04f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/Distributed/Distributed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import GridapEmbedded.Interfaces: cut_facets
import GridapEmbedded.Interfaces: EmbeddedBoundary
import GridapEmbedded.Interfaces: compute_bgfacet_to_inoutcut
import GridapEmbedded.Interfaces: compute_bgcell_to_inoutcut
import GridapEmbedded.Interfaces: GhostSkeleton
import GridapEmbedded.CSG: get_geometry
import GridapEmbedded.LevelSetCutters: discretize, DiscreteGeometry
import Gridap.Geometry: Triangulation
Expand Down
2 changes: 1 addition & 1 deletion src/Distributed/DistributedDiscreteGeometries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function cut_facets(
DistributedEmbeddedDiscretization(cuts,bgmodel)
end

for TT in (:Triangulation,:SkeletonTriangulation,:BoundaryTriangulation,:EmbeddedBoundary)
for TT in (:Triangulation,:SkeletonTriangulation,:BoundaryTriangulation,:EmbeddedBoundary,:GhostSkeleton)
@eval begin
function $TT(portion,cutgeo::DistributedEmbeddedDiscretization,cutinorout,geom::DistributedDiscreteGeometry)
model = get_background_model(cutgeo)
Expand Down
22 changes: 11 additions & 11 deletions src/Distributed/DistributedDiscretizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ function cut_facets(cutter::Cutter,bgmodel::DistributedDiscreteModel{Dc},args...
DistributedEmbeddedDiscretization(cuts,bgmodel)
end

# Note on distributed triangulations:
#
# - We allow for more one argument, `portion`, which allows the user to filter
# some of the cells/faces. In particular, this is used to remove ghosts from the
# local triangulations.
# - The default for `portion` is `NoGhost()`, wich filters out all ghost cells, except
# Note on distributed triangulations:
#
# - We allow for more one argument, `portion`, which allows the user to filter
# some of the cells/faces. In particular, this is used to remove ghosts from the
# local triangulations.
# - The default for `portion` is `NoGhost()`, wich filters out all ghost cells, except
# when we have the argument `in_or_out`.

function Triangulation(
Expand All @@ -66,7 +66,7 @@ function Triangulation(
Triangulation(WithGhost(),cutgeo,in_or_out,args...)
end

for TT in (:Triangulation,:SkeletonTriangulation,:BoundaryTriangulation,:EmbeddedBoundary)
for TT in (:Triangulation,:SkeletonTriangulation,:BoundaryTriangulation,:EmbeddedBoundary,:GhostSkeleton)
@eval begin
function $TT(cutgeo::DistributedEmbeddedDiscretization,args...)
$TT(NoGhost(),cutgeo,args...)
Expand Down Expand Up @@ -122,9 +122,9 @@ end

# isconsistent_bgcell_to_inoutcut(cut::DistributedEmbeddedDiscretization)
# isconsistent_bgcell_to_inoutcut(cuts::AbstractArray{<:AbstractEmbeddedDiscretization},indices)
#
# Returns true if the local `ls_to_bgcell_to_inoutcut` arrays are consistent
# accross processors.
#
# Returns true if the local `ls_to_bgcell_to_inoutcut` arrays are consistent
# accross processors.
function isconsistent_bgcell_to_inoutcut(
cut::DistributedEmbeddedDiscretization{Dc}
) where Dc
Expand Down Expand Up @@ -189,7 +189,7 @@ function compute_bgfacet_to_inoutcut(cutgeo::DistributedEmbeddedDiscretization,a
end
end

# AMR
# AMR

function compute_redistribute_wights(
cut::DistributedEmbeddedDiscretization,
Expand Down

0 comments on commit 2b7e04f

Please sign in to comment.