Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Oct 1, 2024
1 parent 0bc9184 commit a3309ee
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions test/ConstantFESpacesTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
using Gridap
using GridapDistributed, PartitionedArrays

using Gridap.FESpaces
using Gridap.FESpaces, Gridap.Arrays, Gridap.Algebra

np = (2,2)
ranks = with_debug() do distribute
ranks = with_mpi() do distribute
distribute(LinearIndices((prod(np),)))
end

model = CartesianDiscreteModel(ranks,np,(0,1,0,1),(4,4))
model = CartesianDiscreteModel(ranks,np,(0,1,0,1),(10,10))

Ω = Triangulation(model)
= Measure(Ω,2)

reffe = ReferenceFE(lagrangian, Float64, 1)
U = FESpace(model,reffe)
V = ConstantFESpace(model)
X = MultiFieldFESpace([U,V])

gids = get_free_dof_ids(V)
local_to_global(gids)
Expand All @@ -25,3 +28,19 @@ own_to_local(gids)
uh = zero(V)
sum((uh)dΩ)

map(ranks) do r
println("flag 1 from ", r)
end

a((u,λ),(v,μ)) = (u*v + λ*v + μ*u)dΩ
A = assemble_matrix(a,X,X)

map(ranks) do r
println("flag 2 from ", r)
end

x = allocate_in_domain(A)

map(ranks) do r
println("done from ", r)
end

0 comments on commit a3309ee

Please sign in to comment.