diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 4976085a..20ad9363 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-05T21:10:44","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-05T21:25:55","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/ConservationLaws/index.html b/dev/ConservationLaws/index.html index 04057d10..241d66b2 100644 --- a/dev/ConservationLaws/index.html +++ b/dev/ConservationLaws/index.html @@ -2,7 +2,7 @@ ConservationLaws · StableSpectralElements.jl

Module ConservationLaws

Overview

The equations to be solved are defined by subtypes of AbstractConservationLaw on which functions such as physical_flux and numerical_flux are dispatched. Objects of type AbstractConservationLaw contain two type parameters, d and PDEType, the former denoting the spatial dimension of the problem, which is inherited by all subtypes, and the latter being a subtype of AbstractPDEType denoting the particular type of PDE being solved, which is either FirstOrder or SecondOrder. Whereas first-order problems remove the dependence of the flux tensor on the solution gradient in order to obtain systems of the form

\[\partial_t \underline{U}(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \underline{\bm{F}}(\underline{U}(\bm{x},t)) = \underline{0},\]

second-order problems are treated by StableSpectralElements.jl as first-order systems of the form

\[\begin{aligned} \underline{\bm{Q}}(\bm{x},t) - \bm{\nabla}_{\bm{x}} \underline{U}(\bm{x},t) &= \underline{0},\\ \partial_t \underline{U}(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \underline{\bm{F}}(\underline{U}(\bm{x},t), \underline{\bm{Q}}(\bm{x},t)) &= \underline{0}. -\end{aligned}\]

Currently, the linear advection and advection-diffusion equations, the inviscid and viscous Burgers' equations, and the compressible Euler equations are supported by StableSpectralElements.jl, but any system of the above form can in principle be implemented, provided that appropriate physical and numerical fluxes are defined.

Equations

Listed below are partial differential equations supported by StableSpectralElements.jl.

StableSpectralElements.ConservationLaws.LinearAdvectionEquationType
LinearAdvectionEquation(a::NTuple{d,Float64}) where {d}

Define a linear advection equation of the form

\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big( \bm{a} U(\bm{x},t) \big) = 0,\]

with a constant advection velocity $\bm{a} \in \R^d$. A specialized constructor LinearAdvectionEquation(a::Float64) is provided for the one-dimensional case.

source
StableSpectralElements.ConservationLaws.LinearAdvectionDiffusionEquationType
LinearAdvectionDiffusionEquation(a::NTuple{d,Float64}, b::Float64) where {d}

Define a linear advection-diffusion equation of the form

\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big( \bm{a} U(\bm{x},t) - b \bm{\nabla} U(\bm{x},t)\big) = 0,\]

with a constant advection velocity $\bm{a} \in \R^d$ and diffusion coefficient $b \in \R^+$. A specialized constructor LinearAdvectionDiffusionEquation(a::Float64, b::Float64) is provided for the one-dimensional case.

source
StableSpectralElements.ConservationLaws.InviscidBurgersEquationType
InviscidBurgersEquation(a::NTuple{d,Float64}) where {d}

Define an inviscid Burgers' equation of the form

\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big(\tfrac{1}{2}\bm{a} U(\bm{x},t)^2 \big) = 0,\]

where $\bm{a} \in \R^d$. A specialized constructor InviscidBurgersEquation() is provided for the one-dimensional case with a = (1.0,).

source
StableSpectralElements.ConservationLaws.ViscousBurgersEquationType
ViscousBurgersEquation(a::NTuple{d,Float64}, b::Float64) where {d}

Define a viscous Burgers' equation of the form

\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big(\tfrac{1}{2}\bm{a} U(\bm{x},t)^2 - b \bm{\nabla} U(\bm{x},t)\big) = 0,\]

where $\bm{a} \in \R^d$ and $b \in \R^+$. A specialized constructor ViscousBurgersEquation(b::Float64) is provided for the one-dimensional case with a = (1.0,).

source
StableSpectralElements.ConservationLaws.EulerEquationsType
EulerEquations{d}(γ::Float64) where {d}

Define an Euler system governing compressible, adiabatic fluid flow, taking the form

\[\frac{\partial}{\partial t}\left[\begin{array}{c} +\end{aligned}\]

Currently, the linear advection and advection-diffusion equations, the inviscid and viscous Burgers' equations, and the compressible Euler equations are supported by StableSpectralElements.jl, but any system of the above form can in principle be implemented, provided that appropriate physical and numerical fluxes are defined.

Equations

Listed below are partial differential equations supported by StableSpectralElements.jl.

StableSpectralElements.ConservationLaws.LinearAdvectionEquationType
LinearAdvectionEquation(a::NTuple{d,Float64}) where {d}

Define a linear advection equation of the form

\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big( \bm{a} U(\bm{x},t) \big) = 0,\]

with a constant advection velocity $\bm{a} \in \R^d$. A specialized constructor LinearAdvectionEquation(a::Float64) is provided for the one-dimensional case.

source
StableSpectralElements.ConservationLaws.LinearAdvectionDiffusionEquationType
LinearAdvectionDiffusionEquation(a::NTuple{d,Float64}, b::Float64) where {d}

Define a linear advection-diffusion equation of the form

\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big( \bm{a} U(\bm{x},t) - b \bm{\nabla} U(\bm{x},t)\big) = 0,\]

with a constant advection velocity $\bm{a} \in \R^d$ and diffusion coefficient $b \in \R^+$. A specialized constructor LinearAdvectionDiffusionEquation(a::Float64, b::Float64) is provided for the one-dimensional case.

source
StableSpectralElements.ConservationLaws.InviscidBurgersEquationType
InviscidBurgersEquation(a::NTuple{d,Float64}) where {d}

Define an inviscid Burgers' equation of the form

\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big(\tfrac{1}{2}\bm{a} U(\bm{x},t)^2 \big) = 0,\]

where $\bm{a} \in \R^d$. A specialized constructor InviscidBurgersEquation() is provided for the one-dimensional case with a = (1.0,).

source
StableSpectralElements.ConservationLaws.ViscousBurgersEquationType
ViscousBurgersEquation(a::NTuple{d,Float64}, b::Float64) where {d}

Define a viscous Burgers' equation of the form

\[\partial_t U(\bm{x},t) + \bm{\nabla}_{\bm{x}} \cdot \big(\tfrac{1}{2}\bm{a} U(\bm{x},t)^2 - b \bm{\nabla} U(\bm{x},t)\big) = 0,\]

