Skip to content

Commit

Permalink
Reverting changes to original state.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Markert committed May 10, 2024
1 parent 3e8a8b5 commit 3158c44
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 17 deletions.
20 changes: 14 additions & 6 deletions src/solvers/dgsem_t8code/containers_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# we need to opt-in explicitly.
# See https://ranocha.de/blog/Optimizing_EC_Trixi for further details.
@muladd begin
#! format: off
#! format: noindent

# Interpolate tree_node_coordinates to each quadrant at the specified nodes.
function calc_node_coordinates!(node_coordinates,
Expand Down Expand Up @@ -41,14 +41,22 @@ function calc_node_coordinates!(node_coordinates,
t8_element_vertex_reference_coords(eclass_scheme, element, 0,
pointer(element_coords))

nodes_out_x = 2 * (element_length * 1 / 2 * (nodes .+ 1) .+ element_coords[1]) .- 1
nodes_out_y = 2 * (element_length * 1 / 2 * (nodes .+ 1) .+ element_coords[2]) .- 1
nodes_out_x = 2 *
(element_length * 1 / 2 * (nodes .+ 1) .+ element_coords[1]) .-
1
nodes_out_y = 2 *
(element_length * 1 / 2 * (nodes .+ 1) .+ element_coords[2]) .-
1

polynomial_interpolation_matrix!(matrix1, mesh.nodes, nodes_out_x, baryweights_in)
polynomial_interpolation_matrix!(matrix2, mesh.nodes, nodes_out_y, baryweights_in)
polynomial_interpolation_matrix!(matrix1, mesh.nodes, nodes_out_x,
baryweights_in)
polynomial_interpolation_matrix!(matrix2, mesh.nodes, nodes_out_y,
baryweights_in)

multiply_dimensionwise!(view(node_coordinates, :, :, :, current_index += 1),
matrix1, matrix2, view(mesh.tree_node_coordinates, :, :, :, global_itree + 1),
matrix1, matrix2,
view(mesh.tree_node_coordinates, :, :, :,
global_itree + 1),
tmp1)
end
end
Expand Down
34 changes: 23 additions & 11 deletions src/solvers/dgsem_t8code/containers_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# we need to opt-in explicitly.
# See https://ranocha.de/blog/Optimizing_EC_Trixi for further details.
@muladd begin
#! format: off
#! format: noindent

# Interpolate tree_node_coordinates to each quadrant at the specified nodes
function calc_node_coordinates!(node_coordinates,
Expand Down Expand Up @@ -43,17 +43,29 @@ function calc_node_coordinates!(node_coordinates,
t8_element_vertex_reference_coords(eclass_scheme, element, 0,
pointer(element_coords))

nodes_out_x = (2 * (element_length * 0.5 * (nodes .+ 1) .+ element_coords[1]) .- 1)
nodes_out_y = (2 * (element_length * 0.5 * (nodes .+ 1) .+ element_coords[2]) .- 1)
nodes_out_z = (2 * (element_length * 0.5 * (nodes .+ 1) .+ element_coords[3]) .- 1)

polynomial_interpolation_matrix!(matrix1, mesh.nodes, nodes_out_x, baryweights_in)
polynomial_interpolation_matrix!(matrix2, mesh.nodes, nodes_out_y, baryweights_in)
polynomial_interpolation_matrix!(matrix3, mesh.nodes, nodes_out_z, baryweights_in)

multiply_dimensionwise!(view(node_coordinates, :, :, :, :, current_index += 1),
nodes_out_x = (2 *
(element_length * 0.5 * (nodes .+ 1) .+ element_coords[1]) .-
1)
nodes_out_y = (2 *
(element_length * 0.5 * (nodes .+ 1) .+ element_coords[2]) .-
1)
nodes_out_z = (2 *
(element_length * 0.5 * (nodes .+ 1) .+ element_coords[3]) .-
1)

polynomial_interpolation_matrix!(matrix1, mesh.nodes, nodes_out_x,
baryweights_in)
polynomial_interpolation_matrix!(matrix2, mesh.nodes, nodes_out_y,
baryweights_in)
polynomial_interpolation_matrix!(matrix3, mesh.nodes, nodes_out_z,
baryweights_in)

multiply_dimensionwise!(view(node_coordinates, :, :, :, :,
current_index += 1),
matrix1, matrix2, matrix3,
view(mesh.tree_node_coordinates, :, :, :, :, global_itree + 1), tmp1)
view(mesh.tree_node_coordinates, :, :, :, :,
global_itree + 1),
tmp1)
end
end

Expand Down

0 comments on commit 3158c44

Please sign in to comment.