diff --git a/NEWS.md b/NEWS.md index b67d6d6..b109d01 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.4.0] 2024-03-22 +## [0.4.0] 2024-04-12 ### Changed diff --git a/src/Algebra.jl b/src/Algebra.jl index 4af8c5c..cd1a163 100644 --- a/src/Algebra.jl +++ b/src/Algebra.jl @@ -373,7 +373,7 @@ end function local_views(a::BlockPMatrix,new_rows::BlockPRange,new_cols::BlockPRange) vals = map(CartesianIndices(blocksize(a))) do I - local_views(a[Block(I)],new_rows[Block(I[1])],new_cols[Block(I[2])]) + local_views(blocks(a)[I],blocks(new_rows)[I],blocks(new_cols)[I]) end |> to_parray_of_arrays return map(mortar,vals) end diff --git a/src/BlockPartitionedArrays.jl b/src/BlockPartitionedArrays.jl index 5661432..cd9e1c6 100644 --- a/src/BlockPartitionedArrays.jl +++ b/src/BlockPartitionedArrays.jl @@ -341,16 +341,19 @@ function Base.broadcasted(f, a::Union{BlockPArray,BlockPBroadcasted}, b::Number) return BlockPBroadcasted(blocks_out,blockaxes(a)) end -function Base.broadcasted(f, - a::Union{BlockPArray,BlockPBroadcasted}, - b::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0}}) +function Base.broadcasted( + f, + a::Union{BlockPArray,BlockPBroadcasted}, + b::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0}} +) Base.broadcasted(f,a,Base.materialize(b)) end function Base.broadcasted( f, a::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{0}}, - b::Union{BlockPArray,BlockPBroadcasted}) + b::Union{BlockPArray,BlockPBroadcasted} +) Base.broadcasted(f,Base.materialize(a),b) end diff --git a/src/MultiField.jl b/src/MultiField.jl index 1a945bc..e8927d9 100644 --- a/src/MultiField.jl +++ b/src/MultiField.jl @@ -101,8 +101,9 @@ function FESpaces.get_free_dof_ids(fs::DistributedMultiFieldFESpace) end function MultiField.restrict_to_field( - f::DistributedMultiFieldFESpace,free_values::AbstractVector,field::Integer) - values = map(f.part_fe_space,partition(free_values)) do u,x + f::DistributedMultiFieldFESpace,free_values::AbstractVector,field::Integer +) + values = map(local_views(f),partition(free_values)) do u,x restrict_to_field(u,x,field) end gids = f.field_fe_space[field].gids