Skip to content

Commit

Permalink
Minor to fix tests with julia 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fverdugo committed Jul 17, 2024
1 parent 2f61cd7 commit 7fa9fb7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gallery.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,16 @@ function laplacian_fem(
for cartesian_cell in cartesian_cells
for cartesian_local_node_i in cartesian_local_nodes
local_node_i = cartesian_local_node_to_local_node[cartesian_local_node_i]
cartesian_node_i = cartesian_cell .+ cartesian_local_node_i .- offset
# This is ugly to support Julia 1.6 (idem below)
cartesian_node_i = CartesianIndex(Tuple(cartesian_cell) .+ Tuple(cartesian_local_node_i) .- Tuple(offset))
boundary = any(map(is_boundary_node,Tuple(cartesian_node_i),nodes_per_dir))
if boundary
continue
end
node_i = cartesian_node_to_node[cartesian_node_i]
for cartesian_local_node_j in cartesian_local_nodes
local_node_j = cartesian_local_node_to_local_node[cartesian_local_node_j]
cartesian_node_j = cartesian_cell .+ cartesian_local_node_j .- offset
cartesian_node_j = CartesianIndex(Tuple(cartesian_cell) .+ Tuple(cartesian_local_node_j) .- Tuple(offset))
boundary = any(map(is_boundary_node,Tuple(cartesian_node_j),nodes_per_dir))
if boundary
continue
Expand All @@ -194,15 +195,15 @@ function laplacian_fem(
for cartesian_cell in cartesian_cells
for cartesian_local_node_i in cartesian_local_nodes
local_node_i = cartesian_local_node_to_local_node[cartesian_local_node_i]
cartesian_node_i = cartesian_cell .+ cartesian_local_node_i .- offset
cartesian_node_i = CartesianIndex(Tuple(cartesian_cell) .+ Tuple(cartesian_local_node_i) .- Tuple(offset))
boundary = any(map(is_boundary_node,Tuple(cartesian_node_i),nodes_per_dir))
if boundary
continue
end
node_i = cartesian_node_to_node[cartesian_node_i]
for cartesian_local_node_j in cartesian_local_nodes
local_node_j = cartesian_local_node_to_local_node[cartesian_local_node_j]
cartesian_node_j = cartesian_cell .+ cartesian_local_node_j .- offset
cartesian_node_j = CartesianIndex(Tuple(cartesian_cell) .+ Tuple(cartesian_local_node_j) .- Tuple(offset))
boundary = any(map(is_boundary_node,Tuple(cartesian_node_j),nodes_per_dir))
if boundary
continue
Expand Down

0 comments on commit 7fa9fb7

Please sign in to comment.