Skip to content

Commit

Permalink
Update Manifest and to latest Ferrite#master changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KnutAM committed Sep 19, 2024
1 parent 81a8db6 commit 0559714
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
10 changes: 3 additions & 7 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

julia_version = "1.10.5"
manifest_format = "2.0"
<<<<<<< HEAD
project_hash = "4c848f9298055eeb41f2e37c645ce0493264535f"
=======
project_hash = "1cc08f4c6506ca353b7656297763418ecbb18cd4"
>>>>>>> main
project_hash = "3cccd2fa35dbbf97d5cd332812d31f9109f498c6"

[[deps.ANSIColoredPrinters]]
git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c"
Expand Down Expand Up @@ -415,11 +411,11 @@ version = "3.3.10+0"

[[deps.Ferrite]]
deps = ["EnumX", "ForwardDiff", "LinearAlgebra", "NearestNeighbors", "OrderedCollections", "Preferences", "Reexport", "SparseArrays", "StaticArrays", "Tensors", "WriteVTK"]
git-tree-sha1 = "886da974305982fd13637abc00c1e85c2bcc09cd"
git-tree-sha1 = "a0442408f40f96d6477d1de0035fbb92507bcf63"
repo-rev = "master"
repo-url = "https://github.com/Ferrite-FEM/Ferrite.jl.git"
uuid = "c061ca5d-56c9-439f-9c0e-210fe06d3992"
version = "0.3.14"
version = "1.0.0"

[deps.Ferrite.extensions]
FerriteBlockArrays = "BlockArrays"
Expand Down
25 changes: 13 additions & 12 deletions src/Workers/Assemblers.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

# Ferrite.AbstractSparseAssembler
const FerriteSparseAssemblers = Union{Ferrite.AssemblerSparsityPattern, Ferrite.AssemblerSymmetricSparsityPattern}
create_local(a::FerriteSparseAssemblers) = start_assemble(a.K, a.f; fillzero=false)
scatter!(::FerriteSparseAssemblers, ::FerriteSparseAssemblers) = nothing
gather!( ::FerriteSparseAssemblers, ::FerriteSparseAssemblers) = nothing
function create_local(a::Ferrite.AbstractAssembler)
start_assemble(Ferrite.get_matrix(a), Ferrite.get_vector(a); fillzero=false)
end

scatter!(::Ferrite.AbstractAssembler, ::Ferrite.AbstractAssembler) = nothing
gather!( ::Ferrite.AbstractAssembler, ::Ferrite.AbstractAssembler) = nothing

can_thread(::FerriteSparseAssemblers) = true
can_thread(::Ferrite.AbstractAssembler) = true

function work_single_cell!(assembler::Ferrite.AbstractSparseAssembler, cellbuffer)
function work_single_cell!(assembler::Ferrite.AbstractAssembler, cellbuffer)
Ke = get_Ke(cellbuffer)
re = get_re(cellbuffer)
ae = get_ae(cellbuffer)
Expand All @@ -18,7 +19,7 @@ function work_single_cell!(assembler::Ferrite.AbstractSparseAssembler, cellbuffe
assemble!(assembler, celldofs(cellbuffer), Ke, re)
end

function work_single_facet!(assembler::Ferrite.AbstractSparseAssembler, facetbuffer)
function work_single_facet!(assembler::Ferrite.AbstractAssembler, facetbuffer)
Ke = get_Ke(facetbuffer)
re = get_re(facetbuffer)
ae = get_ae(facetbuffer)
Expand Down Expand Up @@ -84,9 +85,9 @@ end

"""
KeReAssembler(K, r; fillzero=true, kwargs...)
KeReAssembler(a::Ferrite.AbstractSparseAssembler; kwargs...)
KeReAssembler(a::Ferrite.AbstractAssembler; kwargs...)
The default `KeReAssembler` works just like a `Ferrite.AbstractSparseAssembler`:
The default `KeReAssembler` works just like a `Ferrite.AbstractAssembler`:
It will call `element_routine!` and assemble `Ke` and `re` into the global system
matrix `K` and vector `r`. However, it comes with the additional possible features,
that are controllable via the keyword arguments:
Expand All @@ -101,7 +102,7 @@ if a matrix, `K`, and vector, `r`, are given as input.
[`reset_scaling!`](@ref) is called when creating `KeReAssembler`
"""
struct KeReAssembler{A<:FerriteSparseAssemblers, CH, SC}
struct KeReAssembler{A<:Ferrite.AbstractAssembler, CH, SC}
a::A
ch::CH # Union{Nothing, Ferrite.ConstraintHandler}
apply_zero::Bool
Expand All @@ -111,7 +112,7 @@ function KeReAssembler(K::AbstractMatrix, r::AbstractVector; fillzero=true, kwar
a = start_assemble(K, r; fillzero=fillzero)
return KeReAssembler(a; kwargs...)
end
function KeReAssembler(a::FerriteSparseAssemblers; apply_zero=nothing, ch=nothing, scaling=NoScaling())
function KeReAssembler(a::Ferrite.AbstractAssembler; apply_zero=nothing, ch=nothing, scaling=NoScaling())
reset_scaling!(scaling)
if !isnothing(ch) && isnothing(apply_zero)
throw(ArgumentError("apply_zero must be specified when `ch` is given"))
Expand Down

0 comments on commit 0559714

Please sign in to comment.