@@ -471,13 +471,6 @@ function init_boundaries!(boundaries, elements, mesh::TreeMesh2D)
471471 return boundaries. n_boundaries_per_direction
472472end
473473
474- abstract type AbstractTreeL2MortarContainer2D <: AbstractTreeL2MortarContainer end
475-
476- # Return number of mortar nodes (L2 mortars are only h-adaptive, not p-adaptive)
477- @inline nnodes (mortars:: AbstractTreeL2MortarContainer2D ) = size (mortars. u_upper, 3 )
478- # Return number of equation variables
479- @inline nvariables (mortars:: AbstractTreeL2MortarContainer2D ) = size (mortars. u_upper, 2 )
480-
481474# Container data structure (structure-of-arrays style) for DG L2 mortars
482475# Positions/directions for orientations = 1, large_sides = 2:
483476# mortar is orthogonal to x-axis, large side is in positive coordinate direction wrt mortar
@@ -489,7 +482,7 @@ abstract type AbstractTreeL2MortarContainer2D <: AbstractTreeL2MortarContainer e
489482# lower = 1 | |
490483# | |
491484mutable struct TreeL2MortarContainer2D{uEltype <: Real } < :
492- AbstractTreeL2MortarContainer2D
485+ AbstractTreeL2MortarContainer
493486 u_upper:: Array{uEltype, 4} # [leftright, variables, i, mortars]
494487 u_lower:: Array{uEltype, 4} # [leftright, variables, i, mortars]
495488 neighbor_ids:: Array{Int, 2} # [position, mortars]
@@ -502,6 +495,11 @@ mutable struct TreeL2MortarContainer2D{uEltype <: Real} <:
502495 _neighbor_ids:: Vector{Int}
503496end
504497
498+ # Return number of mortar nodes (L2 mortars are only h-adaptive, not p-adaptive)
499+ @inline nnodes (mortars:: TreeL2MortarContainer2D ) = size (mortars. u_upper, 3 )
500+ # Return number of equation variables
501+ @inline nvariables (mortars:: TreeL2MortarContainer2D ) = size (mortars. u_upper, 2 )
502+
505503# See explanation of Base.resize! for the element container
506504function Base. resize! (mortars:: TreeL2MortarContainer2D , capacity)
507505 n_nodes = nnodes (mortars)
741739
742740# Container data structure (structure-of-arrays style) for DG MPI interfaces
743741mutable struct TreeMPIInterfaceContainer2D{uEltype <: Real } < :
744- AbstractTreeInterfaceContainer
742+ AbstractTreeMPIInterfaceContainer
745743 u:: Array{uEltype, 4} # [leftright, variables, i, interfaces]
746744 # Note: `local_neighbor_ids` stores the MPI-local neighbors, but with globally valid index!
747745 local_neighbor_ids:: Vector{Int} # [interfaces]
@@ -789,12 +787,6 @@ function TreeMPIInterfaceContainer2D{uEltype}(capacity::Integer, n_variables,
789787 remote_sides, _u)
790788end
791789
792- # TODO : Taal, rename to ninterfaces?
793- # Return number of interfaces
794- @inline function nmpiinterfaces (mpi_interfaces:: TreeMPIInterfaceContainer2D )
795- length (mpi_interfaces. orientations)
796- end
797-
798790# Create MPI interface container and initialize MPI interface data in `elements`.
799791function init_mpi_interfaces (cell_ids, mesh:: TreeMesh2D ,
800792 elements:: TreeElementContainer2D )
913905# lower = 1 | |
914906# | |
915907mutable struct TreeMPIL2MortarContainer2D{uEltype <: Real } < :
916- AbstractTreeL2MortarContainer2D
908+ AbstractTreeL2MPIMortarContainer
917909 u_upper:: Array{uEltype, 4} # [leftright, variables, i, mortars]
918910 u_lower:: Array{uEltype, 4} # [leftright, variables, i, mortars]
919911 # Note: `local_neighbor_ids` stores the MPI-local neighbors, but with globally valid index!
@@ -927,6 +919,11 @@ mutable struct TreeMPIL2MortarContainer2D{uEltype <: Real} <:
927919 _u_lower:: Vector{uEltype}
928920end
929921
922+ # Return number of mortar nodes (L2 mortars are only h-adaptive, not p-adaptive)
923+ @inline nnodes (mortars:: TreeMPIL2MortarContainer2D ) = size (mortars. u_upper, 3 )
924+ # Return number of equation variables
925+ @inline nvariables (mortars:: TreeMPIL2MortarContainer2D ) = size (mortars. u_upper, 2 )
926+
930927# See explanation of Base.resize! for the element container
931928function Base. resize! (mpi_mortars:: TreeMPIL2MortarContainer2D , capacity)
932929 n_nodes = nnodes (mpi_mortars)
@@ -979,11 +976,6 @@ function TreeMPIL2MortarContainer2D{uEltype}(capacity::Integer, n_variables,
979976 _u_upper, _u_lower)
980977end
981978
982- # Return number of L2 mortars
983- @inline function nmpimortars (mpi_l2mortars:: TreeMPIL2MortarContainer2D )
984- length (mpi_l2mortars. orientations)
985- end
986-
987979# Create MPI mortar container and initialize MPI mortar data in `elements`.
988980function init_mpi_mortars (cell_ids, mesh:: TreeMesh2D ,
989981 elements:: TreeElementContainer2D ,
0 commit comments