Skip to content

Commit

Permalink
example fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmartorell committed Aug 1, 2024
1 parent 69f33eb commit 7e50197
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/src/distributed.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ using PartitionedArrays
using GridapP4est
parts = 8
cells = (2,2,2)
filename = "stl_file_path.stl"
filename = "293137.stl"
with_mpi() do distribute
ranks = distribute(LinearIndices((prod(parts),)))
# Domain and discretization
Expand All @@ -143,7 +143,7 @@ with_mpi() do distribute
Ω_act = Triangulation(cutgeo,ACTIVE)
Ω = Triangulation(cutgeo)
Γ = EmbeddedBoundary(cutgeo)
= get_normal_vector(Γ)
= get_normal_vector(Γ)
= Measure(Ω,2)
= Measure(Γ,2)
# FE spaces
Expand Down Expand Up @@ -187,19 +187,19 @@ using PartitionedArrays
using GridapP4est
parts = 8
cells = (16,16,16)
filename = "stl_file_path.stl"
filename = "293137.stl"
with_mpi() do distribute
ranks = distribute(LinearIndices((prod(parts),)))
# Domain and discretization
geo = STLGeometry(filename)
pmin,pmax = get_bounding_box(geo)
coarse_model = CartesianDiscreteModel(pmin,pmax,cells)
model = OctreeDistributedDiscreteModel(ranks,coarse_model,2)
model = OctreeDistributedDiscreteModel(ranks,coarse_model)
cutgeo = cut(model,geo)
# Redistribute to avoid void subdmoains
weights = compute_adaptive_flags(cutgeo)
model, = Gridap.Adaptivity.adapt(model,weights=weights)
model = get_model(model.dmodel)
flags = compute_adaptive_flags(cutgeo)
model, = Gridap.Adaptivity.adapt(model,flags)
model = Gridap.Adaptivity.get_model(model.dmodel)
# Re-compute discretization
cutgeo = cut(model,geo)
Ωin = Triangulation(cutgeo,PHYSICAL_IN)
Expand Down

0 comments on commit 7e50197

Please sign in to comment.