Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distributed ghost skeleton #101

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading