diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..d60f0707 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "monthly" diff --git a/.github/workflows/.ci.yml b/.github/workflows/.ci.yml index 229f8aa9..c3b38b62 100644 --- a/.github/workflows/.ci.yml +++ b/.github/workflows/.ci.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: version: - - '1.8' + - '1.10' os: - ubuntu-latest - windows-latest @@ -15,14 +15,15 @@ jobs: - x64 steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} @@ -30,10 +31,10 @@ jobs: name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: - version: '1.8' + version: '1.10' - run: | julia --project=docs -e ' using Pkg diff --git a/NEWS.md b/NEWS.md index 8ccf7e4f..f02f40c9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,12 @@ 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.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.1] - 2025-06-13 + +### Added + +- Added support for Gridap v0.19. + ## [0.3.0] - 2024-08-01 ### Added diff --git a/Project.toml b/Project.toml index a9f07482..3f33b940 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "STLCutters" uuid = "284f087d-c8bb-44c4-af3c-39d0e1f330a5" authors = ["Pere Antoni Martorell", "Large Scale Scientific Computing"] -version = "0.3.0" +version = "0.3.1" [deps] AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" @@ -24,7 +24,7 @@ AlgebraicMultigrid = "0.5, 0.6" Downloads = "1.4" FileIO = "1.6" FillArrays = "0.11, 0.13, 1" -Gridap = "0.18.3" +Gridap = "0.18.3, 0.19" GridapDistributed = "0.4" GridapEmbedded = "0.9.4" IterativeSolvers = "0.9" diff --git a/src/Distributed.jl b/src/Distributed.jl index e7fc7c38..5fa9c6d7 100644 --- a/src/Distributed.jl +++ b/src/Distributed.jl @@ -96,7 +96,7 @@ function cut(cutter::STLCutter,bgmodel::DistributedDiscreteModel,args...) part_ioc = scatter(part_to_ioc,source=root) # Set undefined parts - map(cuts,part_ioc,cell_gids.partition) do cut,ioc,ids + map(cuts,part_ioc,partition(cell_gids)) do cut,ioc,ids own_cells = own_to_local(ids) if !istouched(cut,own_cells) set_in_or_out!(cut,ioc) @@ -728,3 +728,43 @@ function distributed_aggregate( facet_to_inoutcut = compute_bgfacet_to_inoutcut(cut,geo) GridapEmbedded.Distributed._distributed_aggregate_by_threshold(strategy.threshold,cut,geo,in_or_out,facet_to_inoutcut) end + +# Stuff brough over from GridapEmbedded.Distributed + +function consistent_bgcell_to_inoutcut!( + cuts::AbstractArray{<:AbstractEmbeddedDiscretization}, + gids::PRange) + + ls_to_bgcell_to_inoutcut = map(get_ls_to_bgcell_to_inoutcut,cuts) + _consistent!(ls_to_bgcell_to_inoutcut,gids) +end + +function get_ls_to_bgcell_to_inoutcut(cut::EmbeddedDiscretization) + cut.ls_to_bgcell_to_inoutcut +end + +function consistent_bgfacet_to_inoutcut!( + cuts::AbstractArray{<:AbstractEmbeddedDiscretization}, + gids::PRange) + + ls_to_bgfacet_to_inoutcut = map(get_ls_to_bgfacet_to_inoutcut,cuts) + _consistent!(ls_to_bgfacet_to_inoutcut,gids) +end + +function get_ls_to_bgfacet_to_inoutcut(cut::EmbeddedFacetDiscretization) + cut.ls_to_facet_to_inoutcut +end + +function _consistent!( + p_to_i_to_a::AbstractArray{<:Vector{<:Vector}}, + prange::PRange) + + n = map(length,p_to_i_to_a) |> PartitionedArrays.getany + for i in 1:n + p_to_a = map(i_to_a->i_to_a[i],p_to_i_to_a) + PVector(p_to_a,partition(prange)) |> consistent! |> wait + map(p_to_a,p_to_i_to_a) do p_to_a,p_to_ia + copyto!(p_to_ia[i],p_to_a) + end + end +end diff --git a/src/STLCutters.jl b/src/STLCutters.jl index 23a32cb6..4ddc6dfe 100644 --- a/src/STLCutters.jl +++ b/src/STLCutters.jl @@ -27,8 +27,6 @@ using Gridap.ReferenceFEs: get_graph using Gridap.ReferenceFEs: get_metadata using Gridap.ReferenceFEs: isactive using Gridap.ReferenceFEs: point_eltype -using GridapEmbedded.Distributed: consistent_bgcell_to_inoutcut! -using GridapEmbedded.Distributed: consistent_bgfacet_to_inoutcut! using GridapEmbedded.Distributed: DistributedEmbeddedDiscretization using GridapEmbedded.Distributed: AbstractEmbeddedDiscretization using GridapDistributed: DistributedDiscreteModel @@ -82,12 +80,9 @@ import GridapEmbedded.CSG: compatible_geometries import GridapEmbedded.CSG: similar_geometry import GridapEmbedded.AgFEM: aggregate import GridapEmbedded.Distributed: change_bgmodel -import GridapEmbedded.Distributed: get_ls_to_bgcell_to_inoutcut -import GridapEmbedded.Distributed: get_ls_to_bgfacet_to_inoutcut import GridapEmbedded.Distributed: remove_ghost_subfacets import GridapEmbedded.Distributed: distributed_aggregate - import Base: split export STLGeometry