diff --git a/src/OctreeDistributedDiscreteModels.jl b/src/OctreeDistributedDiscreteModels.jl index 8e6be90..193ffbd 100644 --- a/src/OctreeDistributedDiscreteModels.jl +++ b/src/OctreeDistributedDiscreteModels.jl @@ -1432,12 +1432,16 @@ function _refine_coarsen_balance!(model::OctreeDistributedDiscreteModel{Dc,Dp}, end function Gridap.Adaptivity.adapt(model::OctreeDistributedDiscreteModel{Dc,Dp}, - refinement_and_coarsening_flags::MPIArray{<:Vector{Cint}}; + refinement_and_coarsening_flags::MPIArray{<:Vector{<:Integer}}; parts=nothing) where {Dc,Dp} Gridap.Helpers.@notimplementedif parts!=nothing + + _refinement_and_coarsening_flags = map(refinement_and_coarsening_flags) do flags + convert(Vector{Cint},flags) + end - ptr_new_pXest = _refine_coarsen_balance!(model, refinement_and_coarsening_flags) + ptr_new_pXest = _refine_coarsen_balance!(model, _refinement_and_coarsening_flags) # Extract ghost and lnodes ptr_pXest_ghost = setup_pXest_ghost(Val{Dc}, ptr_new_pXest) @@ -1457,7 +1461,7 @@ function Gridap.Adaptivity.adapt(model::OctreeDistributedDiscreteModel{Dc,Dp}, adaptivity_glue = _compute_fine_to_coarse_model_glue(model.parts, model.dmodel, fmodel, - refinement_and_coarsening_flags) + _refinement_and_coarsening_flags) adaptive_models = map(local_views(model), local_views(fmodel), adaptivity_glue) do model, fmodel, glue diff --git a/test/PoissonNonConformingOctreeModelsTests.jl b/test/PoissonNonConformingOctreeModelsTests.jl index 4b32b05..4cb62bd 100644 --- a/test/PoissonNonConformingOctreeModelsTests.jl +++ b/test/PoissonNonConformingOctreeModelsTests.jl @@ -39,7 +39,7 @@ module PoissonNonConformingOctreeModelsTests reffe=ReferenceFE(lagrangian,T,order) VH=FESpace(dmodel,reffe;dirichlet_tags="boundary") UH=TrialFESpace(VH,u) - ref_coarse_flags=map(ranks,partition(get_cell_gids(dmodel.dmodel))) do rank,indices + ref_coarse_flags=map(ranks,partition(get_cell_gids(dmodel.dmodel))) do rank,indices flags=zeros(Cint,length(indices)) flags.=nothing_flag @@ -176,7 +176,7 @@ module PoissonNonConformingOctreeModelsTests degree = 2*order+1 ref_coarse_flags=map(ranks,partition(get_cell_gids(dmodel.dmodel))) do rank,indices - flags=zeros(Cint,length(indices)) + flags=zeros(Int,length(indices)) flags.=nothing_flag if (rank==1) flags[1:2^Dc].=coarsen_flag