@@ -302,7 +302,8 @@ function init_interfaces!(interfaces, elements, mesh::TreeMesh3D)
302302end
303303
304304# Container data structure (structure-of-arrays style) for DG boundaries
305- mutable struct BoundaryContainer3D{RealT <: Real , uEltype <: Real } <: AbstractContainer
305+ mutable struct TreeBoundaryContainer3D{RealT <: Real , uEltype <: Real } < :
306+ AbstractTreeBoundaryContainer
306307 u:: Array{uEltype, 5} # [leftright, variables, i, j, boundaries]
307308 neighbor_ids:: Vector{Int} # [boundaries]
308309 orientations:: Vector{Int} # [boundaries]
@@ -314,12 +315,8 @@ mutable struct BoundaryContainer3D{RealT <: Real, uEltype <: Real} <: AbstractCo
314315 _node_coordinates:: Vector{RealT}
315316end
316317
317- nvariables (boundaries:: BoundaryContainer3D ) = size (boundaries. u, 2 )
318- nnodes (boundaries:: BoundaryContainer3D ) = size (boundaries. u, 3 )
319- Base. eltype (boundaries:: BoundaryContainer3D ) = eltype (boundaries. u)
320-
321318# See explanation of Base.resize! for the element container
322- function Base. resize! (boundaries:: BoundaryContainer3D , capacity)
319+ function Base. resize! (boundaries:: TreeBoundaryContainer3D , capacity)
323320 n_nodes = nnodes (boundaries)
324321 n_variables = nvariables (boundaries)
325322 @unpack _u, _node_coordinates,
@@ -342,9 +339,9 @@ function Base.resize!(boundaries::BoundaryContainer3D, capacity)
342339 return nothing
343340end
344341
345- function BoundaryContainer3D {RealT, uEltype} (capacity:: Integer , n_variables,
346- n_nodes) where {RealT <: Real ,
347- uEltype <: Real }
342+ function TreeBoundaryContainer3D {RealT, uEltype} (capacity:: Integer , n_variables,
343+ n_nodes) where {RealT <: Real ,
344+ uEltype <: Real }
348345 nan_RealT = convert (RealT, NaN )
349346 nan_uEltype = convert (uEltype, NaN )
350347
@@ -365,24 +362,21 @@ function BoundaryContainer3D{RealT, uEltype}(capacity::Integer, n_variables,
365362
366363 n_boundaries_per_direction = SVector (0 , 0 , 0 , 0 , 0 , 0 )
367364
368- return BoundaryContainer3D {RealT, uEltype} (u, neighbor_ids, orientations,
369- neighbor_sides,
370- node_coordinates,
371- n_boundaries_per_direction,
372- _u, _node_coordinates)
365+ return TreeBoundaryContainer3D {RealT, uEltype} (u, neighbor_ids, orientations,
366+ neighbor_sides,
367+ node_coordinates,
368+ n_boundaries_per_direction,
369+ _u, _node_coordinates)
373370end
374371
375- # Return number of boundaries
376- nboundaries (boundaries:: BoundaryContainer3D ) = length (boundaries. orientations)
377-
378372# Create boundaries container and initialize boundary data in `elements`.
379373function init_boundaries (cell_ids, mesh:: TreeMesh3D ,
380374 elements:: ElementContainer3D )
381375 # Initialize container
382376 n_boundaries = count_required_boundaries (mesh, cell_ids)
383- boundaries = BoundaryContainer3D {real(elements), eltype(elements)} (n_boundaries,
384- nvariables (elements),
385- nnodes (elements))
377+ boundaries = TreeBoundaryContainer3D {real(elements), eltype(elements)} (n_boundaries,
378+ nvariables (elements),
379+ nnodes (elements))
386380
387381 # Connect elements with boundaries
388382 init_boundaries! (boundaries, elements, mesh)
0 commit comments