From 39cb26c36712a6846465222a0b594ad671ed1040 Mon Sep 17 00:00:00 2001 From: Anne Boschman Date: Fri, 8 Nov 2024 17:58:40 +1100 Subject: [PATCH] A check failed error. Seems no longer need for the transpose/reshape as this has been fixed by changing the BulkGhostPenaltyAssembleRhsMap. --- BulkGhostPenaltyAssembleMaps.jl | 2 +- bulk_ghost_penalty_canvas_towardsdiv.jl | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BulkGhostPenaltyAssembleMaps.jl b/BulkGhostPenaltyAssembleMaps.jl index 628d87b..e18749a 100644 --- a/BulkGhostPenaltyAssembleMaps.jl +++ b/BulkGhostPenaltyAssembleMaps.jl @@ -57,7 +57,7 @@ function Gridap.Fields.evaluate!(cache,m::BulkGhostPenaltyAssembleRhsMap,aggrega Gridap.Arrays.setsize!(result,(size(contrib,1),max_local_dof_id)) else @assert rank==1 - Gridap.Arrays.setsize!(result,max_local_dof_id) + Gridap.Arrays.setsize!(result,(max_local_dof_id,)) end result.array .= 0.0 for (i,cell) in enumerate(aggregate_local_cells) diff --git a/bulk_ghost_penalty_canvas_towardsdiv.jl b/bulk_ghost_penalty_canvas_towardsdiv.jl index a66474b..d6cc400 100644 --- a/bulk_ghost_penalty_canvas_towardsdiv.jl +++ b/bulk_ghost_penalty_canvas_towardsdiv.jl @@ -538,9 +538,12 @@ test_div_dv_l2_proj_bb_dofs=lazy_map(\,p_lhs,test_rhs) # TODO: can be removed if we fix the BulkGhostPenaltyAssembleRhsMap. # transposed_test_div_dv_l2_proj_bb_dofs= lazy_map(x->collect(reshape(x,(size(x,1)))),lazy_map(transpose,test_div_dv_l2_proj_bb_dofs)) +# test_div_dv_l2_proj_bb_array=lazy_map(Gridap.Fields.linear_combination, +# transposed_test_div_dv_l2_proj_bb_dofs, +# Gridap.CellData.get_data(qbb)) test_div_dv_l2_proj_bb_array=lazy_map(Gridap.Fields.linear_combination, - transposed_test_div_dv_l2_proj_bb_dofs, + test_div_dv_l2_proj_bb_dofs, Gridap.CellData.get_data(qbb)) test_div_dv_l2_proj_bb_array_agg_cells=lazy_map(Broadcasting(∘), lazy_map(Reindex(test_div_dv_l2_proj_bb_array),agg_cells_to_aggregate),