Skip to content

Commit 64702ba

Browse files
committed
Updated docstring to explain split form and weights more clearly
1 parent 4cf70b4 commit 64702ba

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/Operators/spectralelement.jl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,15 +655,26 @@ The split form is defined as the arithmetic mean of the conservative form and th
655655
```
656656
657657
## Discrete (SBP)
658-
The implementation uses the Summation-By-Parts (SBP) property of the spectral element derivative matrix ``D``. The divergence is computed locally on the reference element as:
658+
The implementation uses the generalized summation-by-parts (SBP) property, where the divergence is the inverse of the mass matrix acting on the stiffness matrix. Let \\delta V_i = w_i J_i be the physical volume element (weights w, Jacobian J) and Q be the skew-symmetric stiffness matrix. The divergence is:
659+
```math
660+
(Div_{split})_i = \\frac{1}{\\delta V_i} \\sum_j Q_{ij} F_{ij}
661+
```
662+
where F_{ij} is the symmetric two-point flux.
663+
664+
**Reduction to differentiation matrix form:** For Legendre-Gauss-Lobatto (LGL) elements, the stiffness matrix satisfies Q_{ij} = w_i D_{ij}. Substituting this into the equation above, the quadrature weights w_i cancel out:
665+
```math
666+
\\frac{1}{w_i J_i} \\sum_j (w_i D_{ij}) F_{ij} = \\frac{1}{J_i} \\sum_j D_{ij} F_{ij}
667+
```
668+
669+
This is the form implemented in the code:
659670
```math
660671
(Div_{split})_i = \\frac{1}{J_i} \\sum_j D_{ij} F_{ij}
661672
```
662673
where ``F_{ij}`` is the symmetric **two-point flux** between nodes ``i`` and ``j``:
663674
```math
664675
F_{ij} = \\frac{1}{2} \\left( U_i + U_j \\right) (\\psi_i + \\psi_j)
665676
```
666-
Here, ``U`` represents the volume-weighted contravariant flux component (``U^1 = J u^1``). In 2D/3D tensor-product grids, this 1D split operator is
677+
Here, ``U`` represents the Jacobian-weighted contravariant flux component (``U^1 = J u^1``). In 2D/3D tensor-product grids, this 1D split operator is
667678
applied sequentially along each dimension.
668679
669680
# Properties
@@ -799,7 +810,7 @@ for all ``\\phi\\in \\mathcal{V}_0``
799810
```
800811
where ``\\mathcal{V}_0`` is the space of ``u``.
801812
802-
This arises as the contribution of the volume integral after by applying
813+
This arises as the contribution of the volume integral after applying
803814
integration by parts to the weak form expression of the divergence
804815
```math
805816
\\int_\\Omega \\phi (\\nabla \\cdot u) \\, d \\Omega

0 commit comments

Comments
 (0)