Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmontoya committed Oct 5, 2024
1 parent 267cc50 commit c5f5086
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StableSpectralElements"
uuid = "fb992021-99c7-4c2d-a14b-5e48ac4045b2"
authors = ["Tristan Montoya <[email protected]>"]
version = "0.2.12"
version = "0.2.13-DEV"

[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Expand Down
8 changes: 3 additions & 5 deletions docs/src/SpatialDiscretizations.md
Original file line number Diff line number Diff line change
@@ -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],\\
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/SpatialDiscretizations/SpatialDiscretizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5f5086

Please sign in to comment.