where $\bm{a} \in \R^d$ and $b \in \R^+$. A specialized constructor ViscousBurgersEquation(b::Float64) is provided for the one-dimensional case with a = (1.0,).

source
StableSpectralElements.ConservationLaws.EulerEquationsType
EulerEquations{d}(γ::Float64) where {d}

Define an Euler system governing compressible, adiabatic fluid flow, taking the form

\[\frac{\partial}{\partial t}\left[\begin{array}{c} \rho(\bm{x}, t) \\ \rho(\bm{x}, t) V_1(\bm{x}, t) \\ \vdots \\ @@ -14,4 +14,4 @@ \vdots \\ \rho(\bm{x}, t) V_d(\bm{x}, t) V_m(\bm{x}, t)+P(\bm{x}, t) \delta_{d m} \\ V_m(\bm{x}, t)(E(\bm{x}, t)+P(\bm{x}, t)) -\end{array}\right]=\underline{0},\]

where $\rho(\bm{x},t) \in \mathbb{R}$ is the fluid density, $\bm{V}(\bm{x},t) \in \mathbb{R}^d$ is the flow velocity, $E(\bm{x},t) \in \mathbb{R}$ is the total energy per unit volume, and the pressure is given for an ideal gas with constant specific heat as

\[P(\bm{x},t) = (\gamma - 1)\Big(E(\bm{x},t) - \frac{1}{2}\rho(\bm{x},t) \lVert \bm{V}(\bm{x},t)\rVert^2\Big).\]

The specific heat ratio is specified as a parameter γ::Float64, which must be greater than unity.

source
+\end{array}\right]=\underline{0},\]

where $\rho(\bm{x},t) \in \mathbb{R}$ is the fluid density, $\bm{V}(\bm{x},t) \in \mathbb{R}^d$ is the flow velocity, $E(\bm{x},t) \in \mathbb{R}$ is the total energy per unit volume, and the pressure is given for an ideal gas with constant specific heat as

\[P(\bm{x},t) = (\gamma - 1)\Big(E(\bm{x},t) - \frac{1}{2}\rho(\bm{x},t) \lVert \bm{V}(\bm{x},t)\rVert^2\Big).\]

The specific heat ratio is specified as a parameter γ::Float64, which must be greater than unity.

source diff --git a/dev/SpatialDiscretizations/index.html b/dev/SpatialDiscretizations/index.html index a8eabdd0..4ee8b693 100644 --- a/dev/SpatialDiscretizations/index.html +++ b/dev/SpatialDiscretizations/index.html @@ -1,9 +1,9 @@ -SpatialDiscretizations · StableSpectralElements.jl

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.

Mesh mapping

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

