Skip to content

Commit 42bb1f7

Browse files
authored
Merge pull request #94 from gridap/develop
Moving to Gridap's Patch-Based interface
2 parents 38df5d9 + c43bae2 commit 42bb1f7

76 files changed

Lines changed: 3399 additions & 4060 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NEWS.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.7.0] - 2026-03-10
9+
10+
### Breaking
11+
12+
- Complete rework of patch-based smoothers. Since PR[#94](https://github.com/gridap/GridapSolvers.jl/pull/94/files). List of breaking changes:
13+
- All the patch machinery has been removed (`PatchDecomposition`, `PatchFESpace`, `PatchTriangulation`, etc...) in favour of the new Gridap patch machinery (since Gridap v0.19).
14+
- The old `PatchBasedLinearSolver` has been renamed to `PatchSolver` and now uses the new patch machinery. The constructors are similar but should be simpler and more flexible/robust. This still integrates the blocks on demand.
15+
- The old `VankaSolver` has been renamed to `BlockJacobiSolver` and has been extended to distributed. It it now an alternative to `PatchSolver` where the local problems are extracted directly from the matrix instead of re-computing the local problems (and are equivalent if the patched weakform coincides with the original problem).
16+
- `PatchProlongationOperator` now uses the new `PatchSolver` machinery. A new operator `BlockJacobiProlongationOperator` has been added, which is equivalent but uses the `BlockJacobiSolver` machinery.
17+
18+
### Added
19+
20+
- `GMGLinearSolver` now supports F- and W-cycles on top of the existing V-cycle. The iteration type can be now chosen through the `cycle_type` kwarg. Since PR[#94](https://github.com/gridap/GridapSolvers.jl/pull/94/files).
21+
- Non-preconditioned CG solver is now also available. Added Lanczos eigenvalue add-on for CG solvers to compute approximations of the . Since PR[#94](https://github.com/gridap/GridapSolvers.jl/pull/94/files).
22+
823
## [0.6.2] - 2026-03-08
924

1025
### Fixed
@@ -19,16 +34,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1934

2035
## [0.6.0] - 2025-06-13
2136

37+
### Breaking
38+
39+
- Removed the `ModelHierarchy` from the `GMGLinearSolver` constructors. This should allow more flexibility for the GMG solver (for instance, to create a P-GMG). Since PR[#92](https://github.com/gridap/GridapSolvers.jl/pull/92).
40+
2241
### Added
2342

2443
- Added support for Gridap v0.19. Since PR[#92](https://github.com/gridap/GridapSolvers.jl/pull/92).
2544
- Added a new extension for `Pardiso.jl`. Since PR[#92](https://github.com/gridap/GridapSolvers.jl/pull/92).
2645

27-
### Changed
46+
## [0.5.0] - 2025-04-29
2847

29-
- **BREAKING:** Removed the `ModelHierarchy` from the `GMGLinearSolver` constructors. This should allow more flexibility for the GMG solver (for instance, to create a P-GMG). Since PR[#92](https://github.com/gridap/GridapSolvers.jl/pull/92).
48+
### Breaking
3049

31-
## [0.5.0] - 2025-04-29
50+
- Moved dependencies for GridapP4est, GridapPETSc and IterativeSolvers into extensions (i.e weak dependencies). Since PR[#76](https://github.com/gridap/GridapSolvers.jl/pull/76).
3251

3352
### Added
3453

@@ -38,10 +57,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3857
- Added `RichardsonLinearSolver`. Since PR[#87](https://github.com/gridap/GridapSolvers.jl/pull/87).
3958
- Added `NullspaceSolver` for serial. Since PR[#88](https://github.com/gridap/GridapSolvers.jl/pull/88).
4059

41-
### Changed
42-
43-
- **BREAKING:** Moved GridapP4est, GridapPETSc and IterativeSolvers into extensions (i.e weak dependencies). Since PR[#76](https://github.com/gridap/GridapSolvers.jl/pull/76).
44-
4560
## Previous versions
4661

4762
A changelog is not maintained for older versions than 0.4.0.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GridapSolvers"
22
uuid = "6d3209ee-5e3c-4db7-a716-942eb12ed534"
33
authors = ["Santiago Badia <santiago.badia@monash.edu>", "Jordi Manyer <jordi.manyer@monash.edu>", "Alberto F. Martin <alberto.f.martin@anu.edu.au>", "Javier Principe <principe@cimne.upc.edu>"]
4-
version = "0.6.2"
4+
version = "0.7.0"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

docs/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Manifest.toml
22
build/
33
site/
4-
src/Examples/
4+
src/Examples/
5+
src/changelog.md

docs/make.jl

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@ using Documenter
33
using GridapSolvers
44
using GridapPETSc, GridapP4est, IterativeSolvers, Pardiso
55

6+
# Examples
67
include("examples.jl")
78

9+
# Changelog
10+
cp(string(@__DIR__,"/../NEWS.md"), string(@__DIR__,"/src/changelog.md"))
11+
12+
# Extensions
813
extensions = map(
914
ext -> Base.get_extension(GridapSolvers,ext),
1015
(:GridapP4estExt,:GridapPETScExt,:IterativeSolversExt,:PardisoExt)
1116
)
1217
println(" >>> Extensions found: ", extensions)
1318

19+
# Make Docs
1420
DocMeta.setdocmeta!(GridapSolvers, :DocTestSetup, :(using GridapSolvers); recursive=true)
1521

1622
makedocs(;
@@ -26,12 +32,14 @@ makedocs(;
2632
),
2733
pages = [
2834
"Home" => "index.md",
29-
"SolverInterfaces" => "SolverInterfaces.md",
30-
"MultilevelTools" => "MultilevelTools.md",
31-
"LinearSolvers" => "LinearSolvers.md",
32-
"NonlinearSolvers" => "NonlinearSolvers.md",
33-
"BlockSolvers" => "BlockSolvers.md",
34-
"PatchBasedSmoothers" => "PatchBasedSmoothers.md",
35+
"Modules" => [
36+
"SolverInterfaces" => "SolverInterfaces.md",
37+
"MultilevelTools" => "MultilevelTools.md",
38+
"LinearSolvers" => "LinearSolvers.md",
39+
"NonlinearSolvers" => "NonlinearSolvers.md",
40+
"BlockSolvers" => "BlockSolvers.md",
41+
"PatchBasedSmoothers" => "PatchBasedSmoothers.md",
42+
],
3543
"Extensions" => [
3644
"GridapP4est.jl" => "Extensions/GridapP4est.md",
3745
"GridapPETSc.jl" => "Extensions/GridapPETSc.md",
@@ -45,6 +53,7 @@ makedocs(;
4553
"Navier-Stokes (GMG)" => "Examples/NavierStokesGMG.md",
4654
"Darcy (GMG)" => "Examples/DarcyGMG.md",
4755
],
56+
"Changelog" => "changelog.md",
4857
],
4958
warnonly = [:doctest,:example_block,:eval_block],
5059
clean = true,

docs/src/LinearSolvers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ such that ``|r_{k+1}| < |r_k|``.
4040
```@docs
4141
RichardsonSmoother
4242
RichardsonSmoother(M::LinearSolver)
43+
GaussSeidelSmoother
4344
```
4445

4546
## Preconditioners

docs/src/changelog.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/BlockSolvers/BlockFEOperators.jl

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -89,32 +89,6 @@ function BlockArrays.blocks(a::MultiField.BlockSparseMatrixAssembler)
8989
return a.block_assemblers
9090
end
9191

92-
function BlockArrays.blocks(f::MultiFieldFESpace{<:BlockMultiFieldStyle{NB,SB,P}}) where {NB,SB,P}
93-
block_ranges = MultiField.get_block_ranges(NB,SB,P)
94-
block_spaces = map(block_ranges) do range
95-
(length(range) == 1) ? f[range[1]] : MultiFieldFESpace(f.spaces[range])
96-
end
97-
return block_spaces
98-
end
99-
100-
function BlockArrays.blocks(f::GridapDistributed.DistributedMultiFieldFESpace{<:BlockMultiFieldStyle{NB,SB,P}}) where {NB,SB,P}
101-
block_gids = blocks(get_free_dof_ids(f))
102-
block_ranges = MultiField.get_block_ranges(NB,SB,P)
103-
block_spaces = map(block_ranges,block_gids) do range, gids
104-
if (length(range) == 1)
105-
space = f[range[1]]
106-
else
107-
global_sf_spaces = f.field_fe_space[range]
108-
local_sf_spaces = to_parray_of_arrays(map(local_views,global_sf_spaces))
109-
local_mf_spaces = map(MultiFieldFESpace,local_sf_spaces)
110-
vector_type = GridapDistributed._find_vector_type(local_mf_spaces,gids)
111-
space = DistributedMultiFieldFESpace(global_sf_spaces,local_mf_spaces,gids,vector_type)
112-
end
113-
space
114-
end
115-
return block_spaces
116-
end
117-
11892
function liform_from_blocks(ids, ranges, liforms)
11993
function biform(v)
12094
c = DomainContribution()

0 commit comments

Comments
 (0)