Skip to content

Commit

Permalink
Added DistributedAdaptedDiscreteModels
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Jan 5, 2023
1 parent a978d3e commit ae1cc6f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,23 @@ function Geometry.DiscreteModel(
DistributedDiscreteModel(models,gids)
end

# DistributedAdaptedDiscreteModels

const DistributedAdaptedDiscreteModel{Dc,Dp} = DistributedDiscreteModel{Dc,Dp,<:AbstractPData{<:AdaptedDiscreteModel{Dc,Dp}}}

function DistributedAdaptedDiscreteModel(model ::AbstractDistributedDiscreteModel,
parent ::AbstractDistributedDiscreteModel,
glue ::AbstractPData{<:AdaptivityGlue})
models = map_parts(local_views(model),local_views(parent),glue) do model, parent, glue
AdaptedDiscreteModel(model,parent,glue)
end
return DistributedDiscreteModel(models,get_cell_gids(model))
end

function Adaptivity.get_adaptivity_glue(model::DistributedAdaptedDiscreteModel)
return map_parts(Adaptivity.get_adaptivity_glue,local_views(model))
end

# RedistributeGlue : Redistributing discrete models

"""
Expand Down
1 change: 1 addition & 0 deletions src/GridapDistributed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module GridapDistributed

using Gridap
using Gridap.Helpers
using Gridap.Adaptivity
using Gridap.Algebra
using Gridap.Arrays
using Gridap.Fields
Expand Down

0 comments on commit ae1cc6f

Please sign in to comment.