\[\begin{aligned} +SpatialDiscretizations · StableSpectralElements.jl

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 $\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

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:

\[\begin{aligned} \hat{\Omega}_{\mathrm{line}} &= [-1,1],\\ \hat{\Omega}_{\mathrm{quad}} &= [-1,1]^2,\\ \hat{\Omega}_{\mathrm{hex}} & = [-1,1]^3, \\ \hat{\Omega}_{\mathrm{tri}} &= \big\{ \bm{\xi} \in [-1,1]^2 : \xi_1 + \xi_2 \leq 0 \big\},\\ \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.

Data types

StableSpectralElements.SpatialDiscretizations.ReferenceApproximationType
ReferenceApproximation(approx_type, reference_element, D, V, Vf, R, W, B, V_plot,
-                       reference_mapping)

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)
  • 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 of the reference element (currently, StableSpectralElements.jl supports the options Line,Tri, Quad, Hex, and Tet)
  • D::NTuple{d, <:LinearMap}: Tuple of operators of size N_q by N_q approximating each partial derivative at the volume quadrature nodes
  • V::LinearMap: Generalized Vandermonde matrix of size N_q by N_p mapping solution degrees of freedom to values at volume quadrature nodes
  • Vf::LinearMap: Generalized Vandermonde matrix of size N_f by N_p mapping solution degrees of freedom to values at facet quadrature nodes
  • R::LinearMap: Interpolation/extrapolation operator of size N_f by N_q which maps nodal data from volume quadrature nodes to facet quadrature nodes
  • W::Diagonal: Volume quadrature weight matrix of size N_q by N_q
  • B::Diagonal: Facet quadrature weight matrix of size N_f by N_f
  • V_plot::LinearMap: Generalized Vandermonde matrix mapping solution degrees of freedom to plotting nodes
  • reference_mapping::AbstractReferenceMapping: Optional collapsed coordinate transformation (either ReferenceMapping or NoMapping); if such a mapping is used (i.e. not NoMapping), the discrete derivative operators approximate partial derivatives with respect to components of the collapsed coordinate system

Outer constructors are provided to construct the discrete operators by dispatching on each combination of subtypes of AbstractApproximationTypeandAbstractElementShape`.

source

Approximation types

Listed below are approximation types (i.e. subtypes of AbstractApproximationType) supported by StableSpectralElements.jl.

Tensor-product operators

The following subtypes of AbstractTensorProduct <: AbstractApproximationType employ tensor-product operators.

StableSpectralElements.SpatialDiscretizations.NodalTensorType
NodalTensor(p::Int)

Approximation type for a nodal formulation of polynomial degree $p$ based on tensor-product volume and facet quadrature rules (generalized Vandermonde matrix is identity, derivative and interpolation/extrapolation operators have tensor-product structure).

source
StableSpectralElements.SpatialDiscretizations.ModalTensorType
ModalTensor(p::Int)

Approximation type for a modal formulation of polynomial degree $p$ based on tensor-product volume and facet quadrature rules (generalized Vandermonde matrix is not necessarily identity, derivative and interpolation/extrapolation operators have tensor-product structure).

source

Multidimensional operators

The following subtypes of AbstractMultidimensional <: AbstractApproximationType employ multidimensional operators.

StableSpectralElements.SpatialDiscretizations.ModalMultiType
ModalMulti(p::Int)

Approximation type for a modal formulation of polynomial degree $p$ based on multidimensional volume and facet quadrature rules (generalized Vandermonde, derivative and interpolation/extrapolation operators are all dense).

source
StableSpectralElements.SpatialDiscretizations.NodalMultiDiagEType
NodalMultiDiagE(p::Int)

Approximation type for a nodal formulation of polynomial degree $p$ based on a multidimensional volume quadrature rule including nodes collocated with those used for facet integration (generalized Vandermonde matrix is identity, derivative operator is dense, interpolation/extrapolation operator picks out values at facet quadrature nodes).

source
StableSpectralElements.SpatialDiscretizations.ModalMultiDiagEType
ModalMultiDiagE(p::Int)

Approximation type for a modal formulation based on a multidimensional volume quadrature rule of polynomial degree $p$ including nodes collocated with those used for facet integration (generalized Vandermonde and derivative operators are dense, interpolation/extrapolation operator picks out values at facet quadrature nodes).

source
+\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.

Data types

StableSpectralElements.SpatialDiscretizations.ReferenceApproximationType
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, or ModalMultiDiagE)
  • 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 of the reference element (currently, StableSpectralElements.jl supports the options Line,Tri, Quad, Hex, and Tet)
  • D::NTuple{d, <:LinearMap}: Tuple of operators of size N_q by N_q approximating each partial derivative at the volume quadrature nodes
  • V::LinearMap: Generalized Vandermonde matrix of size N_q by N_p mapping solution degrees of freedom to values at volume quadrature nodes
  • Vf::LinearMap: Generalized Vandermonde matrix of size N_f by N_p mapping solution degrees of freedom to values at facet quadrature nodes
  • R::LinearMap: Interpolation/extrapolation operator of size N_f by N_q which maps nodal data from volume quadrature nodes to facet quadrature nodes
  • W::Diagonal: Volume quadrature weight matrix of size N_q by N_q
  • B::Diagonal: Facet quadrature weight matrix of size N_f by N_f
  • V_plot::LinearMap: Generalized Vandermonde matrix mapping solution degrees of freedom to plotting nodes
  • reference_mapping::AbstractReferenceMapping: Optional collapsed coordinate transformation (either ReferenceMapping or NoMapping); if such a mapping is used (i.e. not NoMapping), the discrete derivative operators approximate partial derivatives with respect to components of the collapsed coordinate system

Outer constructors are provided to construct the discrete operators by dispatching on each combination of subtypes of AbstractApproximationTypeandAbstractElementShape`.

source

Approximation types

Listed below are approximation types (i.e. subtypes of AbstractApproximationType) supported by StableSpectralElements.jl.

Tensor-product operators

The following subtypes of AbstractTensorProduct <: AbstractApproximationType employ tensor-product operators.

StableSpectralElements.SpatialDiscretizations.NodalTensorType
NodalTensor(p::Int)

Approximation type for a nodal formulation of polynomial degree $p$ based on tensor-product volume and facet quadrature rules (generalized Vandermonde matrix is identity, derivative and interpolation/extrapolation operators have tensor-product structure).

source
StableSpectralElements.SpatialDiscretizations.ModalTensorType
ModalTensor(p::Int)

Approximation type for a modal formulation of polynomial degree $p$ based on tensor-product volume and facet quadrature rules (generalized Vandermonde matrix is not necessarily identity, derivative and interpolation/extrapolation operators have tensor-product structure).

source

Multidimensional operators

The following subtypes of AbstractMultidimensional <: AbstractApproximationType employ multidimensional operators.

StableSpectralElements.SpatialDiscretizations.ModalMultiType
ModalMulti(p::Int)

Approximation type for a modal formulation of polynomial degree $p$ based on multidimensional volume and facet quadrature rules (generalized Vandermonde, derivative and interpolation/extrapolation operators are all dense).

source
StableSpectralElements.SpatialDiscretizations.NodalMultiDiagEType
NodalMultiDiagE(p::Int)

Approximation type for a nodal formulation of polynomial degree $p$ based on a multidimensional volume quadrature rule including nodes collocated with those used for facet integration (generalized Vandermonde matrix is identity, derivative operator is dense, interpolation/extrapolation operator picks out values at facet quadrature nodes).

source
StableSpectralElements.SpatialDiscretizations.ModalMultiDiagEType
ModalMultiDiagE(p::Int)

Approximation type for a modal formulation based on a multidimensional volume quadrature rule of polynomial degree $p$ including nodes collocated with those used for facet integration (generalized Vandermonde and derivative operators are dense, interpolation/extrapolation operator picks out values at facet quadrature nodes).

source
diff --git a/dev/index.html b/dev/index.html index deafc4fa..9582ddd1 100644 --- a/dev/index.html +++ b/dev/index.html @@ -22,4 +22,4 @@ pages = {113360}, doi = {10.1016/j.jcp.2024.113360}, year = {2024} -}

License

This software is released under the GPLv3 license.

+}

License

This software is released under the GPLv3 license.

