Skip to content

Commit f982cb0

Browse files
authored
Merge pull request #195 from gridap/visualization
Minor improvement in visualization
2 parents b29506a + 3bd2aee commit f982cb0

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

NEWS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111

12-
- Fixed `BlockPMatrix{V}(::UndefInitializer, rows, cols)` constructor dropping the `cols` argument, causing a `MethodError` at runtime. Since PR[#194](https://github.com/gridap/GridapDistributed.jl/pull/194).
13-
- Fixed `local_views(::BlockPMatrix, rows, cols)` indexing 1D block-range vectors with a 2D `CartesianIndex`, causing `BoundsError` for any multi-field problem with ≥2 fields. Since PR[#194](https://github.com/gridap/GridapDistributed.jl/pull/194).
14-
- Fixed `mul!(y::BlockPVector, A::BlockPMatrix, x::BlockPVector, α, β)` computing `α*β*(A*x)` instead of `α*(A*x) + β*y`; the 3-arg `mul!` was also updated to correctly zero `y` before accumulating. Since PR[#194](https://github.com/gridap/GridapDistributed.jl/pull/194).
12+
- Fixed `BlockPMatrix{V}(::UndefInitializer, rows, cols)` constructor dropping the `cols` argument, causing a `MethodError` at runtime.
13+
- Fixed `local_views(::BlockPMatrix, rows, cols)` indexing 1D block-range vectors with a 2D `CartesianIndex`, causing `BoundsError` for any multi-field problem with ≥2 fields.
14+
- Fixed `mul!(y::BlockPVector, A::BlockPMatrix, x::BlockPVector, α, β)` computing `α*β*(A*x)` instead of `α*(A*x) + β*y`; the 3-arg `mul!` was also updated to correctly zero `y` before accumulating.
15+
- Replaced fragile closure side-effect in `DistributedVisualizationData.filebase` with `getany(map(...))` for correct and idiomatic behaviour in both debug and MPI modes.
1516

1617
## [0.4.11] - 2026-02-20
1718

src/Visualization.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ function Base.getproperty(x::DistributedVisualizationData, sym::Symbol)
1010
if sym == :grid
1111
map(i->i.grid,x.visdata)
1212
elseif sym == :filebase
13-
r=nothing
14-
map(x.visdata) do visdata
15-
r = visdata.filebase
16-
end
17-
r
13+
getany(map(i->i.filebase,x.visdata))
1814
elseif sym == :celldata
1915
map(i->i.celldata,x.visdata)
2016
elseif sym == :nodaldata
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module VisualizationTestsSeq
2+
include("../VisualizationTests.jl")
3+
using PartitionedArrays
4+
with_debug() do distribute
5+
VisualizationTests.main(distribute,(2,2))
6+
end
7+
end

0 commit comments

Comments
 (0)