Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 4 additions & 34 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,13 @@ 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).

## Unreleased
## [Unreleased]

### Added

- New overloads for the `TrialFESpace` constructor where the data to be imposed is passed as a `DistributedCellField`. Since PR[#183](https://github.com/gridap/GridapDistributed.jl/pull/183).
- Added missing `FESpace` constructors for distributed triangulations specialized for the RT FEs case. Since PR[#188](https://github.com/gridap/GridapDistributed.jl/pull/188)

## [0.4.10] - 2025-09-29

### Added

- Added support for multiple ghost layers on cartesian models. Since PR[#182](https://github.com/gridap/GridapDistributed.jl/pull/182).
- Added new way of doing AD for MultiField, where partials are computed separately for each field then merged together. Since PR[#176](https://github.com/gridap/GridapDistributed.jl/pull/176).

### Fixed

- Fixed issue [#177](https://github.com/gridap/GridapDistributed.jl/issues/177) and [#170](https://github.com/gridap/GridapDistributed.jl/issues/170). Since PR[#180](https://github.com/gridap/GridapDistributed.jl/pull/180).
- Fixed issue where calling `Boundary(with_ghost, dmodel)` would return the local processor boundaries (which include the faces at the interface between processors) instead of returning the local part of the global boundary. Since PR[#180](https://github.com/gridap/GridapDistributed.jl/pull/180).

## [0.4.9] - 2025-08-08

### Added

- Added a new framework for redistributing dofs, which is more efficient and flexible than the previous one. Since PR[#179](https://github.com/gridap/GridapDistributed.jl/pull/179).

### Fixed

- Fixed bug when redistributing periodic cartesian models. Since PR[#179](https://github.com/gridap/GridapDistributed.jl/pull/179).

## [0.4.8] - 2025-06-11

### Added
### Fixed
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace after "Fixed" should be removed.

Suggested change
### Fixed
### Fixed

Copilot uses AI. Check for mistakes.

- Added support for Gridap v0.19, with distributed counterparts for the new feaures introduced. This includes support for polytopal meshes, polytopal methods and patch assembly. Since PR[#175](https://github.com/gridap/GridapDistributed.jl/pull/175).
- Added `MacroDiscreteModel`, which gives a global numbering and classification of the interfaces between processors. Since PR[#175](https://github.com/gridap/GridapDistributed.jl/pull/175).
- Added support to create pvd files when the triangulation is not there on all processes. To achive this, a new method for the createpvd function is added.
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "achive" should be "achieve".

Suggested change
- Added support to create pvd files when the triangulation is not there on all processes. To achive this, a new method for the createpvd function is added.
- Added support to create pvd files when the triangulation is not there on all processes. To achieve this, a new method for the createpvd function is added.

Copilot uses AI. Check for mistakes.

## [0.4.7] - 2025-03-04
## [0.4.7] 2025-03-04
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent date format. All other entries use the format "## [version] - YYYY-MM-DD" with a hyphen before the date, but this entry is missing the hyphen.

Suggested change
## [0.4.7] 2025-03-04
## [0.4.7] - 2025-03-04

Copilot uses AI. Check for mistakes.

### Added

Expand Down
46 changes: 38 additions & 8 deletions src/Visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,35 @@ end

struct DistributedPvd{T<:AbstractArray}
pvds::T
parts::AbstractArray
end

function Visualization.createpvd(trian::DistributedTriangulation,parts::AbstractArray,args...;kwargs...)
nparts, new_parts = filter_empty_parts(parts,local_views(trian))
pvds = map(new_parts) do part
if part == 1
paraview_collection(args...;kwargs...)
end
end
DistributedPvd(pvds,new_parts)
end
Comment on lines +228 to +236
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new createpvd method for handling DistributedTriangulation with potentially empty parts lacks test coverage. Consider adding a test case that creates a pvd file using a half-empty triangulation (similar to the half_empty_trian function in VisualizationTests.jl) to ensure the new functionality works correctly when triangulations are not present on all processes.

Copilot uses AI. Check for mistakes.

function Visualization.createpvd(f,trian::DistributedTriangulation,parts::AbstractArray,args...;kwargs...)
pvd = createpvd(trian,parts,args...;kwargs...)
try
f(pvd)
finally
savepvd(pvd)
end
end

function Visualization.createpvd(parts::AbstractArray,args...;kwargs...)
pvds = map_main(parts) do part
paraview_collection(args...;kwargs...)
pvds = map(parts) do part
if part == 1
paraview_collection(args...;kwargs...)
end
end
DistributedPvd(pvds)
DistributedPvd(pvds,parts)
end

function Visualization.createpvd(f,parts::AbstractArray,args...;kwargs...)
Expand All @@ -241,14 +263,22 @@ function Visualization.createpvd(f,parts::AbstractArray,args...;kwargs...)
end

function Visualization.savepvd(pvd::DistributedPvd)
map_main(pvd.pvds) do pvd
vtk_save(pvd)
map(pvd.pvds, pvd.parts) do pvd, part
if part == 1
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace after the part == 1 condition should be removed.

Suggested change
if part == 1
if part == 1

Copilot uses AI. Check for mistakes.
vtk_save(pvd)
end
end
end

function Base.setindex!(pvd::DistributedPvd,pvtk::AbstractArray,time::Real)
map(vtk_save,pvtk)
map_main(pvtk,pvd.pvds) do pvtk,pvd
pvd[time] = pvtk
map(pvtk) do pvtk
if !isnothing(pvtk)
vtk_save(pvtk)
end
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace after the closing brace should be removed.

Suggested change
end
end

Copilot uses AI. Check for mistakes.
end
map(pvtk,pvd.pvds,pvd.parts) do pvtk,pvd,part
if part == 1
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using the non-filtered createpvd method (lines 247-254) with potentially empty triangulations, part == 1 could correspond to a process with an empty triangulation, making pvtk equal to nothing. Assigning nothing to the paraview collection may cause an error. Consider adding an additional check: if part == 1 && !isnothing(pvtk) to ensure the pvtk is valid before adding it to the collection.

Suggested change
if part == 1
if part == 1 && !isnothing(pvtk)

Copilot uses AI. Check for mistakes.
pvd[time] = pvtk
end
end
end
Loading