diff --git a/dev/objects.inv b/dev/objects.inv index 99df1aa5..b3c9735f 100644 Binary files a/dev/objects.inv and b/dev/objects.inv differ diff --git a/dev/search_index.js b/dev/search_index.js index 84ce1d1f..2c9cbc5a 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"SpatialDiscretizations/#Module-SpatialDiscretizations","page":"SpatialDiscretizations","title":"Module SpatialDiscretizations","text":"","category":"section"},{"location":"SpatialDiscretizations/#Overview","page":"SpatialDiscretizations","title":"Overview","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"Discretizations in StableSpectralElements.jl are constructed by first building a local approximation on a canonical reference element, denoted generically as hatOmega subset mathbbR^d, and using a bijective transformation bmX^(kappa) hatOmega rightarrow Omega^(kappa) to construct the approximation on each physical element of the mesh Omega^(kappa)_kappa in 1N_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 bmchi -11^d to hatOmega which may be used to construct operators with a tensor-product structure on the reference simplex.","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"(Image: Mesh mapping)","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"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 ","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"beginaligned\nhatOmega_mathrmline = -11\nhatOmega_mathrmquad = -11^2\nhatOmega_mathrmhex = -11^3 \nhatOmega_mathrmtri = big bmxi in -11^2 xi_1 + xi_2 leq 0 big\nhatOmega_mathrmtet = big bmxi in -11^3 xi_1 + xi_2 + xi_3 leq -1 big\nendaligned","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"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).","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"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. ","category":"page"},{"location":"SpatialDiscretizations/#Data-types","page":"SpatialDiscretizations","title":"Data types","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"CurrentModule = SpatialDiscretizations","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":" ReferenceApproximation","category":"page"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.ReferenceApproximation","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.ReferenceApproximation","text":"ReferenceApproximation(approx_type, reference_element, D, V, Vf, R, W, B, V_plot,\n reference_mapping)\n\nData structure defining the discretization on the reference element, containing the following fields:\n\napprox_type::AbstractApproximationType: Type of operators used for the discretization on the reference element(NodalTensor, ModalTensor, NodalMulti, ModalMulti NodalMultiDiagE, ModalMultiDiagE)\nreference_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 of the reference element (currently, StableSpectralElements.jl supports the options Line,Tri, Quad, Hex, and Tet)\nD::NTuple{d, <:LinearMap}: Tuple of operators of size N_q by N_q approximating each partial derivative at the volume quadrature nodes\nV::LinearMap: Generalized Vandermonde matrix of size N_q by N_p mapping solution degrees of freedom to values at volume quadrature nodes\nVf::LinearMap: Generalized Vandermonde matrix of size N_f by N_p mapping solution degrees of freedom to values at facet quadrature nodes\nR::LinearMap: Interpolation/extrapolation operator of size N_f by N_q which maps nodal data from volume quadrature nodes to facet quadrature nodes \nW::Diagonal: Volume quadrature weight matrix of size N_q by N_q\nB::Diagonal: Facet quadrature weight matrix of size N_f by N_f\nV_plot::LinearMap: Generalized Vandermonde matrix mapping solution degrees of freedom to plotting nodes\nreference_mapping::AbstractReferenceMapping: Optional collapsed coordinate transformation (either ReferenceMapping or NoMapping); if such a mapping is used (i.e. not NoMapping), the discrete derivative operators approximate partial derivatives with respect to components of the collapsed coordinate system\n\nOuter constructors are provided to construct the discrete operators by dispatching on each combination of subtypes of AbstractApproximationTypeandAbstractElementShape`. \n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#Approximation-types","page":"SpatialDiscretizations","title":"Approximation types","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"Listed below are approximation types (i.e. subtypes of AbstractApproximationType) supported by StableSpectralElements.jl.","category":"page"},{"location":"SpatialDiscretizations/#Tensor-product-operators","page":"SpatialDiscretizations","title":"Tensor-product operators","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"The following subtypes of AbstractTensorProduct <: AbstractApproximationType employ tensor-product operators.","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"CurrentModule = SpatialDiscretizations","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":" NodalTensor\n ModalTensor","category":"page"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.NodalTensor","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.NodalTensor","text":"NodalTensor(p::Int)\n\nApproximation type for a nodal formulation of polynomial degree p based on tensor-product volume and facet quadrature rules (generalized Vandermonde matrix is identity, derivative and interpolation/extrapolation operators have tensor-product structure).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.ModalTensor","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.ModalTensor","text":"ModalTensor(p::Int)\n\nApproximation type for a modal formulation of polynomial degree p based on tensor-product volume and facet quadrature rules (generalized Vandermonde matrix is not necessarily identity, derivative and interpolation/extrapolation operators have tensor-product structure).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#Multidimensional-operators","page":"SpatialDiscretizations","title":"Multidimensional operators","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"The following subtypes of AbstractMultidimensional <: AbstractApproximationType employ multidimensional operators. ","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"CurrentModule = SpatialDiscretizations","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":" NodalMulti\n ModalMulti\n NodalMultiDiagE\n ModalMultiDiagE","category":"page"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.NodalMulti","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.NodalMulti","text":"NodalMulti(p::Int)\n\nApproximation type for a nodal formulation based on multidimensional volume and facet quadrature rules (generalized Vandermonde matrix is identity, derivative and interpolation/extrapolation operators are dense).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.ModalMulti","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.ModalMulti","text":"ModalMulti(p::Int)\n\nApproximation type for a modal formulation of polynomial degree p based on multidimensional volume and facet quadrature rules (generalized Vandermonde, derivative and interpolation/extrapolation operators are all dense).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.NodalMultiDiagE","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.NodalMultiDiagE","text":"NodalMultiDiagE(p::Int)\n\nApproximation type for a nodal formulation of polynomial degree p based on a multidimensional volume quadrature rule including nodes collocated with those used for facet integration (generalized Vandermonde matrix is identity, derivative operator is dense, interpolation/extrapolation operator picks out values at facet quadrature nodes).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.ModalMultiDiagE","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.ModalMultiDiagE","text":"ModalMultiDiagE(p::Int)\n\nApproximation type for a modal formulation based on a multidimensional volume quadrature rule of polynomial degree p including nodes collocated with those used for facet integration (generalized Vandermonde and derivative operators are dense, interpolation/extrapolation operator picks out values at facet quadrature nodes).\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#Module-ConservationLaws","page":"ConservationLaws","title":"Module ConservationLaws","text":"","category":"section"},{"location":"ConservationLaws/#Overview","page":"ConservationLaws","title":"Overview","text":"","category":"section"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"The equations to be solved are defined by subtypes of AbstractConservationLaw on which functions such as physical_flux and numerical_flux are dispatched. Objects of type AbstractConservationLaw contain two type parameters, d and PDEType, the former denoting the spatial dimension of the problem, which is inherited by all subtypes, and the latter being a subtype of AbstractPDEType denoting the particular type of PDE being solved, which is either FirstOrder or SecondOrder. Whereas first-order problems remove the dependence of the flux tensor on the solution gradient in order to obtain systems of the form","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"partial_t underlineU(bmxt) + bmnabla_bmx cdot underlinebmF(underlineU(bmxt)) = underline0","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"second-order problems are treated by StableSpectralElements.jl as first-order systems of the form ","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"beginaligned\nunderlinebmQ(bmxt) - bmnabla_bmx underlineU(bmxt) = underline0\npartial_t underlineU(bmxt) + bmnabla_bmx cdot underlinebmF(underlineU(bmxt) underlinebmQ(bmxt)) = underline0\nendaligned","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"Currently, the linear advection and advection-diffusion equations, the inviscid and viscous Burgers' equations, and the compressible Euler equations are supported by StableSpectralElements.jl, but any system of the above form can in principle be implemented, provided that appropriate physical and numerical fluxes are defined.","category":"page"},{"location":"ConservationLaws/#Equations","page":"ConservationLaws","title":"Equations","text":"","category":"section"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"Listed below are partial differential equations supported by StableSpectralElements.jl.","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"CurrentModule = ConservationLaws","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":" LinearAdvectionEquation\n LinearAdvectionDiffusionEquation\n InviscidBurgersEquation\n ViscousBurgersEquation\n EulerEquations","category":"page"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.LinearAdvectionEquation","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.LinearAdvectionEquation","text":"LinearAdvectionEquation(a::NTuple{d,Float64}) where {d}\n\nDefine a linear advection equation of the form\n\npartial_t U(bmxt) + bmnabla_bmx cdot big( bma U(bmxt) big) = 0\n\nwith a constant advection velocity bma in R^d. A specialized constructor LinearAdvectionEquation(a::Float64) is provided for the one-dimensional case.\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.LinearAdvectionDiffusionEquation","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.LinearAdvectionDiffusionEquation","text":"LinearAdvectionDiffusionEquation(a::NTuple{d,Float64}, b::Float64) where {d}\n\nDefine a linear advection-diffusion equation of the form\n\npartial_t U(bmxt) + bmnabla_bmx cdot big( bma U(bmxt) - b bmnabla U(bmxt)big) = 0\n\nwith a constant advection velocity bma in R^d and diffusion coefficient b in R^+. A specialized constructor LinearAdvectionDiffusionEquation(a::Float64, b::Float64) is provided for the one-dimensional case.\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.InviscidBurgersEquation","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.InviscidBurgersEquation","text":"InviscidBurgersEquation(a::NTuple{d,Float64}) where {d}\n\nDefine an inviscid Burgers' equation of the form\n\npartial_t U(bmxt) + bmnabla_bmx cdot big(tfrac12bma U(bmxt)^2 big) = 0\n\nwhere bma in R^d. A specialized constructor InviscidBurgersEquation() is provided for the one-dimensional case with a = (1.0,).\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.ViscousBurgersEquation","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.ViscousBurgersEquation","text":"ViscousBurgersEquation(a::NTuple{d,Float64}, b::Float64) where {d}\n\nDefine a viscous Burgers' equation of the form\n\npartial_t U(bmxt) + bmnabla_bmx cdot big(tfrac12bma U(bmxt)^2 - b bmnabla U(bmxt)big) = 0\n\nwhere bma in R^d and b in R^+. A specialized constructor ViscousBurgersEquation(b::Float64) is provided for the one-dimensional case with a = (1.0,).\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.EulerEquations","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.EulerEquations","text":"EulerEquations{d}(γ::Float64) where {d}\n\nDefine an Euler system governing compressible, adiabatic fluid flow, taking the form\n\nfracpartialpartial tleftbeginarrayc\nrho(bmx t) \nrho(bmx t) V_1(bmx t) \nvdots \nrho(bmx t) V_d(bmx t) \nE(bmx t)\nendarrayright+sum_m=1^d fracpartialpartial x_mleftbeginarrayc\nrho(bmx t) V_m(bmx t) \nrho(bmx t) V_1(bmx t) V_m(bmx t)+P(bmx t) delta_1 m \nvdots \nrho(bmx t) V_d(bmx t) V_m(bmx t)+P(bmx t) delta_d m \nV_m(bmx t)(E(bmx t)+P(bmx t))\nendarrayright=underline0\n\nwhere rho(bmxt) in mathbbR is the fluid density, bmV(bmxt) in mathbbR^d is the flow velocity, E(bmxt) in mathbbR is the total energy per unit volume, and the pressure is given for an ideal gas with constant specific heat as\n\nP(bmxt) = (gamma - 1)Big(E(bmxt) - frac12rho(bmxt) lVert bmV(bmxt)rVert^2Big)\n\nThe specific heat ratio is specified as a parameter γ::Float64, which must be greater than unity.\n\n\n\n\n\n","category":"type"},{"location":"#StableSpectralElements.jl","page":"Home","title":"StableSpectralElements.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"StableSpectralElements.jl is a Julia framework for the numerical solution of partial differential equations of the form","category":"page"},{"location":"","page":"Home","title":"Home","text":"partial_t underlineU(bmxt) + bmnabla_bmx cdot underlinebmF(underlineU(bmxt) bmnabla_bmxunderlineU(bmxt)) = underline0","category":"page"},{"location":"","page":"Home","title":"Home","text":"for t in (0T) with T in mathbbR^+ and bmx in Omega subset mathbbR^d, subject to appropriate initial and boundary conditions, where underlineU(bmxt) is the vector of solution variables and underlinebmF(underlineU(bmxt)bmnabla_bmxunderlineU(bmxt)) is the flux tensor containing advective and/or diffusive contributions. These equations are spatially discretized on curvilinear unstructured grids using energy-stable and entropy-stable discontinuous spectral element methods in order to generate ODEProblem objects suitable for time integration using OrdinaryDiffEq.jl within the SciML ecosystem. StableSpectralElements.jl also includes postprocessing tools employing WriteVTK.jl for generating .vtu files, allowing for visualization of high-order numerical solutions on unstructured grids using ParaView or other software. Shared-memory parallelization is supported through multithreading.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The functionality provided by StartUpDG.jl for the handling of mesh data structures, polynomial basis functions, and quadrature nodes is employed throughout this package. Moreover, StableSpectralElements.jl implements dispatched strategies for semi-discrete operator evaluation using LinearMaps.jl, allowing for the efficient matrix-free application of tensor-product operators.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Discretizations satisfying the summation-by-parts (SBP) property employing nodal as well as modal bases are implemented, with the latter allowing for efficient and low-storage inversion of the dense elemental mass matrices arising from curvilinear meshes through the use of weight-adjusted approximations. Tensor-product formulations supporting sum factorization are available on triangles and tetrahedra through the use of SBP operators in collapsed coordinates, as well as on quadrilaterals and hexahedra.","category":"page"},{"location":"#Theory","page":"Home","title":"Theory","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"For a comprehensive overview of the numerical methods implemented in StableSpectralElements.jl, please refer to Tristan's PhD thesis, Provably Stable Discontinuous Spectral-Element Methods with the Summation-by-Parts Property: Unified Matrix Analysis and Efficient Tensor-Product Formulations on Curved Simplices.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"StableSpectralElements.jl is a registered Julia package (compatible with Julia versions 1.10 and higher) and can be installed by entering the following commands within the Julia REPL (read-eval-print loop):","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Pkg; Pkg.add(\"StableSpectralElements\")","category":"page"},{"location":"","page":"Home","title":"Home","text":"Alternatively, you can clone the repository and run your local version as follows:","category":"page"},{"location":"","page":"Home","title":"Home","text":"git clone https://github.com/tristanmontoya/StableSpectralElements.jl.git\ncd StableSpectralElements.jl\njulia --project=.","category":"page"},{"location":"","page":"Home","title":"Home","text":"In either case, you can then start using the package by entering using StableSpectralElements.","category":"page"},{"location":"#Examples","page":"Home","title":"Examples","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"We recommend that users refer to the following Jupyter notebooks (included in the examples directory) for examples of how to use StableSpectralElements.jl:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Linear advection-diffusion equation in 1D\nInviscid Burgers' equation in 1D with energy-conservative scheme\nEuler equations in 1D with entropy-conservative Gauss collocation methods\nLinear advection equation in 2D\nIsentropic Euler vortex in 2D with entropy-stable modal scheme on triangles\nLinear advection equation in 3D\n3D Euler equations with entropy-stable modal scheme on tetrahedra","category":"page"},{"location":"#Citing","page":"Home","title":"Citing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you use StableSpectralElements.jl in your research, please cite the following publications:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@article{MontoyaZinggTensorProduct24,\n title = {Efficient Tensor-Product Spectral-Element Operators with the Summation-by-Parts \n Property on Curved Triangles and Tetrahedra},\n author = {Montoya, Tristan and Zingg, David W},\n journal = {{SIAM} Journal on Scientific Computing},\n volume = {46},\n number = {4},\n pages = {A2270--A2297},\n doi = {10.1137/23M1573963},\n year = {2024}\n}\n\n@article{MontoyaZinggEntropyStable24,\n title = {Efficient Entropy-Stable Discontinuous Spectral-Element Methods Using \n Tensor-Product Summation-by-Parts Operators on Triangles and Tetrahedra},\n author = {Montoya, Tristan and Zingg, David W},\n journal = {Journal of Computational Physics},\n volume = {516},\n pages = {113360},\n doi = {10.1016/j.jcp.2024.113360},\n year = {2024}\n}","category":"page"},{"location":"#License","page":"Home","title":"License","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This software is released under the GPLv3 license.","category":"page"}] +[{"location":"SpatialDiscretizations/#Module-SpatialDiscretizations","page":"SpatialDiscretizations","title":"Module SpatialDiscretizations","text":"","category":"section"},{"location":"SpatialDiscretizations/#Overview","page":"SpatialDiscretizations","title":"Overview","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"Discretizations in StableSpectralElements.jl are constructed by first building a local approximation on a canonical reference element, denoted generically as hatOmega subset mathbbR^d, and using a bijective transformation bmX^(kappa) hatOmega rightarrow Omega^(kappa) to construct the approximation on each physical element Omega^(kappa) subset Omega of the mesh Omega^(kappa)_kappa in 1N_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 bmchi -11^d to hatOmega which may be used to construct operators with a tensor-product structure on the reference simplex.","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"(Image: Mesh mapping)","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"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:","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"beginaligned\nhatOmega_mathrmline = -11\nhatOmega_mathrmquad = -11^2\nhatOmega_mathrmhex = -11^3 \nhatOmega_mathrmtri = big bmxi in -11^2 xi_1 + xi_2 leq 0 big\nhatOmega_mathrmtet = big bmxi in -11^3 xi_1 + xi_2 + xi_3 leq -1 big\nendaligned","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"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. ","category":"page"},{"location":"SpatialDiscretizations/#Data-types","page":"SpatialDiscretizations","title":"Data types","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"CurrentModule = SpatialDiscretizations","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":" ReferenceApproximation","category":"page"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.ReferenceApproximation","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.ReferenceApproximation","text":"ReferenceApproximation(approx_type::AbstractReferenceMapping,\n element_type::AbstractElemShape, kwargs...)\n\nData structure defining the discretization on the reference element, containing the following fields:\n\napprox_type::AbstractApproximationType: Type of operators used for the discretization on the reference element (NodalTensor, ModalTensor, NodalMulti, ModalMulti, NodalMultiDiagE, or ModalMultiDiagE)\nreference_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 of the reference element (currently, StableSpectralElements.jl supports the options Line,Tri, Quad, Hex, and Tet)\nD::NTuple{d, <:LinearMap}: Tuple of operators of size N_q by N_q approximating each partial derivative at the volume quadrature nodes\nV::LinearMap: Generalized Vandermonde matrix of size N_q by N_p mapping solution degrees of freedom to values at volume quadrature nodes\nVf::LinearMap: Generalized Vandermonde matrix of size N_f by N_p mapping solution degrees of freedom to values at facet quadrature nodes\nR::LinearMap: Interpolation/extrapolation operator of size N_f by N_q which maps nodal data from volume quadrature nodes to facet quadrature nodes \nW::Diagonal: Volume quadrature weight matrix of size N_q by N_q\nB::Diagonal: Facet quadrature weight matrix of size N_f by N_f\nV_plot::LinearMap: Generalized Vandermonde matrix mapping solution degrees of freedom to plotting nodes\nreference_mapping::AbstractReferenceMapping: Optional collapsed coordinate transformation (either ReferenceMapping or NoMapping); if such a mapping is used (i.e. not NoMapping), the discrete derivative operators approximate partial derivatives with respect to components of the collapsed coordinate system\n\nOuter constructors are provided to construct the discrete operators by dispatching on each combination of subtypes of AbstractApproximationTypeandAbstractElementShape`. \n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#Approximation-types","page":"SpatialDiscretizations","title":"Approximation types","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"Listed below are approximation types (i.e. subtypes of AbstractApproximationType) supported by StableSpectralElements.jl.","category":"page"},{"location":"SpatialDiscretizations/#Tensor-product-operators","page":"SpatialDiscretizations","title":"Tensor-product operators","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"The following subtypes of AbstractTensorProduct <: AbstractApproximationType employ tensor-product operators.","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"CurrentModule = SpatialDiscretizations","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":" NodalTensor\n ModalTensor","category":"page"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.NodalTensor","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.NodalTensor","text":"NodalTensor(p::Int)\n\nApproximation type for a nodal formulation of polynomial degree p based on tensor-product volume and facet quadrature rules (generalized Vandermonde matrix is identity, derivative and interpolation/extrapolation operators have tensor-product structure).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.ModalTensor","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.ModalTensor","text":"ModalTensor(p::Int)\n\nApproximation type for a modal formulation of polynomial degree p based on tensor-product volume and facet quadrature rules (generalized Vandermonde matrix is not necessarily identity, derivative and interpolation/extrapolation operators have tensor-product structure).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#Multidimensional-operators","page":"SpatialDiscretizations","title":"Multidimensional operators","text":"","category":"section"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"The following subtypes of AbstractMultidimensional <: AbstractApproximationType employ multidimensional operators. ","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":"CurrentModule = SpatialDiscretizations","category":"page"},{"location":"SpatialDiscretizations/","page":"SpatialDiscretizations","title":"SpatialDiscretizations","text":" NodalMulti\n ModalMulti\n NodalMultiDiagE\n ModalMultiDiagE","category":"page"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.NodalMulti","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.NodalMulti","text":"NodalMulti(p::Int)\n\nApproximation type for a nodal formulation based on multidimensional volume and facet quadrature rules (generalized Vandermonde matrix is identity, derivative and interpolation/extrapolation operators are dense).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.ModalMulti","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.ModalMulti","text":"ModalMulti(p::Int)\n\nApproximation type for a modal formulation of polynomial degree p based on multidimensional volume and facet quadrature rules (generalized Vandermonde, derivative and interpolation/extrapolation operators are all dense).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.NodalMultiDiagE","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.NodalMultiDiagE","text":"NodalMultiDiagE(p::Int)\n\nApproximation type for a nodal formulation of polynomial degree p based on a multidimensional volume quadrature rule including nodes collocated with those used for facet integration (generalized Vandermonde matrix is identity, derivative operator is dense, interpolation/extrapolation operator picks out values at facet quadrature nodes).\n\n\n\n\n\n","category":"type"},{"location":"SpatialDiscretizations/#StableSpectralElements.SpatialDiscretizations.ModalMultiDiagE","page":"SpatialDiscretizations","title":"StableSpectralElements.SpatialDiscretizations.ModalMultiDiagE","text":"ModalMultiDiagE(p::Int)\n\nApproximation type for a modal formulation based on a multidimensional volume quadrature rule of polynomial degree p including nodes collocated with those used for facet integration (generalized Vandermonde and derivative operators are dense, interpolation/extrapolation operator picks out values at facet quadrature nodes).\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#Module-ConservationLaws","page":"ConservationLaws","title":"Module ConservationLaws","text":"","category":"section"},{"location":"ConservationLaws/#Overview","page":"ConservationLaws","title":"Overview","text":"","category":"section"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"The equations to be solved are defined by subtypes of AbstractConservationLaw on which functions such as physical_flux and numerical_flux are dispatched. Objects of type AbstractConservationLaw contain two type parameters, d and PDEType, the former denoting the spatial dimension of the problem, which is inherited by all subtypes, and the latter being a subtype of AbstractPDEType denoting the particular type of PDE being solved, which is either FirstOrder or SecondOrder. Whereas first-order problems remove the dependence of the flux tensor on the solution gradient in order to obtain systems of the form","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"partial_t underlineU(bmxt) + bmnabla_bmx cdot underlinebmF(underlineU(bmxt)) = underline0","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"second-order problems are treated by StableSpectralElements.jl as first-order systems of the form ","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"beginaligned\nunderlinebmQ(bmxt) - bmnabla_bmx underlineU(bmxt) = underline0\npartial_t underlineU(bmxt) + bmnabla_bmx cdot underlinebmF(underlineU(bmxt) underlinebmQ(bmxt)) = underline0\nendaligned","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"Currently, the linear advection and advection-diffusion equations, the inviscid and viscous Burgers' equations, and the compressible Euler equations are supported by StableSpectralElements.jl, but any system of the above form can in principle be implemented, provided that appropriate physical and numerical fluxes are defined.","category":"page"},{"location":"ConservationLaws/#Equations","page":"ConservationLaws","title":"Equations","text":"","category":"section"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"Listed below are partial differential equations supported by StableSpectralElements.jl.","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":"CurrentModule = ConservationLaws","category":"page"},{"location":"ConservationLaws/","page":"ConservationLaws","title":"ConservationLaws","text":" LinearAdvectionEquation\n LinearAdvectionDiffusionEquation\n InviscidBurgersEquation\n ViscousBurgersEquation\n EulerEquations","category":"page"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.LinearAdvectionEquation","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.LinearAdvectionEquation","text":"LinearAdvectionEquation(a::NTuple{d,Float64}) where {d}\n\nDefine a linear advection equation of the form\n\npartial_t U(bmxt) + bmnabla_bmx cdot big( bma U(bmxt) big) = 0\n\nwith a constant advection velocity bma in R^d. A specialized constructor LinearAdvectionEquation(a::Float64) is provided for the one-dimensional case.\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.LinearAdvectionDiffusionEquation","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.LinearAdvectionDiffusionEquation","text":"LinearAdvectionDiffusionEquation(a::NTuple{d,Float64}, b::Float64) where {d}\n\nDefine a linear advection-diffusion equation of the form\n\npartial_t U(bmxt) + bmnabla_bmx cdot big( bma U(bmxt) - b bmnabla U(bmxt)big) = 0\n\nwith a constant advection velocity bma in R^d and diffusion coefficient b in R^+. A specialized constructor LinearAdvectionDiffusionEquation(a::Float64, b::Float64) is provided for the one-dimensional case.\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.InviscidBurgersEquation","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.InviscidBurgersEquation","text":"InviscidBurgersEquation(a::NTuple{d,Float64}) where {d}\n\nDefine an inviscid Burgers' equation of the form\n\npartial_t U(bmxt) + bmnabla_bmx cdot big(tfrac12bma U(bmxt)^2 big) = 0\n\nwhere bma in R^d. A specialized constructor InviscidBurgersEquation() is provided for the one-dimensional case with a = (1.0,).\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.ViscousBurgersEquation","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.ViscousBurgersEquation","text":"ViscousBurgersEquation(a::NTuple{d,Float64}, b::Float64) where {d}\n\nDefine a viscous Burgers' equation of the form\n\npartial_t U(bmxt) + bmnabla_bmx cdot big(tfrac12bma U(bmxt)^2 - b bmnabla U(bmxt)big) = 0\n\nwhere bma in R^d and b in R^+. A specialized constructor ViscousBurgersEquation(b::Float64) is provided for the one-dimensional case with a = (1.0,).\n\n\n\n\n\n","category":"type"},{"location":"ConservationLaws/#StableSpectralElements.ConservationLaws.EulerEquations","page":"ConservationLaws","title":"StableSpectralElements.ConservationLaws.EulerEquations","text":"EulerEquations{d}(γ::Float64) where {d}\n\nDefine an Euler system governing compressible, adiabatic fluid flow, taking the form\n\nfracpartialpartial tleftbeginarrayc\nrho(bmx t) \nrho(bmx t) V_1(bmx t) \nvdots \nrho(bmx t) V_d(bmx t) \nE(bmx t)\nendarrayright+sum_m=1^d fracpartialpartial x_mleftbeginarrayc\nrho(bmx t) V_m(bmx t) \nrho(bmx t) V_1(bmx t) V_m(bmx t)+P(bmx t) delta_1 m \nvdots \nrho(bmx t) V_d(bmx t) V_m(bmx t)+P(bmx t) delta_d m \nV_m(bmx t)(E(bmx t)+P(bmx t))\nendarrayright=underline0\n\nwhere rho(bmxt) in mathbbR is the fluid density, bmV(bmxt) in mathbbR^d is the flow velocity, E(bmxt) in mathbbR is the total energy per unit volume, and the pressure is given for an ideal gas with constant specific heat as\n\nP(bmxt) = (gamma - 1)Big(E(bmxt) - frac12rho(bmxt) lVert bmV(bmxt)rVert^2Big)\n\nThe specific heat ratio is specified as a parameter γ::Float64, which must be greater than unity.\n\n\n\n\n\n","category":"type"},{"location":"#StableSpectralElements.jl","page":"Home","title":"StableSpectralElements.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"StableSpectralElements.jl is a Julia framework for the numerical solution of partial differential equations of the form","category":"page"},{"location":"","page":"Home","title":"Home","text":"partial_t underlineU(bmxt) + bmnabla_bmx cdot underlinebmF(underlineU(bmxt) bmnabla_bmxunderlineU(bmxt)) = underline0","category":"page"},{"location":"","page":"Home","title":"Home","text":"for t in (0T) with T in mathbbR^+ and bmx in Omega subset mathbbR^d, subject to appropriate initial and boundary conditions, where underlineU(bmxt) is the vector of solution variables and underlinebmF(underlineU(bmxt)bmnabla_bmxunderlineU(bmxt)) is the flux tensor containing advective and/or diffusive contributions. These equations are spatially discretized on curvilinear unstructured grids using energy-stable and entropy-stable discontinuous spectral element methods in order to generate ODEProblem objects suitable for time integration using OrdinaryDiffEq.jl within the SciML ecosystem. StableSpectralElements.jl also includes postprocessing tools employing WriteVTK.jl for generating .vtu files, allowing for visualization of high-order numerical solutions on unstructured grids using ParaView or other software. Shared-memory parallelization is supported through multithreading.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The functionality provided by StartUpDG.jl for the handling of mesh data structures, polynomial basis functions, and quadrature nodes is employed throughout this package. Moreover, StableSpectralElements.jl implements dispatched strategies for semi-discrete operator evaluation using LinearMaps.jl, allowing for the efficient matrix-free application of tensor-product operators.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Discretizations satisfying the summation-by-parts (SBP) property employing nodal as well as modal bases are implemented, with the latter allowing for efficient and low-storage inversion of the dense elemental mass matrices arising from curvilinear meshes through the use of weight-adjusted approximations. Tensor-product formulations supporting sum factorization are available on triangles and tetrahedra through the use of SBP operators in collapsed coordinates, as well as on quadrilaterals and hexahedra.","category":"page"},{"location":"#Theory","page":"Home","title":"Theory","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"For a comprehensive overview of the numerical methods implemented in StableSpectralElements.jl, please refer to Tristan's PhD thesis, Provably Stable Discontinuous Spectral-Element Methods with the Summation-by-Parts Property: Unified Matrix Analysis and Efficient Tensor-Product Formulations on Curved Simplices.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"StableSpectralElements.jl is a registered Julia package (compatible with Julia versions 1.10 and higher) and can be installed by entering the following commands within the Julia REPL (read-eval-print loop):","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Pkg; Pkg.add(\"StableSpectralElements\")","category":"page"},{"location":"","page":"Home","title":"Home","text":"Alternatively, you can clone the repository and run your local version as follows:","category":"page"},{"location":"","page":"Home","title":"Home","text":"git clone https://github.com/tristanmontoya/StableSpectralElements.jl.git\ncd StableSpectralElements.jl\njulia --project=.","category":"page"},{"location":"","page":"Home","title":"Home","text":"In either case, you can then start using the package by entering using StableSpectralElements.","category":"page"},{"location":"#Examples","page":"Home","title":"Examples","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"We recommend that users refer to the following Jupyter notebooks (included in the examples directory) for examples of how to use StableSpectralElements.jl:","category":"page"},{"location":"","page":"Home","title":"Home","text":"Linear advection-diffusion equation in 1D\nInviscid Burgers' equation in 1D with energy-conservative scheme\nEuler equations in 1D with entropy-conservative Gauss collocation methods\nLinear advection equation in 2D\nIsentropic Euler vortex in 2D with entropy-stable modal scheme on triangles\nLinear advection equation in 3D\n3D Euler equations with entropy-stable modal scheme on tetrahedra","category":"page"},{"location":"#Citing","page":"Home","title":"Citing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you use StableSpectralElements.jl in your research, please cite the following publications:","category":"page"},{"location":"","page":"Home","title":"Home","text":"@article{MontoyaZinggTensorProduct24,\n title = {Efficient Tensor-Product Spectral-Element Operators with the Summation-by-Parts \n Property on Curved Triangles and Tetrahedra},\n author = {Montoya, Tristan and Zingg, David W},\n journal = {{SIAM} Journal on Scientific Computing},\n volume = {46},\n number = {4},\n pages = {A2270--A2297},\n doi = {10.1137/23M1573963},\n year = {2024}\n}\n\n@article{MontoyaZinggEntropyStable24,\n title = {Efficient Entropy-Stable Discontinuous Spectral-Element Methods Using \n Tensor-Product Summation-by-Parts Operators on Triangles and Tetrahedra},\n author = {Montoya, Tristan and Zingg, David W},\n journal = {Journal of Computational Physics},\n volume = {516},\n pages = {113360},\n doi = {10.1016/j.jcp.2024.113360},\n year = {2024}\n}","category":"page"},{"location":"#License","page":"Home","title":"License","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This software is released under the GPLv3 license.","category":"page"}] }