From c5f50860c15ce5e4a46a30e4725a68448af102ec Mon Sep 17 00:00:00 2001 From: Tristan Montoya Date: Sat, 5 Oct 2024 23:16:48 +0200 Subject: [PATCH] improve docs --- Project.toml | 2 +- docs/src/SpatialDiscretizations.md | 8 +++----- src/SpatialDiscretizations/SpatialDiscretizations.jl | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Project.toml b/Project.toml index 59454851..c22c9cac 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "StableSpectralElements" uuid = "fb992021-99c7-4c2d-a14b-5e48ac4045b2" authors = ["Tristan Montoya "] -version = "0.2.12" +version = "0.2.13-DEV" [deps] BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" diff --git a/docs/src/SpatialDiscretizations.md b/docs/src/SpatialDiscretizations.md index b6cac29e..df8e23ba 100644 --- a/docs/src/SpatialDiscretizations.md +++ b/docs/src/SpatialDiscretizations.md @@ -1,11 +1,11 @@ # Module `SpatialDiscretizations` ## Overview -Discretizations in StableSpectralElements.jl are constructed by first building a local approximation on a canonical reference element, denoted generically as $\hat{\Omega} \subset \mathbb{R}^d$, and using a bijective transformation $\bm{X}^{(\kappa)} : \hat{\Omega} \rightarrow \Omega^{(\kappa)}$ to construct the approximation on each physical element of the mesh $\{ \Omega^{(\kappa)}\}_{\kappa \in \{1:N_e\}}$ in terms of the associated operators on the reference element. An example of such a mapping is shown below, where we also depict the collapsed coordinate transformation $\bm{\chi} : [-1,1]^d \to \hat{\Omega}$ which may be used to construct operators with a tensor-product structure on the reference simplex. +Discretizations in StableSpectralElements.jl are constructed by first building a local approximation on a canonical reference element, denoted generically as $\hat{\Omega} \subset \mathbb{R}^d$, and using a bijective transformation $\bm{X}^{(\kappa)} : \hat{\Omega} \rightarrow \Omega^{(\kappa)}$ to construct the approximation on each physical element $\Omega^{(\kappa)} \subset \Omega$ of the mesh $\{ \Omega^{(\kappa)}\}_{\kappa \in \{1:N_e\}}$ in terms of the associated operators on the reference element. An example of such a mapping is shown below, where we also depict the collapsed coordinate transformation $\bm{\chi} : [-1,1]^d \to \hat{\Omega}$ which may be used to construct operators with a tensor-product structure on the reference simplex. ![Mesh mapping](./assets/meshmap.svg) -In order to define the different geometric reference elements, existing subtypes of `AbstractElemShape` from StartUpDG.jl (e.g. `Line`, `Quad`, `Hex`, `Tri`, and `Tet`) are used and re-exported by StableSpectralElements.jl. For example, we have +In order to define the different geometric reference elements, the subtypes `Line`, `Quad`, `Hex`, `Tri`, and `Tet` of `AbstractElemShape` from StartUpDG.jl are used and re-exported by StableSpectralElements.jl, representing the following reference domains: ```math \begin{aligned} \hat{\Omega}_{\mathrm{line}} &= [-1,1],\\ @@ -15,9 +15,7 @@ In order to define the different geometric reference elements, existing subtypes \hat{\Omega}_{\mathrm{tet}} &= \big\{ \bm{\xi} \in [-1,1]^3 : \xi_1 + \xi_2 + \xi_3 \leq -1 \big\}. \end{aligned} ``` -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`. +These element types are used in the constructor for StableSpectralElements.jl's [`ReferenceApproximation`](@ref) 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`](@ref) 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`. ## Data types diff --git a/src/SpatialDiscretizations/SpatialDiscretizations.jl b/src/SpatialDiscretizations/SpatialDiscretizations.jl index 91b455c9..bdfb400b 100644 --- a/src/SpatialDiscretizations/SpatialDiscretizations.jl +++ b/src/SpatialDiscretizations/SpatialDiscretizations.jl @@ -149,14 +149,14 @@ struct ConservativeCurlMetrics <: AbstractMetrics end const ChanWilcoxMetrics = ConservativeCurlMetrics @doc raw""" - ReferenceApproximation(approx_type, reference_element, D, V, Vf, R, W, B, V_plot, - reference_mapping) + ReferenceApproximation(approx_type::AbstractReferenceMapping, + element_type::AbstractElemShape, kwargs...) Data structure defining the discretization on the reference element, containing the following fields: - `approx_type::AbstractApproximationType`: Type of operators used for the discretization - on the reference element(`NodalTensor`, `ModalTensor`, `NodalMulti`, `ModalMulti` - `NodalMultiDiagE`, `ModalMultiDiagE`) + on the reference element ([`NodalTensor`](@ref), [`ModalTensor`](@ref), [`NodalMulti`] + (@ref), [`ModalMulti`](@ref), [`NodalMultiDiagE`](@ref), or [`ModalMultiDiagE`](@ref)) - `reference_element::StartUpDG.RefElemData`: Data structure containing quadrature node positions and operators used for defining the mapping from reference to physical space; contains the field `element_type::StartUpDG.AbstractElemShape` which determines the shape