From c57eec1ce822a06b926819bc918febc8b46cbd30 Mon Sep 17 00:00:00 2001 From: Tristan Montoya Date: Thu, 3 Oct 2024 21:28:57 +0200 Subject: [PATCH] add more docs --- docs/src/SpatialDiscretizations.md | 29 ++++++++++- .../SpatialDiscretizations.jl | 50 +++++++++++++++---- 2 files changed, 68 insertions(+), 11 deletions(-) diff --git a/docs/src/SpatialDiscretizations.md b/docs/src/SpatialDiscretizations.md index 856f73b7..60c2fa57 100644 --- a/docs/src/SpatialDiscretizations.md +++ b/docs/src/SpatialDiscretizations.md @@ -17,4 +17,31 @@ In order to define the different geometric reference elements, existing subtypes ``` These element types are used in the constructor for StableSpectralElements.jl's `ReferenceApproximation` type, along with a subtype of `AbstractApproximationType` specifying the nature of the local approximation (and, optionally, the associated volume and facet quadrature rules). -All the information used to define the spatial discretization on the physical domain $\Omega$ is contained within a `SpatialDiscretization` structure, which is constructed using a `ReferenceApproximation` and a `MeshData` from StartUpDG.jl, which are stored as the fields `reference_approximation` and `mesh`. When the constructor for a `SpatialDiscretization` is called, the grid metrics are computed and stored in a `GeometricFactors` structure, with the corresponding field being `geometric_factors`. \ No newline at end of file +All the information used to define the spatial discretization on the physical domain $\Omega$ is contained within a `SpatialDiscretization` structure, which is constructed using a `ReferenceApproximation` and a `MeshData` from StartUpDG.jl, which are stored as the fields `reference_approximation` and `mesh`. When the constructor for a `SpatialDiscretization` is called, the grid metrics are computed and stored in a `GeometricFactors` structure, with the corresponding field being `geometric_factors`. + +## Approximation types +Listed below are approximation types supported by StableSpectralElements.jl. + +### Tensor-product operators +The following subtypes of `AbstractTensorProduct <: AbstractApproximationType` employ tensor-product operators. + +```@meta +CurrentModule = SpatialDiscretizations +``` +```@docs + NodalTensor + ModalTensor +``` + +### Multidimensional operators +The following subtypes of `AbstractMultidimensional <: AbstractApproximationType` employ multidimensional operators. + +```@meta +CurrentModule = SpatialDiscretizations +``` +```@docs + NodalMulti + ModalMulti + NodalMultiDiagE + ModalMultiDiagE +``` \ No newline at end of file diff --git a/src/SpatialDiscretizations/SpatialDiscretizations.jl b/src/SpatialDiscretizations/SpatialDiscretizations.jl index 13cf603c..97e04557 100644 --- a/src/SpatialDiscretizations/SpatialDiscretizations.jl +++ b/src/SpatialDiscretizations/SpatialDiscretizations.jl @@ -68,37 +68,67 @@ export AbstractApproximationType, abstract type AbstractApproximationType end abstract type AbstractTensorProduct <: AbstractApproximationType end abstract type AbstractMultidimensional <: AbstractApproximationType end +@doc raw""" + NodalTensor(p::Int) -"""Nodal approximation using tensor-product operators""" +Approximation type for a nodal formulation based on tensor-product volume and facet +quadrature rules. +""" struct NodalTensor <: AbstractTensorProduct p::Int end -"""Modal approximation using tensor-product operators""" +@doc raw""" + ModalTensor(p::Int) + +Approximation type for a modal formulation based on tensor-product volume and facet +quadrature rules. +""" struct ModalTensor <: AbstractTensorProduct p::Int end -"""Modal approximation using multidimensional operators""" -struct ModalMulti <: AbstractMultidimensional - p::Int -end +@doc raw""" + NodalMulti(p::Int) -"""Nodal approximation using multidimensional operators""" +Approximation type for a nodal formulation based on multidimensional volume and facet +quadrature rules. +""" struct NodalMulti <: AbstractMultidimensional p::Int end -"""Modal approximation using diagonal-E SBP operators""" -struct ModalMultiDiagE <: AbstractMultidimensional +@doc raw""" + ModalMulti(p::Int) + +Approximation type for a modal formulation based on a multidimensional volume and facet +quadrature rules. +""" +struct ModalMulti <: AbstractMultidimensional p::Int end -"""Nodal approximation using diagonal-E SBP operators""" +@doc raw""" + NodalMultiDiagE(p::Int) + +Approximation type for a nodal formulation based on a multidimensional volume quadrature +rule including nodes collocated with those used for facet integration. +""" struct NodalMultiDiagE <: AbstractMultidimensional p::Int end +@doc raw""" + ModalMultiDiagE(p::Int) + +Approximation type for a modal formulation based on a multidimensional volume quadrature +rule including nodes collocated with those used for facet integration. +""" +struct ModalMultiDiagE <: AbstractMultidimensional + p::Int +end + + """Collapsed coordinate mapping χ: [-1,1]ᵈ → Ωᵣ""" abstract type AbstractReferenceMapping end struct NoMapping <: AbstractReferenceMapping end