From ee8a98c73e528dbfbaa56aa81bcdcd2471599e78 Mon Sep 17 00:00:00 2001 From: AbdulazizAhmed Date: Wed, 24 May 2023 21:59:59 +0300 Subject: [PATCH] `ConstraintHandler` for discontinuous interpolations using `get_continuous_interpolation` --- src/Dofs/ConstraintHandler.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dofs/ConstraintHandler.jl b/src/Dofs/ConstraintHandler.jl index 3ea8faafab..c230df6553 100644 --- a/src/Dofs/ConstraintHandler.jl +++ b/src/Dofs/ConstraintHandler.jl @@ -304,7 +304,7 @@ function _local_face_dofs_for_bc(interpolation, field_dim, components, offset, b @assert issorted(components) local_face_dofs = Int[] local_face_dofs_offset = Int[1] - for (_, face) in enumerate(boundaryfunc(interpolation)) + for (_, face) in enumerate(boundaryfunc(IsDiscontinuous(interpolation) ? get_continuous_interpolation(interpolation) : interpolation)) for fdof in face, d in 1:field_dim if d in components push!(local_face_dofs, (fdof-1)*field_dim + d + offset) @@ -845,7 +845,7 @@ function add!(ch::ConstraintHandler, dbc::Dirichlet) EntityType = FaceIndex end CT = getcelltype(ch.dh.grid, first(fh.cellset)) # Same celltype enforced in FieldHandler constructor - bcvalues = BCValues(interpolation, default_interpolation(CT), EntityType) + bcvalues = BCValues(IsDiscontinuous(interpolation) ? get_continuous_interpolation(interpolation) : interpolation , default_interpolation(CT), EntityType) # Recreate the Dirichlet(...) struct with the filtered set and call internal add! filtered_dbc = Dirichlet(dbc.field_name, filtered_set, dbc.f, components) _add!(