diff --git a/src/abstract_types.jl b/src/abstract_types.jl index 9b3751407b..3dd3b7f413 100644 --- a/src/abstract_types.jl +++ b/src/abstract_types.jl @@ -9,4 +9,30 @@ abstract type AbstractSemidiscretization end abstract type AbstractEquations{NDIMS, NVARS} end +# abstract supertype of specific SBP bases such as a Lobatto-Legendre nodal basis +abstract type AbstractBasisSBP{RealT<:Real} end + + +# abstract supertype of mortar methods, e.g. using L² projections +abstract type AbstractMortar{RealT<:Real} end + +# abstract supertype of mortar methods using L² projection +# which will be specialized for different SBP bases +abstract type MortarL2{RealT<:Real} <: AbstractMortar{RealT} end + + +# abstract supertype of functionality related to the analysis of +# numerical solutions, e.g. the calculation of errors +abstract type SolutionAnalyzer{RealT<:Real} end + + +# abstract supertype of grid-transfer methods used for AMR, +# e.g. refinement and coarsening based on L² projections +abstract type AdaptorAMR{RealT<:Real} end + +# abstract supertype of AMR grid-transfer operations using L² projections +# which will be specialized for different SBP bases +abstract type AdaptorL2{RealT<:Real} <: AdaptorAMR{RealT} end + + # TODO: Taal decide, which abstract types shall be defined here? diff --git a/src/solvers/dg/lobatto_legendre.jl b/src/solvers/dg/basis_lobatto_legendre.jl similarity index 100% rename from src/solvers/dg/lobatto_legendre.jl rename to src/solvers/dg/basis_lobatto_legendre.jl diff --git a/src/solvers/dg/dg.jl b/src/solvers/dg/dg.jl index 39a2481e4c..1a2b938ac8 100644 --- a/src/solvers/dg/dg.jl +++ b/src/solvers/dg/dg.jl @@ -129,13 +129,12 @@ end -abstract type AbstractBasisSBP{RealT<:Real} end - -abstract type AbstractMortar{RealT<:Real} end - -abstract type MortarL2{RealT<:Real} <: AbstractMortar{RealT} end - +""" + DG(basis, basis, surface_flux, volume_integral) +Create a discontinuous Galerkin method. +If `basis isa LobattoLegendreBasis`, this creates a [`DGSEM`](@ref). +""" struct DG{RealT, Basis<:AbstractBasisSBP{RealT}, Mortar, SurfaceFlux, VolumeIntegral} basis::Basis mortar::Mortar @@ -226,12 +225,6 @@ end # Used for analyze_solution -abstract type SolutionAnalyzer{RealT<:Real} end - -abstract type AdaptorAMR{RealT<:Real} end - -abstract type AdaptorL2{RealT<:Real} <: AdaptorAMR{RealT} end - SolutionAnalyzer(dg::DG; kwargs...) = SolutionAnalyzer(dg.basis; kwargs...) AdaptorAMR(mesh, dg::DG) = AdaptorL2(dg.basis) @@ -241,7 +234,7 @@ AdaptorAMR(mesh, dg::DG) = AdaptorL2(dg.basis) # Include utilities include("interpolation.jl") include("l2projection.jl") -include("lobatto_legendre.jl") +include("basis_lobatto_legendre.jl") """ DGSEM([RealT=Float64,] polydeg::Integer,