Skip to content
Merged
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
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
13 changes: 7 additions & 6 deletions .github/workflows/.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,34 @@ jobs:
strategy:
matrix:
version:
- '1.8'
- '1.10'
os:
- ubuntu-latest
- windows-latest
arch:
- 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 }}
docs:
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
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
42 changes: 41 additions & 1 deletion src/Distributed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
5 changes: 0 additions & 5 deletions src/STLCutters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down