Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove intermediate vector in ConstraintHandler #485

Merged
merged 1 commit into from
Sep 25, 2022
Merged
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
4 changes: 1 addition & 3 deletions src/Dofs/ConstraintHandler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,9 @@ function _add!(ch::ConstraintHandler, dbc::Dirichlet, bcfaces::Set{Index}, inter

# loop over all the faces in the set and add the global dofs to `constrained_dofs`
constrained_dofs = Int[]
redundant_faces = Index[]
for (cellidx, faceidx) in bcfaces
if cellidx ∉ cellset
push!(redundant_faces, Index(cellidx, faceidx)) # will be removed from dbc
delete!(dbc.faces, Index(cellidx, faceidx))
continue # skip faces that are not part of the cellset
end
_celldofs = fill(0, ndofs_per_cell(ch.dh, cellidx))
Expand All @@ -269,7 +268,6 @@ function _add!(ch::ConstraintHandler, dbc::Dirichlet, bcfaces::Set{Index}, inter
@debug println("adding dofs $(_celldofs[local_face_dofs[r]]) to dbc")
end

setdiff!(dbc.faces, redundant_faces)
# save it to the ConstraintHandler
push!(ch.dbcs, dbc)
push!(ch.bcvalues, bcvalue)
Expand Down