Skip to content

Commit

Permalink
Reverted coupling semidiscretization to the main branch's by hand.
Browse files Browse the repository at this point in the history
This should be part of a different PR.
  • Loading branch information
SimonCan committed Nov 9, 2023
1 parent 9656d8b commit 134917d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/semidiscretization/semidiscretization_coupled.jl
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,8 @@ mutable struct BoundaryConditionCoupled{NDIMS, NDIMST2M1, uEltype <: Real, Indic
other_semi_index :: Int
other_orientation :: Int
indices :: Indices
coupling_converter :: Function

function BoundaryConditionCoupled(other_semi_index, indices, uEltype, coupling_converter)
function BoundaryConditionCoupled(other_semi_index, indices, uEltype)
NDIMS = length(indices)
u_boundary = Array{uEltype, NDIMS * 2 - 1}(undef, ntuple(_ -> 0, NDIMS * 2 - 1))

Expand All @@ -386,7 +385,7 @@ mutable struct BoundaryConditionCoupled{NDIMS, NDIMST2M1, uEltype <: Real, Indic
end

new{NDIMS, NDIMS * 2 - 1, uEltype, typeof(indices)}(u_boundary, other_semi_index,
other_orientation, indices, coupling_converter)
other_orientation, indices)
end
end

Expand Down Expand Up @@ -496,12 +495,9 @@ function copy_to_coupled_boundary!(boundary_condition::BoundaryConditionCoupled{

for i in eachnode(solver)
for v in 1:size(u, 1)
x = cache.elements.node_coordinates[:, i_node, j_node, linear_indices[i_cell, j_cell]]
converted_u = boundary_condition.coupling_converter(x, u[:, i_node, j_node, linear_indices[i_cell, j_cell]])
boundary_condition.u_boundary[v, i, cell] = converted_u[v]
# boundary_condition.u_boundary[v, i, cell] = u[v, i_node, j_node,
# linear_indices[i_cell,
# j_cell]]
boundary_condition.u_boundary[v, i, cell] = u[v, i_node, j_node,
linear_indices[i_cell,
j_cell]]
end
i_node += i_node_step
j_node += j_node_step
Expand Down

0 comments on commit 134917d

Please sign in to comment.