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
2 changes: 1 addition & 1 deletion examples/Example212_PeriodicBoundary2D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function main(;
return nothing
end

coupling_matrix = get_periodic_coupling_matrix(FES, xgrid, reg_left, reg_right, give_opposite!)
coupling_matrix = get_periodic_coupling_matrix(FES, reg_left, reg_right, give_opposite!)
display(coupling_matrix)
assign_operator!(PD, CombineDofs(u, u, coupling_matrix; kwargs...))
end
Expand Down
2 changes: 1 addition & 1 deletion examples/Example312_PeriodicBoundary3D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function main(;
y[1] = width - x[1]
return nothing
end
coupling_matrix = get_periodic_coupling_matrix(FES, xgrid, reg_left, reg_right, give_opposite!)
coupling_matrix = get_periodic_coupling_matrix(FES, reg_left, reg_right, give_opposite!)
display(coupling_matrix)
assign_operator!(PD, CombineDofs(u, u, coupling_matrix; kwargs...))
end
Expand Down
4 changes: 4 additions & 0 deletions src/helper_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ function _get_periodic_coupling_matrix(
fe_vector.entries[local_dof] = 1.0

# interpolate on the opposite boundary using x_trafo = give_opposite
if !haskey(search_areas, face_numbers_of_bfaces[i_boundary_face])
throw("face $(face_numbers_of_bfaces[i_boundary_face]) is not on source boundary. Are the from/to regions and the give_opposite function correct?")
end

interpolate!(
fe_vector_target[1],
ON_FACES, eval_point,
Expand Down
Loading