Skip to content

Commit

Permalink
hard-code dimension of node coordinates to avoid type instability
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmontoya committed Aug 20, 2024
1 parent e9ec616 commit 7de998a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/solvers/dgsem_p4est/containers_2d_manifold_in_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function calc_node_coordinates_2d_shell!(node_coordinates,
# Hanging nodes will cause holes in the mesh if its polydeg is higher
# than the polydeg of the solver.
@assert length(basis.nodes)>=length(mesh.nodes) "The solver can't have a lower polydeg than the mesh"

@assert size(mesh.tree_node_coordinates, 1)==3 "Shell must use 3D node coordinates"
calc_node_coordinates_2d_shell!(node_coordinates, mesh, basis.nodes)
end

Expand All @@ -162,7 +162,7 @@ function calc_node_coordinates_2d_shell!(node_coordinates,
# places and the additional information passed to the compiler makes them faster
# than native `Array`s.
tmp1 = Trixi.StrideArray(undef, real(mesh),
Trixi.StaticInt(size(mesh.tree_node_coordinates, 1)),
Trixi.StaticInt(3),
Trixi.static_length(nodes),
Trixi.static_length(mesh.nodes))
matrix1 = Trixi.StrideArray(undef, real(mesh),
Expand All @@ -173,7 +173,6 @@ function calc_node_coordinates_2d_shell!(node_coordinates,

# Macros from `p4est`
p4est_root_len = 1 << Trixi.P4EST_MAXLEVEL
p4est_root_len = 1 << Trixi.P4EST_MAXLEVEL
p4est_quadrant_len(l) = 1 << (Trixi.P4EST_MAXLEVEL - l)

trees = Trixi.unsafe_wrap_sc(Trixi.p4est_tree_t, mesh.p4est.trees)
Expand Down

0 comments on commit 7de998a

Please sign in to comment.