Skip to content

Commit

Permalink
add missing distributed functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pmartorell committed Jul 4, 2024
1 parent 2019553 commit 01b6e48
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Distributed/DistributedDiscretizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ function compute_bgcell_to_inoutcut(cutgeo::DistributedEmbeddedDiscretization,ar
end
end

function compute_bgfacet_to_inoutcut(cutgeo::DistributedEmbeddedDiscretization,args...)
map(local_views(cutgeo)) do cutgeo
compute_bgfacet_to_inoutcut(cutgeo,args...)
end
end

function remove_ghost_cells(trian::DistributedTriangulation)
model = get_background_model(trian)
gids = get_cell_gids(model)
Expand Down Expand Up @@ -220,6 +226,20 @@ function change_bgmodel(
DistributedEmbeddedDiscretization(cuts,model)
end

function change_bgmodel(
cutgeo::DistributedEmbeddedDiscretization{<:AbstractArray{<:EmbeddedFacetDiscretization}},
model::DistributedDiscreteModel,
args...)

D = map(num_dims,local_views(model)) |> PartitionedArrays.getany
cuts = _change_bgmodels(cutgeo,model,args...)
gids = get_face_gids(model,D-1)
ls_to_facet_to_inoutcut = map(c->c.ls_to_facet_to_inoutcut,cuts)
_consistent!(ls_to_facet_to_inoutcut,gids)
DistributedEmbeddedDiscretization(cuts,model)
end


function _change_bgmodels(
cutgeo::DistributedEmbeddedDiscretization,
model::DistributedDiscreteModel,
Expand Down

0 comments on commit 01b6e48

Please sign in to comment.