Skip to content

Commit

Permalink
Merge branch 'sc/converters_coupling' of github.com:trixi-framework/T…
Browse files Browse the repository at this point in the history
…rixi.jl into sc/converters_coupling
  • Loading branch information
SimonCan committed Dec 11, 2023
2 parents b4493a2 + 0e7fd19 commit 98f7eed
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/semidiscretization/semidiscretization_coupled.jl
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ function mesh_equations_solver_cache(other_semi_index, i, semi_, semi_tuple...)
if i == other_semi_index
return mesh_equations_solver_cache(semi_)
else
# Walk through semidiscretizations until we find `i`
mesh_equations_solver_cache(other_semi_index, i + 1, semi_tuple...)
end
end
Expand Down Expand Up @@ -560,11 +561,14 @@ function copy_to_coupled_boundary!(boundary_condition::BoundaryConditionCoupled{
element_id = linear_indices[i_cell, j_cell]

for element_id in eachnode(solver)
x = @view cache.elements.node_coordinates[:, i_node, j_node,
linear_indices[i_cell, j_cell]]
u_node = u[:, i_node, j_node, linear_indices[i_cell, j_cell]]
x = get_node_coords(node_coordinates, equations, solver, i_node, j_node,
linear_indices[i_cell, j_cell])
u_node = get_node_vars(u, equations, solver, i_node, j_node,
linear_indices[i_cell, j_cell]]
converted_u = coupling_converter(x, u_node)
u_boundary[:, element_id, cell] = converted_u
@inbounds for i in eachindex(converted_u)
u_boundary[i, element_id, cell] = converted_u[i]
end
i_node += i_node_step
j_node += j_node_step
end
Expand Down

0 comments on commit 98f7eed

Please sign in to comment.