diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index c261cb88..b3c4df75 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-06-14T15:19:54","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-06-15T07:54:22","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/ad/index.html b/dev/ad/index.html index 22bbdd5c..e051e837 100644 --- a/dev/ad/index.html +++ b/dev/ad/index.html @@ -85,14 +85,14 @@ @assert ForwardDiff.partials(f_df, 1) ≈ D * v # the Jacobian of `f(u) = D * u` is `D`

You can of course also use this with nonlinear functions, e.g.,

f(u, D) = u .* (D * (u.^2))
 
 f_df = f(u_v, D)
8-element StructArray(::Vector{Float64}, ::Vector{ForwardDiff.Partials{1, Float64}}) with eltype ForwardDiff.Dual{Nothing, Float64, 1}:
- Dual{Nothing}(-1.0803574671683276,5.352332694973359)
-  Dual{Nothing}(0.9834603055010078,-0.52978595264932)
- Dual{Nothing}(-0.9147808707906251,1.658525901851851)
-  Dual{Nothing}(0.3968332383135114,-11.836379590271717)
- Dual{Nothing}(-2.3521922204436465,25.76026066601995)
- Dual{Nothing}(-5.931592247894148,21.39488977054527)
-  Dual{Nothing}(1.0805319966370046,12.93213364958514)
-  Dual{Nothing}(0.9483238461186805,-0.008488662503189026)

The Jacobian of this function is

using LinearAlgebra
+ Dual{Nothing}(-2.0174635835440364,22.78426994458202)
+  Dual{Nothing}(2.4364628987677626,-4.313615546965806)
+  Dual{Nothing}(0.22493882348332112,-0.13870945296816908)
+  Dual{Nothing}(1.3627368661763686,0.30298875025384164)
+  Dual{Nothing}(2.1354470671506967,3.441255173270508)
+ Dual{Nothing}(35.84303314872701,-39.936257549827154)
+  Dual{Nothing}(5.8326757290263105,-20.12437446575593)
+ Dual{Nothing}(26.336261611466,-20.694379426259594)

The Jacobian of this function is

using LinearAlgebra
 
 J = Diagonal(D * u.^2) + 2 .* u .* Matrix(D) * Diagonal(u)
 
@@ -116,4 +116,4 @@
       Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml`
   [f6369f11] ForwardDiff v0.10.36
   [09ab397b] StructArrays v0.6.18
-  [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`
+ [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` diff --git a/dev/api_reference/index.html b/dev/api_reference/index.html index bac92203..4e4e0ba7 100644 --- a/dev/api_reference/index.html +++ b/dev/api_reference/index.html @@ -12,37 +12,37 @@ pages={3454}, publisher={The Open Journal}, url={https://github.com/ranocha/SummationByPartsOperators.jl} -}source
SummationByPartsOperators.BeljaddLeFlochMishraParés2017Type
BeljaddLeFlochMishraParés2017()

Coefficients of the periodic operators given in

  • Beljadid, LeFloch, Mishra, Parés (2017) Schemes with Well-Controlled Dissipation. Hyperbolic Systems in Nonconservative Form. Communications in Computational Physics 21.4, pp. 913-946.
source
SummationByPartsOperators.BurgersNonperiodicSemidiscretizationType
BurgersNonperiodicSemidiscretization(D, Di, split_form, left_bc, right_bc)

A semidiscretization of Burgers' equation $\partial_t u(t,x) + \partial_x \frac{u(t,x)^2}{2} = 0$ with boundary conditions left_bc(t), right_bc(t).

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.BurgersPeriodicSemidiscretizationType
BurgersPeriodicSemidiscretization(D, Di, split_form)

A semidiscretization of Burgers' equation $\partial_t u(t,x) + \partial_x \frac{u(t,x)^2}{2} = 0$ with periodic boundary conditions.

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.ConstantFilterType
ConstantFilter

Represents the action of a modal filter on values in a nodal basis with fixed strength.

source
SummationByPartsOperators.ConstantFilterMethod
ConstantFilter(D::FourierDerivativeOperator, filter)

Create a modal filter with constant parameters adapted to the Fourier derivative operator D with parameters given by the filter function filter.

source
SummationByPartsOperators.ConstantFilterMethod
ConstantFilter(D::LegendreDerivativeOperator, filter, TmpEltype=T)

Create a modal filter with constant parameters adapted to the Legendre derivative operator D with parameters given by the filter function filter.

source
SummationByPartsOperators.CubicNonperiodicSemidiscretizationType
CubicNonperiodicSemidiscretization(D, Di, split_form, left_bc, right_bc)

A semidiscretization of the cubic conservation law $\partial_t u(t,x) + \partial_x u(t,x)^3 = 0$ with nonperiodic boundary conditions left_bc(t), right_bc(t).

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.CubicPeriodicSemidiscretizationType
CubicPeriodicSemidiscretization(D, Di, split_form)

A semidiscretization of the cubic conservation law $\partial_t u(t,x) + \partial_x u(t,x)^3 = 0$ with periodic boundary conditions.

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.DerivativeCoefficientRowType
DerivativeCoefficientRow{T,Start,Length}

A struct representing a row in the boundary block of an SBP derivative operator with scalar type T.

source
SummationByPartsOperators.DerivativeCoefficientsType
DerivativeCoefficients

The coefficients of a derivative operator on a nonperiodic grid.

source
SummationByPartsOperators.DerivativeOperatorType
DerivativeOperator

A derivative operator on a nonperiodic finite difference grid. See derivative_operator.

source
SummationByPartsOperators.DienerDorbandSchnetterTiglio2007Type
DienerDorbandSchnetterTiglio2007()

Coefficients of the SBP operators given in

  • Diener, Dorband, Schnetter, Tiglio (2007) Optimized high-order derivative and dissipation operators satisfying summation by parts, and applications in three-dimensional multi-block evolutions. Journal of Scientific Computing 32.1, pp. 109-145.

See also (second- and fourth-order operators)

  • Mattsson, Nordström (2004) Summation by parts operators for finite difference approximations of second derivatives. Journal of Computational Physics 199, pp. 503-540.

The dissipation operators proposed by Diener, Dorband, Schnetter, Tiglio (2007) for the diagonal-norm operators are the same as the ones of

  • Mattsson, Svärd, Nordström (2004) Stable and Accurate Artificial Dissipation. Journal of Scientific Computing 21.1, pp. 57-79.
source
SummationByPartsOperators.DissipationOperatorType
DissipationOperator

A dissipation operator on a nonperiodic finite difference grid. See dissipation_operator.

source
SummationByPartsOperators.ExponentialFilterType
ExponentialFilter

Represents the exponential filter function σ(η) = exp(-α*η^p).

source
SummationByPartsOperators.FactorisationWrapperType
FactorisationWrapper

A small wrapper around a a factorisation fact, allowing to represent multiplication by the inverse of fact.

source
SummationByPartsOperators.FastModeType
FastMode()

A (probably) faster execution mode that might depend on packages such as LoopVectorization.jl.

source
SummationByPartsOperators.Fornberg1998Type
Fornberg1998()

Coefficients of the periodic operators given in

  • Fornberg (1998) Calculation of Weights in Finite Difference Formulas. SIAM Rev. 40.3, pp. 685-691.
source
SummationByPartsOperators.FourierConstantViscosityType
FourierConstantViscosity

Fourier viscosity operator with constant coefficients for the periodic 1st derivative Fourier operator.

source
SummationByPartsOperators.FourierDerivativeOperatorType
FourierDerivativeOperator{T}

A derivative operator on a periodic grid with real scalar type T computing the first derivative using a spectral Fourier expansion via real discrete Fourier transforms.

See also fourier_derivative_operator.

source
SummationByPartsOperators.FourierDerivativeOperatorMethod
FourierDerivativeOperator(xmin::T, xmax::T, N::Integer) where {T<:Real}

Construct the FourierDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N÷2+1 complex Fourier modes.

See also fourier_derivative_operator.

source
SummationByPartsOperators.FourierDerivativeOperator2DType
FourierDerivativeOperator2D{T<:Real}

A derivative operator on a two-dimensional periodic grid with scalar type T computing the first derivatives using a spectral Fourier expansion via real discrete Fourier transforms.

source
SummationByPartsOperators.FourierDerivativeOperator2DMethod
FourierDerivativeOperator2D(xmin, xmax, Nx, ymin, ymax, Ny)

Construct the FourierDerivativeOperator on a uniform grid between xmin and xmax using Nx nodes and ymin and ymax using Ny nodes.

source
SummationByPartsOperators.GlaubitzNordströmÖffner2023Type
GlaubitzNordströmÖffner2023()

Function space SBP (FSBP) operators given in

  • Glaubitz, Nordström, Öffner (2023) Summation-by-parts operators for general function spaces. SIAM Journal on Numerical Analysis 61, 2, pp. 733-754.

See also

  • Glaubitz, Nordström, Öffner (2024) An optimization-based construction procedure for function space based summation-by-parts operators on arbitrary grids. arXiv, arXiv:2405.08770v1.

See function_space_operator.

source
SummationByPartsOperators.Holoborodko2008Type
Holoborodko2008()

Coefficients of the periodic operators given in

  • Holoborodko (2008) Smooth Noise Robust Differentiators. http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/
source
SummationByPartsOperators.LegendreDerivativeOperatorType
LegendreDerivativeOperator{T<:Real}

A derivative operator on a nonperiodic Lobatto-Legendre grid with scalar type T computing the first derivative using a Legendre expansion.

source
SummationByPartsOperators.LegendreDerivativeOperatorMethod
LegendreDerivativeOperator(xmin::T, xmax::T, N::Int) where {T<:Real}

Construct the LegendreDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N-1 Legendre modes.

source
SummationByPartsOperators.LegendreSecondDerivativeOperatorType
LegendreSecondDerivativeOperator{T<:Real}

A derivative operator on a nonperiodic Lobatto-Legendre grid with scalar type T computing the second derivative using a Legendre expansion.

source
SummationByPartsOperators.LinearlyCombinedDerivativeOperatorsType
LinearlyCombinedDerivativeOperators

Form linear combinations of several derivative operators lazily.

source
SummationByPartsOperators.MadayTadmor1989Type
MadayTadmor1989()

Coefficients of the Fourier spectral viscosity given in

  • Maday, Tadmor (1989) Analysis of the Spectral Vanishing Viscosity Method for Periodic Conservation Laws. SIAM Journal on Numerical Analysis 26.4, pp. 854-870.
source
SummationByPartsOperators.MatrixDerivativeOperatorType
MatrixDerivativeOperator{T <: Real}
-MatrixDerivativeOperator(xmin, xmax, nodes, weights, D, accuracy_order, source)

A derivative operator on a nonperiodic grid with scalar type T computing a derivative as matrix vector product. This type is designed to make it easy to experiment with new operators given in matrix form.

An instance of this type can be constructed by passing the endpoints xmin, xmax of the desired grid as well as the nodes, weights, and the derivative operator D::Matrix on a reference interval, assuming that the nodes contain the boundary points of the reference interval. source is the source of coefficients and can be nothing for experimentation.

source
SummationByPartsOperators.Mattsson2012Type
Mattsson2012()

Coefficients of the SBP operators given in

  • Mattsson (2012) Summation by Parts Operators for Finite Difference Approximations of Second-Derivatives with Variable Coefficients. Journal of Scientific Computing 51, pp. 650-682.
source
SummationByPartsOperators.Mattsson2014Type
Mattsson2014()

Coefficients of the SBP operators given in

  • Mattsson (2014) Diagonal-norm summation by parts operators for finite difference approximations of third and fourth derivatives. Journal of Computational Physics 274, pp. 432-454.
source
SummationByPartsOperators.Mattsson2017Type
Mattsson2017(version::Symbol)

Coefficients of the upwind SBP operators given in

  • Mattsson (2017) Diagonal-norm upwind SBP operators. Journal of Computational Physics 335, pp. 283-310.

You can choose between the different versions :central, :plus, and :minus.

source
SummationByPartsOperators.MattssonAlmquistCarpenter2014ExtendedType
MattssonAlmquistCarpenter2014Extended()

Coefficients of the extended SBP operators given in

  • Mattsson, Almquist, Carpenter (2014) Optimal diagonal-norm SBP operators. Journal of Computational Physics 264, pp. 91-111.
source
SummationByPartsOperators.MattssonAlmquistCarpenter2014OptimalType
MattssonAlmquistCarpenter2014Optimal()

Coefficients of the optimal SBP operators with nonuniform grid given in

  • Mattsson, Almquist, Carpenter (2014) Optimal diagonal-norm SBP operators. Journal of Computational Physics 264, pp. 91-111.
source
SummationByPartsOperators.MattssonAlmquistVanDerWeide2018AccurateType
MattssonAlmquistVanDerWeide2018Accurate()

Coefficients of the optimized SBP operators with nonuniform grid given in

  • Mattsson, Almquist, van der Weide (2018) Boundary optimized diagonal-norm SBP operators. Journal of Computational Physics 374, pp. 1261-1266.
source
SummationByPartsOperators.MattssonAlmquistVanDerWeide2018MinimalType
MattssonAlmquistVanDerWeide2018Minimal()

Coefficients of the optimized SBP operators with nonuniform grid given in

  • Mattsson, Almquist, van der Weide (2018) Boundary optimized diagonal-norm SBP operators. Journal of Computational Physics 374, pp. 1261-1266.
source
SummationByPartsOperators.MattssonNordström2004Type
MattssonNordström2004()

Coefficients of the SBP operators given in

  • Mattsson, Nordström (2004) Summation by parts operators for finite difference approximations of second derivatives. Journal of Computational Physics 199, pp. 503-540.
source
SummationByPartsOperators.MattssonSvärdNordström2004Type
MattssonSvärdNordström2004()

Coefficients of the SBP operators given in

  • Mattsson, Svärd, Nordström (2004) Stable and Accurate Artificial Dissipation. Journal of Scientific Computing 21.1, pp. 57-79.
source
SummationByPartsOperators.MattssonSvärdShoeybi2008Type
MattssonSvärdShoeybi2008()

Coefficients of the SBP operators given in

  • Mattsson, Svärd, Shoeybi (2008) Stable and accurate schemes for the compressible Navier-Stokes equations. Journal of Computational Physics 227, pp. 2293-2316.
source
SummationByPartsOperators.PeriodicDerivativeCoefficientsType
PeriodicDerivativeCoefficients

The coefficients of a derivative operator on a periodic grid.

source
SummationByPartsOperators.PeriodicDerivativeOperatorType
PeriodicDerivativeOperator

A derivative operator on a uniform periodic grid. See periodic_derivative_operator and periodic_central_derivative_operator.

source
SummationByPartsOperators.PeriodicDissipationOperatorType
PeriodicDissipationOperator

A dissipation operator on a periodic finite difference grid. See dissipation_operator.

source
SummationByPartsOperators.PeriodicUpwindOperatorsType
PeriodicUpwindOperators
-PeriodicUpwindOperators(D_minus, D_central, D_plus)

A struct bundling the individual operators available for periodic upwind SBP operators. The individual operators are available as D.minus, D.plus (and optionally D.central, if provided), where D::PeriodicUpwindOperators.

The combined struct behaves as much as possible as an operator itself as long as no ambiguities arise. For example, upwind operators need to use the same grid and mass matrix, so mass_matrix, grid, xmin, xmax etc. are available but mul! is not.

It is recommended to construct an instance of PeriodicUpwindOperators using upwind_operators. An instance can also be constructed manually by passing the operators in the order D_minus, D_central, D_plus.

See also upwind_operators, UpwindOperators

source
SummationByPartsOperators.QuarticNonconvexPeriodicSemidiscretizationType
QuarticNonconvexPeriodicSemidiscretization(D, Di, split_form)

A semidiscretization of the quartic nonconvex conservation law $\partial_t u(t,x) + \partial_x ( u(t,x)^4 - 10 u(t,x)^2 + 3 u(t,x) ) = 0$ with periodic boundary conditions.

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.SafeModeType
SafeMode()

A safe execution mode relying only on basic functionality of Julia.

source
SummationByPartsOperators.SharanBradyLivescu2022Type
SharanBradyLivescu2022(alpha_left, alpha_right)

Coefficients of the cut-cell SBP operators given in

  • Sharan, Brady, Livescu (2022) High-order dimensionally-split Cartesian embedded boundary method for non-dissipative schemes. Journal of Computational Physics 464, 111341.

Here, alpha_left * Δx is the spacing between the left endpoint and the second node, while alpha_right * Δx is the spacing between the right endpoint and the last node.

source
SummationByPartsOperators.SourceOfCoefficientsType
SourceOfCoefficients

All sources of coefficients (articles) are subtypes of this abstract type.

source
SummationByPartsOperators.Tadmor1989Type
Tadmor1989()

Coefficients of the Fourier spectral viscosity given in

  • Tadmor (1989) Convergence of Spectral Methods for Nonlinear Conservation Laws. SIAM Journal on Numerical Analysis 26.1, pp. 30-44.
source
SummationByPartsOperators.Tadmor1993Type
Tadmor1993()

Coefficients of the Fourier super spectral viscosity given in

  • Tadmor (1993) Super Viscosity and Spectral Approximations of Nonlinear Conservation Laws. Numerical Methods for Fluid Dynamics IV, pp. 69-82.
source
SummationByPartsOperators.TadmorWaagan2012ConvergentType
TadmorWaagan2012Convergent()

Coefficients of the Fourier spectral viscosity given in

  • Tadmor, Waagan (2012) Adaptive Spectral Viscosity for Hyperbolic Conservation Laws. SIAM Journal on Scientific Computing 34.2, pp. A993-A1009.

See also

  • Schochet (1990) The Rate of Convergence of Spectral-Viscosity Methods for Periodic Scalar Conservation Laws. SIAM Journal on Numerical Analysis 27.5, pp. 1142-1159.
source
SummationByPartsOperators.TadmorWaagan2012StandardType
TadmorWaagan2012Standard()

Coefficients of the Fourier spectral viscosity given in

  • Tadmor, Waagan (2012) Adaptive Spectral Viscosity for Hyperbolic Conservation Laws. SIAM Journal on Scientific Computing 34.2, pp. A993-A1009.
source
SummationByPartsOperators.ThreadedModeType
ThreadedMode()

An execution mode using multiple threads and possibly further optimizations, cf. FastMode.

source
SummationByPartsOperators.UniformMesh1DType
UniformMesh1D(xmin::Real, xmax::Real, Nx::Integer)
-UniformMesh1D(; xmin::Real, xmax::Real, Nx::Integer)

A uniform mesh in one space dimension of Nx cells between xmin and xmax.

source
SummationByPartsOperators.UniformPeriodicMesh1DType
UniformPeriodicMesh1D(xmin::Real, xmax::Real, Nx::Integer)
-UniformPeriodicMesh1D(; xmin::Real, xmax::Real, Nx::Integer)

A uniform periodic mesh in one space dimension of Nx cells between xmin and xmax.

source
SummationByPartsOperators.UpwindOperatorsType
UpwindOperators
-UpwindOperators(D_minus, D_central, D_plus)

A struct bundling the individual operators available for non-periodic upwind SBP operators. The individual operators are available as D.minus, D.plus (and optionally D.central, if provided), where D::UpwindOperators.

The combined struct behaves as much as possible as an operator itself as long as no ambiguities arise. For example, upwind operators need to use the same grid and mass matrix, so mass_matrix, grid, xmin, xmax etc. are available but mul! is not.

It is recommended to construct an instance of UpwindOperators using upwind_operators. An instance can also be constructed manually by passing the operators in the order D_minus, D_central, D_plus.

See also upwind_operators, PeriodicUpwindOperators

source
SummationByPartsOperators.VarCoefDerivativeCoefficientsType
VarCoefDerivativeCoefficients

The coefficients of a variable coefficient derivative operator on a nonperiodic grid.

source
SummationByPartsOperators.VarCoefDerivativeOperatorType
VarCoefDerivativeOperator

A dissipation operator on a nonperiodic finite difference grid.

source
SummationByPartsOperators.VariableLinearAdvectionNonperiodicSemidiscretizationType
VariableLinearAdvectionNonperiodicSemidiscretization(D, Di, a, split_form,
-                                                     left_bc, right_bc)

A semidiscretization of the linear advection equation $\partial_t u(t,x) + \partial_x ( a(x) u(t,x) ) = 0$ with boundary conditions left_bc(t), right_bc(t).

D is an SBP derivative operator, Di an associated dissipation operator or nothing, a(x) the variable coefficient, and split_form::Union{Val(false), Val(true)} determines whether the canonical split form or the conservative form should be used.

source
SummationByPartsOperators.VariableLinearAdvectionPeriodicSemidiscretizationType
VariableLinearAdvectionPeriodicSemidiscretization(D, Di, a, split_form)

A semidiscretization of the linear advection equation $\partial_t u(t,x) + \partial_x ( a(x) u(t,x) ) = 0$ with periodic boundary conditions.

D is a periodic SBP derivative operator, Di an associated dissipation operator or nothing, a(x) the variable coefficient, and split_form::Union{Val(false), Val(true)} determines whether the canonical split form or the conservative form should be used.

source
SummationByPartsOperators.WaveEquationNonperiodicSemidiscretizationType
WaveEquationNonperiodicSemidiscretization(D, left_bc, right_bc)

A semidiscretization of the linear wave equation $\partial_t^2 u(t,x) = \partial_x^2 u(t,x)$.

D is assumed to be a second-derivative SBP operator and the boundary conditions can be Val(:HomogeneousNeumann), Val(:HomogeneousDirichlet), or Val(:NonReflecting).

source
LinearAlgebra.mul!Function
mul!(du, D::DerivativeOperator, u, α=true, β=false)

Efficient in-place version of du = α * D * u + β * du. Note that du must not be aliased with u.

source
PolynomialBases.compute_coefficients!Method
compute_coefficients!(uval, u, D::AbstractDerivativeOperator)

Compute the nodal values of the function u at the grid associated to the derivative operator D and stores the result in uval.

source
PolynomialBases.compute_coefficientsMethod
compute_coefficients(u, D::AbstractDerivativeOperator)

Compute the nodal values of the function u at the grid associated to the derivative operator D.

source
PolynomialBases.evaluate_coefficients!Method
evaluate_coefficients!(xplot, uplot, u, D::AbstractDerivativeOperator)

Evaluates the nodal coefficients u at a grid associated to the derivative operator D and stores the result in xplot, uplot. Returns xplot, uplot, where xplot contains the nodes and uplot the corresponding values of u.

source
PolynomialBases.evaluate_coefficientsMethod
evaluate_coefficients(u, D::AbstractDerivativeOperator)

Evaluates the nodal coefficients u at a grid associated to the derivative operator D. Returns xplot, uplot, where xplot contains the nodes and uplot the corresponding values of u.

source
PolynomialBases.integrateMethod
integrate(func, u, D::DerivativeOperator)

Map the function func to the coefficients u and integrate with respect to the quadrature rule associated with the SBP derivative operator D.

source
PolynomialBases.integrateMethod
integrate(func, u, D::PeriodicDerivativeOperator)

Map the function func to the coefficients u and integrate with respect to the quadrature rule associated with the periodic derivative operator D.

source
PolynomialBases.integrateMethod
integrate(func, u, D::AbstractPeriodicDerivativeOperator)

Map the function func to the coefficients u and integrate with respect to the quadrature rule associated with the derivative operator D.

source
SummationByPartsOperators.accuracy_orderFunction
accuracy_order(D)

Return the order of accuracy of a derivative operator D. For SBP finite difference operators, this refers to the interior order of accuracy.

source
SummationByPartsOperators.couple_continuouslyFunction
couple_continuously(D, mesh)

Return a derivative operator corresponding to a continuous coupling of D on the cells of the given mesh as in (nodal) continuous Galerkin (CG) methods. If the underlying SBP operators are LegendreDerivativeOperators, these are CG spectral element methods (CGSEM). However, a continuous coupling of arbitrary SBP operators is supported.

The mesh can be a UniformMesh1D or a UniformPeriodicMesh1D.

References

source
SummationByPartsOperators.couple_discontinuouslyFunction
couple_discontinuously(D, mesh, [coupling=Val(:central)])

Return a derivative operator corresponding to a discontinuous coupling of D on the cells of the given mesh as in (nodal) discontinuous Galerkin (CG) methods. If the underlying SBP operators are LegendreDerivativeOperators, these are DG spectral element methods (DGSEM). However, a discontinuous coupling of arbitrary SBP operators is supported.

The mesh can be a UniformMesh1D or a UniformPeriodicMesh1D. The coupling can be

  • Val(:central) (default), resulting in classical SBP properties
  • Val(:minus) or Val(:plus), resulting in upwind SBP operators

References

source
SummationByPartsOperators.derivative_leftMethod
derivative_left(D::AbstractNonperiodicDerivativeOperator, der_order)

Get a representation of the linear functional evaluation the Nth derivative at the left boundary node as (dense) vector.

source
SummationByPartsOperators.derivative_leftMethod
derivative_left(D::DerivativeOperator, u, der_order::Val{N})

Compute the N-th derivative of the function given by the coefficients u at the left boundary of the grid.

source
SummationByPartsOperators.derivative_operatorFunction
derivative_operator(source_of_coefficients,
+}
source
SummationByPartsOperators.BeljaddLeFlochMishraParés2017Type
BeljaddLeFlochMishraParés2017()

Coefficients of the periodic operators given in

  • Beljadid, LeFloch, Mishra, Parés (2017) Schemes with Well-Controlled Dissipation. Hyperbolic Systems in Nonconservative Form. Communications in Computational Physics 21.4, pp. 913-946.
source
SummationByPartsOperators.BurgersNonperiodicSemidiscretizationType
BurgersNonperiodicSemidiscretization(D, Di, split_form, left_bc, right_bc)

A semidiscretization of Burgers' equation $\partial_t u(t,x) + \partial_x \frac{u(t,x)^2}{2} = 0$ with boundary conditions left_bc(t), right_bc(t).

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.BurgersPeriodicSemidiscretizationType
BurgersPeriodicSemidiscretization(D, Di, split_form)

A semidiscretization of Burgers' equation $\partial_t u(t,x) + \partial_x \frac{u(t,x)^2}{2} = 0$ with periodic boundary conditions.

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.ConstantFilterType
ConstantFilter

Represents the action of a modal filter on values in a nodal basis with fixed strength.

source
SummationByPartsOperators.ConstantFilterMethod
ConstantFilter(D::FourierDerivativeOperator, filter)

Create a modal filter with constant parameters adapted to the Fourier derivative operator D with parameters given by the filter function filter.

source
SummationByPartsOperators.ConstantFilterMethod
ConstantFilter(D::LegendreDerivativeOperator, filter, TmpEltype=T)

Create a modal filter with constant parameters adapted to the Legendre derivative operator D with parameters given by the filter function filter.

source
SummationByPartsOperators.CubicNonperiodicSemidiscretizationType
CubicNonperiodicSemidiscretization(D, Di, split_form, left_bc, right_bc)

A semidiscretization of the cubic conservation law $\partial_t u(t,x) + \partial_x u(t,x)^3 = 0$ with nonperiodic boundary conditions left_bc(t), right_bc(t).

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.CubicPeriodicSemidiscretizationType
CubicPeriodicSemidiscretization(D, Di, split_form)

A semidiscretization of the cubic conservation law $\partial_t u(t,x) + \partial_x u(t,x)^3 = 0$ with periodic boundary conditions.

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.DerivativeCoefficientRowType
DerivativeCoefficientRow{T,Start,Length}

A struct representing a row in the boundary block of an SBP derivative operator with scalar type T.

source
SummationByPartsOperators.DerivativeCoefficientsType
DerivativeCoefficients

The coefficients of a derivative operator on a nonperiodic grid.

source
SummationByPartsOperators.DerivativeOperatorType
DerivativeOperator

A derivative operator on a nonperiodic finite difference grid. See derivative_operator.

source
SummationByPartsOperators.DienerDorbandSchnetterTiglio2007Type
DienerDorbandSchnetterTiglio2007()

Coefficients of the SBP operators given in

  • Diener, Dorband, Schnetter, Tiglio (2007) Optimized high-order derivative and dissipation operators satisfying summation by parts, and applications in three-dimensional multi-block evolutions. Journal of Scientific Computing 32.1, pp. 109-145.

See also (second- and fourth-order operators)

  • Mattsson, Nordström (2004) Summation by parts operators for finite difference approximations of second derivatives. Journal of Computational Physics 199, pp. 503-540.

The dissipation operators proposed by Diener, Dorband, Schnetter, Tiglio (2007) for the diagonal-norm operators are the same as the ones of

  • Mattsson, Svärd, Nordström (2004) Stable and Accurate Artificial Dissipation. Journal of Scientific Computing 21.1, pp. 57-79.
source
SummationByPartsOperators.DissipationOperatorType
DissipationOperator

A dissipation operator on a nonperiodic finite difference grid. See dissipation_operator.

source
SummationByPartsOperators.ExponentialFilterType
ExponentialFilter

Represents the exponential filter function σ(η) = exp(-α*η^p).

source
SummationByPartsOperators.FactorisationWrapperType
FactorisationWrapper

A small wrapper around a a factorisation fact, allowing to represent multiplication by the inverse of fact.

source
SummationByPartsOperators.FastModeType
FastMode()

A (probably) faster execution mode that might depend on packages such as LoopVectorization.jl.

source
SummationByPartsOperators.Fornberg1998Type
Fornberg1998()

Coefficients of the periodic operators given in

  • Fornberg (1998) Calculation of Weights in Finite Difference Formulas. SIAM Rev. 40.3, pp. 685-691.
source
SummationByPartsOperators.FourierConstantViscosityType
FourierConstantViscosity

Fourier viscosity operator with constant coefficients for the periodic 1st derivative Fourier operator.

source
SummationByPartsOperators.FourierDerivativeOperatorType
FourierDerivativeOperator{T}

A derivative operator on a periodic grid with real scalar type T computing the first derivative using a spectral Fourier expansion via real discrete Fourier transforms.

See also fourier_derivative_operator.

source
SummationByPartsOperators.FourierDerivativeOperatorMethod
FourierDerivativeOperator(xmin::T, xmax::T, N::Integer) where {T<:Real}

Construct the FourierDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N÷2+1 complex Fourier modes.

See also fourier_derivative_operator.

source
SummationByPartsOperators.FourierDerivativeOperator2DType
FourierDerivativeOperator2D{T<:Real}

A derivative operator on a two-dimensional periodic grid with scalar type T computing the first derivatives using a spectral Fourier expansion via real discrete Fourier transforms.

source
SummationByPartsOperators.FourierDerivativeOperator2DMethod
FourierDerivativeOperator2D(xmin, xmax, Nx, ymin, ymax, Ny)

Construct the FourierDerivativeOperator on a uniform grid between xmin and xmax using Nx nodes and ymin and ymax using Ny nodes.

source
SummationByPartsOperators.GlaubitzNordströmÖffner2023Type
GlaubitzNordströmÖffner2023()

Function space SBP (FSBP) operators given in

  • Glaubitz, Nordström, Öffner (2023) Summation-by-parts operators for general function spaces. SIAM Journal on Numerical Analysis 61, 2, pp. 733-754.

See also

  • Glaubitz, Nordström, Öffner (2024) An optimization-based construction procedure for function space based summation-by-parts operators on arbitrary grids. arXiv, arXiv:2405.08770v1.

See function_space_operator.

source
SummationByPartsOperators.Holoborodko2008Type
Holoborodko2008()

Coefficients of the periodic operators given in

  • Holoborodko (2008) Smooth Noise Robust Differentiators. http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/
source
SummationByPartsOperators.LegendreDerivativeOperatorType
LegendreDerivativeOperator{T<:Real}

A derivative operator on a nonperiodic Lobatto-Legendre grid with scalar type T computing the first derivative using a Legendre expansion.

source
SummationByPartsOperators.LegendreDerivativeOperatorMethod
LegendreDerivativeOperator(xmin::T, xmax::T, N::Int) where {T<:Real}

Construct the LegendreDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N-1 Legendre modes.

source
SummationByPartsOperators.LegendreSecondDerivativeOperatorType
LegendreSecondDerivativeOperator{T<:Real}

A derivative operator on a nonperiodic Lobatto-Legendre grid with scalar type T computing the second derivative using a Legendre expansion.

source
SummationByPartsOperators.LinearlyCombinedDerivativeOperatorsType
LinearlyCombinedDerivativeOperators

Form linear combinations of several derivative operators lazily.

source
SummationByPartsOperators.MadayTadmor1989Type
MadayTadmor1989()

Coefficients of the Fourier spectral viscosity given in

  • Maday, Tadmor (1989) Analysis of the Spectral Vanishing Viscosity Method for Periodic Conservation Laws. SIAM Journal on Numerical Analysis 26.4, pp. 854-870.
source
SummationByPartsOperators.MatrixDerivativeOperatorType
MatrixDerivativeOperator{T <: Real}
+MatrixDerivativeOperator(xmin, xmax, nodes, weights, D, accuracy_order, source)

A derivative operator on a nonperiodic grid with scalar type T computing a derivative as matrix vector product. This type is designed to make it easy to experiment with new operators given in matrix form.

An instance of this type can be constructed by passing the endpoints xmin, xmax of the desired grid as well as the nodes, weights, and the derivative operator D::Matrix on a reference interval, assuming that the nodes contain the boundary points of the reference interval. source is the source of coefficients and can be nothing for experimentation.

source
SummationByPartsOperators.Mattsson2012Type
Mattsson2012()

Coefficients of the SBP operators given in

  • Mattsson (2012) Summation by Parts Operators for Finite Difference Approximations of Second-Derivatives with Variable Coefficients. Journal of Scientific Computing 51, pp. 650-682.
source
SummationByPartsOperators.Mattsson2014Type
Mattsson2014()

Coefficients of the SBP operators given in

  • Mattsson (2014) Diagonal-norm summation by parts operators for finite difference approximations of third and fourth derivatives. Journal of Computational Physics 274, pp. 432-454.
source
SummationByPartsOperators.Mattsson2017Type
Mattsson2017(version::Symbol)

Coefficients of the upwind SBP operators given in

  • Mattsson (2017) Diagonal-norm upwind SBP operators. Journal of Computational Physics 335, pp. 283-310.

You can choose between the different versions :central, :plus, and :minus.

source
SummationByPartsOperators.MattssonAlmquistCarpenter2014ExtendedType
MattssonAlmquistCarpenter2014Extended()

Coefficients of the extended SBP operators given in

  • Mattsson, Almquist, Carpenter (2014) Optimal diagonal-norm SBP operators. Journal of Computational Physics 264, pp. 91-111.
source
SummationByPartsOperators.MattssonAlmquistCarpenter2014OptimalType
MattssonAlmquistCarpenter2014Optimal()

Coefficients of the optimal SBP operators with nonuniform grid given in

  • Mattsson, Almquist, Carpenter (2014) Optimal diagonal-norm SBP operators. Journal of Computational Physics 264, pp. 91-111.
source
SummationByPartsOperators.MattssonAlmquistVanDerWeide2018AccurateType
MattssonAlmquistVanDerWeide2018Accurate()

Coefficients of the optimized SBP operators with nonuniform grid given in

  • Mattsson, Almquist, van der Weide (2018) Boundary optimized diagonal-norm SBP operators. Journal of Computational Physics 374, pp. 1261-1266.
source
SummationByPartsOperators.MattssonAlmquistVanDerWeide2018MinimalType
MattssonAlmquistVanDerWeide2018Minimal()

Coefficients of the optimized SBP operators with nonuniform grid given in

  • Mattsson, Almquist, van der Weide (2018) Boundary optimized diagonal-norm SBP operators. Journal of Computational Physics 374, pp. 1261-1266.
source
SummationByPartsOperators.MattssonNordström2004Type
MattssonNordström2004()

Coefficients of the SBP operators given in

  • Mattsson, Nordström (2004) Summation by parts operators for finite difference approximations of second derivatives. Journal of Computational Physics 199, pp. 503-540.
source
SummationByPartsOperators.MattssonSvärdNordström2004Type
MattssonSvärdNordström2004()

Coefficients of the SBP operators given in

  • Mattsson, Svärd, Nordström (2004) Stable and Accurate Artificial Dissipation. Journal of Scientific Computing 21.1, pp. 57-79.
source
SummationByPartsOperators.MattssonSvärdShoeybi2008Type
MattssonSvärdShoeybi2008()

Coefficients of the SBP operators given in

  • Mattsson, Svärd, Shoeybi (2008) Stable and accurate schemes for the compressible Navier-Stokes equations. Journal of Computational Physics 227, pp. 2293-2316.
source
SummationByPartsOperators.PeriodicDerivativeCoefficientsType
PeriodicDerivativeCoefficients

The coefficients of a derivative operator on a periodic grid.

source
SummationByPartsOperators.PeriodicDerivativeOperatorType
PeriodicDerivativeOperator

A derivative operator on a uniform periodic grid. See periodic_derivative_operator and periodic_central_derivative_operator.

source
SummationByPartsOperators.PeriodicDissipationOperatorType
PeriodicDissipationOperator

A dissipation operator on a periodic finite difference grid. See dissipation_operator.

source
SummationByPartsOperators.PeriodicUpwindOperatorsType
PeriodicUpwindOperators
+PeriodicUpwindOperators(D_minus, D_central, D_plus)

A struct bundling the individual operators available for periodic upwind SBP operators. The individual operators are available as D.minus, D.plus (and optionally D.central, if provided), where D::PeriodicUpwindOperators.

The combined struct behaves as much as possible as an operator itself as long as no ambiguities arise. For example, upwind operators need to use the same grid and mass matrix, so mass_matrix, grid, xmin, xmax etc. are available but mul! is not.

It is recommended to construct an instance of PeriodicUpwindOperators using upwind_operators. An instance can also be constructed manually by passing the operators in the order D_minus, D_central, D_plus.

See also upwind_operators, UpwindOperators

source
SummationByPartsOperators.QuarticNonconvexPeriodicSemidiscretizationType
QuarticNonconvexPeriodicSemidiscretization(D, Di, split_form)

A semidiscretization of the quartic nonconvex conservation law $\partial_t u(t,x) + \partial_x ( u(t,x)^4 - 10 u(t,x)^2 + 3 u(t,x) ) = 0$ with periodic boundary conditions.

D is a first-derivative SBP operator, Di an associated dissipation operator or nothing, and split_form::Union{Val(true), Val(false)} determines whether the canonical split form or the conservative form is used.

source
SummationByPartsOperators.SafeModeType
SafeMode()

A safe execution mode relying only on basic functionality of Julia.

source
SummationByPartsOperators.SharanBradyLivescu2022Type
SharanBradyLivescu2022(alpha_left, alpha_right)

Coefficients of the cut-cell SBP operators given in

  • Sharan, Brady, Livescu (2022) High-order dimensionally-split Cartesian embedded boundary method for non-dissipative schemes. Journal of Computational Physics 464, 111341.

Here, alpha_left * Δx is the spacing between the left endpoint and the second node, while alpha_right * Δx is the spacing between the right endpoint and the last node.

source
SummationByPartsOperators.SourceOfCoefficientsType
SourceOfCoefficients

All sources of coefficients (articles) are subtypes of this abstract type.

source
SummationByPartsOperators.Tadmor1989Type
Tadmor1989()

Coefficients of the Fourier spectral viscosity given in

  • Tadmor (1989) Convergence of Spectral Methods for Nonlinear Conservation Laws. SIAM Journal on Numerical Analysis 26.1, pp. 30-44.
source
SummationByPartsOperators.Tadmor1993Type
Tadmor1993()

Coefficients of the Fourier super spectral viscosity given in

  • Tadmor (1993) Super Viscosity and Spectral Approximations of Nonlinear Conservation Laws. Numerical Methods for Fluid Dynamics IV, pp. 69-82.
source
SummationByPartsOperators.TadmorWaagan2012ConvergentType
TadmorWaagan2012Convergent()

Coefficients of the Fourier spectral viscosity given in

  • Tadmor, Waagan (2012) Adaptive Spectral Viscosity for Hyperbolic Conservation Laws. SIAM Journal on Scientific Computing 34.2, pp. A993-A1009.

See also

  • Schochet (1990) The Rate of Convergence of Spectral-Viscosity Methods for Periodic Scalar Conservation Laws. SIAM Journal on Numerical Analysis 27.5, pp. 1142-1159.
source
SummationByPartsOperators.TadmorWaagan2012StandardType
TadmorWaagan2012Standard()

Coefficients of the Fourier spectral viscosity given in

  • Tadmor, Waagan (2012) Adaptive Spectral Viscosity for Hyperbolic Conservation Laws. SIAM Journal on Scientific Computing 34.2, pp. A993-A1009.
source
SummationByPartsOperators.ThreadedModeType
ThreadedMode()

An execution mode using multiple threads and possibly further optimizations, cf. FastMode.

source
SummationByPartsOperators.UniformMesh1DType
UniformMesh1D(xmin::Real, xmax::Real, Nx::Integer)
+UniformMesh1D(; xmin::Real, xmax::Real, Nx::Integer)

A uniform mesh in one space dimension of Nx cells between xmin and xmax.

source
SummationByPartsOperators.UniformPeriodicMesh1DType
UniformPeriodicMesh1D(xmin::Real, xmax::Real, Nx::Integer)
+UniformPeriodicMesh1D(; xmin::Real, xmax::Real, Nx::Integer)

A uniform periodic mesh in one space dimension of Nx cells between xmin and xmax.

source
SummationByPartsOperators.UpwindOperatorsType
UpwindOperators
+UpwindOperators(D_minus, D_central, D_plus)

A struct bundling the individual operators available for non-periodic upwind SBP operators. The individual operators are available as D.minus, D.plus (and optionally D.central, if provided), where D::UpwindOperators.

The combined struct behaves as much as possible as an operator itself as long as no ambiguities arise. For example, upwind operators need to use the same grid and mass matrix, so mass_matrix, grid, xmin, xmax etc. are available but mul! is not.

It is recommended to construct an instance of UpwindOperators using upwind_operators. An instance can also be constructed manually by passing the operators in the order D_minus, D_central, D_plus.

See also upwind_operators, PeriodicUpwindOperators

source
SummationByPartsOperators.VarCoefDerivativeCoefficientsType
VarCoefDerivativeCoefficients

The coefficients of a variable coefficient derivative operator on a nonperiodic grid.

source
SummationByPartsOperators.VarCoefDerivativeOperatorType
VarCoefDerivativeOperator

A dissipation operator on a nonperiodic finite difference grid.

source
SummationByPartsOperators.VariableLinearAdvectionNonperiodicSemidiscretizationType
VariableLinearAdvectionNonperiodicSemidiscretization(D, Di, a, split_form,
+                                                     left_bc, right_bc)

A semidiscretization of the linear advection equation $\partial_t u(t,x) + \partial_x ( a(x) u(t,x) ) = 0$ with boundary conditions left_bc(t), right_bc(t).

D is an SBP derivative operator, Di an associated dissipation operator or nothing, a(x) the variable coefficient, and split_form::Union{Val(false), Val(true)} determines whether the canonical split form or the conservative form should be used.

source
SummationByPartsOperators.VariableLinearAdvectionPeriodicSemidiscretizationType
VariableLinearAdvectionPeriodicSemidiscretization(D, Di, a, split_form)

A semidiscretization of the linear advection equation $\partial_t u(t,x) + \partial_x ( a(x) u(t,x) ) = 0$ with periodic boundary conditions.

D is a periodic SBP derivative operator, Di an associated dissipation operator or nothing, a(x) the variable coefficient, and split_form::Union{Val(false), Val(true)} determines whether the canonical split form or the conservative form should be used.

source
SummationByPartsOperators.WaveEquationNonperiodicSemidiscretizationType
WaveEquationNonperiodicSemidiscretization(D, left_bc, right_bc)

A semidiscretization of the linear wave equation $\partial_t^2 u(t,x) = \partial_x^2 u(t,x)$.

D is assumed to be a second-derivative SBP operator and the boundary conditions can be Val(:HomogeneousNeumann), Val(:HomogeneousDirichlet), or Val(:NonReflecting).

source
LinearAlgebra.mul!Function
mul!(du, D::DerivativeOperator, u, α=true, β=false)

Efficient in-place version of du = α * D * u + β * du. Note that du must not be aliased with u.

source
PolynomialBases.compute_coefficients!Method
compute_coefficients!(uval, u, D::AbstractDerivativeOperator)

Compute the nodal values of the function u at the grid associated to the derivative operator D and stores the result in uval.

source
PolynomialBases.compute_coefficientsMethod
compute_coefficients(u, D::AbstractDerivativeOperator)

Compute the nodal values of the function u at the grid associated to the derivative operator D.

source
PolynomialBases.evaluate_coefficients!Method
evaluate_coefficients!(xplot, uplot, u, D::AbstractDerivativeOperator)

Evaluates the nodal coefficients u at a grid associated to the derivative operator D and stores the result in xplot, uplot. Returns xplot, uplot, where xplot contains the nodes and uplot the corresponding values of u.

source
PolynomialBases.evaluate_coefficientsMethod
evaluate_coefficients(u, D::AbstractDerivativeOperator)

Evaluates the nodal coefficients u at a grid associated to the derivative operator D. Returns xplot, uplot, where xplot contains the nodes and uplot the corresponding values of u.

source
PolynomialBases.integrateMethod
integrate(func, u, D::DerivativeOperator)

Map the function func to the coefficients u and integrate with respect to the quadrature rule associated with the SBP derivative operator D.

source
PolynomialBases.integrateMethod
integrate(func, u, D::PeriodicDerivativeOperator)

Map the function func to the coefficients u and integrate with respect to the quadrature rule associated with the periodic derivative operator D.

source
PolynomialBases.integrateMethod
integrate(func, u, D::AbstractPeriodicDerivativeOperator)

Map the function func to the coefficients u and integrate with respect to the quadrature rule associated with the derivative operator D.

source
SummationByPartsOperators.accuracy_orderFunction
accuracy_order(D)

Return the order of accuracy of a derivative operator D. For SBP finite difference operators, this refers to the interior order of accuracy.

source
SummationByPartsOperators.couple_continuouslyFunction
couple_continuously(D, mesh)

Return a derivative operator corresponding to a continuous coupling of D on the cells of the given mesh as in (nodal) continuous Galerkin (CG) methods. If the underlying SBP operators are LegendreDerivativeOperators, these are CG spectral element methods (CGSEM). However, a continuous coupling of arbitrary SBP operators is supported.

The mesh can be a UniformMesh1D or a UniformPeriodicMesh1D.

References

source
SummationByPartsOperators.couple_discontinuouslyFunction
couple_discontinuously(D, mesh, [coupling=Val(:central)])

Return a derivative operator corresponding to a discontinuous coupling of D on the cells of the given mesh as in (nodal) discontinuous Galerkin (CG) methods. If the underlying SBP operators are LegendreDerivativeOperators, these are DG spectral element methods (DGSEM). However, a discontinuous coupling of arbitrary SBP operators is supported.

The mesh can be a UniformMesh1D or a UniformPeriodicMesh1D. The coupling can be

  • Val(:central) (default), resulting in classical SBP properties
  • Val(:minus) or Val(:plus), resulting in upwind SBP operators

References

source
SummationByPartsOperators.derivative_leftMethod
derivative_left(D::AbstractNonperiodicDerivativeOperator, der_order)

Get a representation of the linear functional evaluation the Nth derivative at the left boundary node as (dense) vector.

source
SummationByPartsOperators.derivative_leftMethod
derivative_left(D::DerivativeOperator, u, der_order::Val{N})

Compute the N-th derivative of the function given by the coefficients u at the left boundary of the grid.

source
SummationByPartsOperators.derivative_operatorFunction
derivative_operator(source_of_coefficients,
                     derivative_order, accuracy_order,
                     xmin, xmax, N, mode=FastMode())
 derivative_operator(source_of_coefficients;
                     derivative_order, accuracy_order,
-                    xmin, xmax, N, mode=FastMode())

Create a DerivativeOperator approximating the derivative_order-th derivative on a grid between xmin and xmax with N grid points up to order of accuracy accuracy_order. with coefficients given by source_of_coefficients. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.derivative_orderFunction
derivative_order(D)

Return the order of the derivative associated to the derivative operator D. For example, it will return 1 for a first-derivative SBP operator.

source
SummationByPartsOperators.derivative_rightMethod
derivative_right(D::AbstractNonperiodicDerivativeOperator, der_order)

Get a representation of the linear functional evaluation the Nth derivative at the right boundary node as (dense) vector.

source
SummationByPartsOperators.derivative_rightMethod
derivative_right(D::DerivativeOperator, u, der_order::Val{N})

Compute the N-th derivative of the function given by the coefficients u at the right boundary of the grid.

source
SummationByPartsOperators.dissipation_operatorFunction
dissipation_operator(source_of_coefficients, order, xmin, xmax, N,
-                     left_weights, right_weights, mode=FastMode())

Create a negative semidefinite DissipationOperator using undivided differences approximating a weighted order-th derivative on a grid between xmin and xmax with N grid points up to order of accuracy 2 with coefficients given by source_of_coefficients. The norm matrix is given by left_weights and right_weights. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.dissipation_operatorMethod
dissipation_operator(D::PeriodicDerivativeOperator;
+                    xmin, xmax, N, mode=FastMode())

Create a DerivativeOperator approximating the derivative_order-th derivative on a grid between xmin and xmax with N grid points up to order of accuracy accuracy_order. with coefficients given by source_of_coefficients. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.derivative_orderFunction
derivative_order(D)

Return the order of the derivative associated to the derivative operator D. For example, it will return 1 for a first-derivative SBP operator.

source
SummationByPartsOperators.derivative_rightMethod
derivative_right(D::AbstractNonperiodicDerivativeOperator, der_order)

Get a representation of the linear functional evaluation the Nth derivative at the right boundary node as (dense) vector.

source
SummationByPartsOperators.derivative_rightMethod
derivative_right(D::DerivativeOperator, u, der_order::Val{N})

Compute the N-th derivative of the function given by the coefficients u at the right boundary of the grid.

source
SummationByPartsOperators.dissipation_operatorFunction
dissipation_operator(source_of_coefficients, order, xmin, xmax, N,
+                     left_weights, right_weights, mode=FastMode())

Create a negative semidefinite DissipationOperator using undivided differences approximating a weighted order-th derivative on a grid between xmin and xmax with N grid points up to order of accuracy 2 with coefficients given by source_of_coefficients. The norm matrix is given by left_weights and right_weights. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.dissipation_operatorMethod
dissipation_operator(D::PeriodicDerivativeOperator;
                      strength=one(eltype(D)),
                      order=accuracy_order(D),
-                     mode=D.coefficients.mode)

Create a negative semidefinite DissipationOperator using undivided differences approximating a order-th derivative with strength strength adapted to the derivative operator D. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.dissipation_operatorMethod
dissipation_operator([source_of_coefficients=MattssonSvärdNordström2004()],
+                     mode=D.coefficients.mode)

Create a negative semidefinite DissipationOperator using undivided differences approximating a order-th derivative with strength strength adapted to the derivative operator D. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.dissipation_operatorMethod
dissipation_operator([source_of_coefficients=MattssonSvärdNordström2004()],
                      D::DerivativeOperator{T};
                      strength=one(T),
                      order::Int=accuracy_order(D),
-                     mode=D.coefficients.mode)

Create a negative semidefinite DissipationOperator using undivided differences approximating a weighted order-th derivative adapted to the derivative operator D with coefficients given in source_of_coefficients. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.fornbergMethod
fornberg(x::Vector{T}, m::Int) where {T}

Calculate the weights of a finite difference approximation of the mth derivative with maximal order of accuracy at 0 using the nodes x, see Fornberg (1998) Calculation of Weights in Finite Difference Formulas SIAM Rev. 40.3, pp. 685-691.

source
SummationByPartsOperators.fourier_derivative_matrixFunction
fourier_derivative_matrix(N, xmin::Real=0.0, xmax::Real=2π)

Compute the Fourier derivative matrix with respect to the corresponding nodal basis using N nodes, see Kopriva (2009) Implementing Spectral Methods for PDEs, Algorithm 18.

source
SummationByPartsOperators.fourier_derivative_operatorMethod
fourier_derivative_operator(xmin::Real, xmax::Real, N::Integer)
-fourier_derivative_operator(; xmin::Real, xmax::Real, N::Integer)

Construct the FourierDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N÷2+1 complex Fourier modes.

source
SummationByPartsOperators.function_space_operatorFunction
function_space_operator(basis_functions, nodes, source;
+                     mode=D.coefficients.mode)

Create a negative semidefinite DissipationOperator using undivided differences approximating a weighted order-th derivative adapted to the derivative operator D with coefficients given in source_of_coefficients. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.fornbergMethod
fornberg(x::Vector{T}, m::Int) where {T}

Calculate the weights of a finite difference approximation of the mth derivative with maximal order of accuracy at 0 using the nodes x, see Fornberg (1998) Calculation of Weights in Finite Difference Formulas SIAM Rev. 40.3, pp. 685-691.

source
SummationByPartsOperators.fourier_derivative_matrixFunction
fourier_derivative_matrix(N, xmin::Real=0.0, xmax::Real=2π)

Compute the Fourier derivative matrix with respect to the corresponding nodal basis using N nodes, see Kopriva (2009) Implementing Spectral Methods for PDEs, Algorithm 18.

source
SummationByPartsOperators.fourier_derivative_operatorMethod
fourier_derivative_operator(xmin::Real, xmax::Real, N::Integer)
+fourier_derivative_operator(; xmin::Real, xmax::Real, N::Integer)

Construct the FourierDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N÷2+1 complex Fourier modes.

source
SummationByPartsOperators.function_space_operatorFunction
function_space_operator(basis_functions, nodes, source;
                         derivative_order = 1, accuracy_order = 0,
-                        options = Optim.Options(g_tol = 1e-14, iterations = 10000))

Construct an operator that represents a first-derivative operator in a function space spanned by the basis_functions, which is an iterable of functions. The operator is constructed on the interval [x_min, x_max] with the nodes nodes, where x_min is taken as the minimal value in nodes and x_max the maximal value. Note that the nodes will be sorted internally. The accuracy_order is the order of the accuracy of the operator, which can optionally be passed, but does not have any effect on the operator. The operator is constructed solving an optimization problem with Optim.jl. You can specify the options for the optimization problem with the options argument, see also the documentation of Optim.jl.

The operator that is returned follows the general interface. Currently, it is wrapped in a MatrixDerivativeOperator, but this might change in the future. In order to use this function, the package Optim must be loaded.

See also GlaubitzNordströmÖffner2023.

Julia 1.9

This function requires at least Julia 1.9.

Experimental implementation

This is an experimental feature and may change in future releases.

source
SummationByPartsOperators.gridFunction
grid(D)

Return the grid associated to a derivative operator D.

source
SummationByPartsOperators.left_boundary_weightFunction
left_boundary_weight(D)

Return the left-boundary weight of the (diagonal) mass matrix M associated to the derivative operator D.

source
SummationByPartsOperators.legendre_derivative_operatorMethod
legendre_derivative_operator(xmin::Real, xmax::Real, N::Integer)
-legendre_derivative_operator(; xmin::Real, xmax::Real, N::Integer)

Construct the LegendreDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N-1 Legendre modes.

source
SummationByPartsOperators.legendre_second_derivative_operatorMethod
legendre_second_derivative_operator(xmin::Real, xmax::Real, N::Integer)
-legendre_second_derivative_operator(; xmin::Real, xmax::Real, N::Integer)

Construct the LegendreDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N-1 Legendre modes.

source
SummationByPartsOperators.mass_matrixMethod
mass_matrix(D::Union{DerivativeOperator,VarCoefDerivativeOperator})

Create the diagonal mass matrix for the SBP derivative operator D.

source
SummationByPartsOperators.mul_transpose_derivative_left!Method
mul_transpose_derivative_left!(u, D::DerivativeOperator, der_order::Val{N}, α=true, β=false)

Set the grid function u to α times the transposed N-th derivative functional applied to u plus β times u in the domain of the N-th derivative functional at the left boundary of the grid. Thus, the coefficients α, β have the same meaning as in mul!.

source
SummationByPartsOperators.mul_transpose_derivative_right!Method
mul_transpose_derivative_right!(u, D::DerivativeOperator, der_order::Val{N}, α=true, β=false)

Set the grid function u to α times the transposed N-th derivative functional applied to u plus β times u in the domain of the N-th derivative functional at the right boundary of the grid. Thus, the coefficients α, β have the same meaning as in mul!.

source
SummationByPartsOperators.periodic_central_derivative_coefficientsFunction
periodic_central_derivative_coefficients(derivative_order, accuracy_order, T=Float64, mode=FastMode())

Create the PeriodicDerivativeCoefficients approximating the derivative_order-th derivative with an order of accuracy accuracy_order and scalar type T. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode()).

source
SummationByPartsOperators.periodic_central_derivative_operatorFunction
periodic_central_derivative_operator(derivative_order, accuracy_order,
-                                     xmin, xmax, N, mode=FastMode())

Create a PeriodicDerivativeOperator approximating the derivative_order-th derivative on a uniform grid between xmin and xmax with N grid points up to order of accuracy accuracy_order. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.periodic_derivative_coefficientsFunction
periodic_derivative_coefficients(derivative_order, accuracy_order,
+                        options = Optim.Options(g_tol = 1e-14, iterations = 10000))

Construct an operator that represents a first-derivative operator in a function space spanned by the basis_functions, which is an iterable of functions. The operator is constructed on the interval [x_min, x_max] with the nodes nodes, where x_min is taken as the minimal value in nodes and x_max the maximal value. Note that the nodes will be sorted internally. The accuracy_order is the order of the accuracy of the operator, which can optionally be passed, but does not have any effect on the operator. The operator is constructed solving an optimization problem with Optim.jl. You can specify the options for the optimization problem with the options argument, see also the documentation of Optim.jl.

The operator that is returned follows the general interface. Currently, it is wrapped in a MatrixDerivativeOperator, but this might change in the future. In order to use this function, the package Optim must be loaded.

See also GlaubitzNordströmÖffner2023.

Julia 1.9

This function requires at least Julia 1.9.

Experimental implementation

This is an experimental feature and may change in future releases.

source
SummationByPartsOperators.gridFunction
grid(D)

Return the grid associated to a derivative operator D.

source
SummationByPartsOperators.left_boundary_weightFunction
left_boundary_weight(D)

Return the left-boundary weight of the (diagonal) mass matrix M associated to the derivative operator D.

source
SummationByPartsOperators.legendre_derivative_operatorMethod
legendre_derivative_operator(xmin::Real, xmax::Real, N::Integer)
+legendre_derivative_operator(; xmin::Real, xmax::Real, N::Integer)

Construct the LegendreDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N-1 Legendre modes.

source
SummationByPartsOperators.legendre_second_derivative_operatorMethod
legendre_second_derivative_operator(xmin::Real, xmax::Real, N::Integer)
+legendre_second_derivative_operator(; xmin::Real, xmax::Real, N::Integer)

Construct the LegendreDerivativeOperator on a uniform grid between xmin and xmax using N nodes and N-1 Legendre modes.

source
SummationByPartsOperators.mass_matrixMethod
mass_matrix(D::Union{DerivativeOperator,VarCoefDerivativeOperator})

Create the diagonal mass matrix for the SBP derivative operator D.

source
SummationByPartsOperators.mul_transpose_derivative_left!Method
mul_transpose_derivative_left!(u, D::DerivativeOperator, der_order::Val{N}, α=true, β=false)

Set the grid function u to α times the transposed N-th derivative functional applied to u plus β times u in the domain of the N-th derivative functional at the left boundary of the grid. Thus, the coefficients α, β have the same meaning as in mul!.

source
SummationByPartsOperators.mul_transpose_derivative_right!Method
mul_transpose_derivative_right!(u, D::DerivativeOperator, der_order::Val{N}, α=true, β=false)

Set the grid function u to α times the transposed N-th derivative functional applied to u plus β times u in the domain of the N-th derivative functional at the right boundary of the grid. Thus, the coefficients α, β have the same meaning as in mul!.

source
SummationByPartsOperators.periodic_central_derivative_coefficientsFunction
periodic_central_derivative_coefficients(derivative_order, accuracy_order, T=Float64, mode=FastMode())

Create the PeriodicDerivativeCoefficients approximating the derivative_order-th derivative with an order of accuracy accuracy_order and scalar type T. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode()).

source
SummationByPartsOperators.periodic_central_derivative_operatorFunction
periodic_central_derivative_operator(derivative_order, accuracy_order,
+                                     xmin, xmax, N, mode=FastMode())

Create a PeriodicDerivativeOperator approximating the derivative_order-th derivative on a uniform grid between xmin and xmax with N grid points up to order of accuracy accuracy_order. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.periodic_derivative_coefficientsFunction
periodic_derivative_coefficients(derivative_order, accuracy_order,
                                  left_offset=-(accuracy_order+1)÷2,
-                                 T=Float64, mode=FastMode())

Create the PeriodicDerivativeCoefficients approximating the derivative_order-th derivative with an order of accuracy accuracy_order and scalar type T where the leftmost grid point used is determined by left_offset. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode()`.

source
SummationByPartsOperators.periodic_derivative_coefficientsMethod
periodic_derivative_coefficients(source::Holoborodko2008, derivative_order, accuracy_order;
+                                 T=Float64, mode=FastMode())

Create the PeriodicDerivativeCoefficients approximating the derivative_order-th derivative with an order of accuracy accuracy_order and scalar type T where the leftmost grid point used is determined by left_offset. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode()`.

source
SummationByPartsOperators.periodic_derivative_coefficientsMethod
periodic_derivative_coefficients(source::Holoborodko2008, derivative_order, accuracy_order;
                                  T=Float64, mode=FastMode(),
-                                 stencil_width=accuracy_order+3)

Create the PeriodicDerivativeCoefficients approximating the derivative_order-th derivative with an order of accuracy accuracy_order and scalar type T given by Holoborodko2008. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode()`.

source
SummationByPartsOperators.periodic_derivative_operatorFunction
periodic_derivative_operator(derivative_order, accuracy_order, grid,
-                             left_offset=-(accuracy_order+1)÷2, mode=FastMode())

Create a PeriodicDerivativeOperator approximating the derivative_order-th derivative on the uniform grid up to order of accuracy accuracy_order where the leftmost grid point used is determined by left_offset. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode()).

source
SummationByPartsOperators.periodic_derivative_operatorFunction
periodic_derivative_operator(derivative_order, accuracy_order,
+                                 stencil_width=accuracy_order+3)

Create the PeriodicDerivativeCoefficients approximating the derivative_order-th derivative with an order of accuracy accuracy_order and scalar type T given by Holoborodko2008. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode()`.

source
SummationByPartsOperators.periodic_derivative_operatorFunction
periodic_derivative_operator(derivative_order, accuracy_order, grid,
+                             left_offset=-(accuracy_order+1)÷2, mode=FastMode())

Create a PeriodicDerivativeOperator approximating the derivative_order-th derivative on the uniform grid up to order of accuracy accuracy_order where the leftmost grid point used is determined by left_offset. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode()).

source
SummationByPartsOperators.periodic_derivative_operatorFunction
periodic_derivative_operator(derivative_order, accuracy_order,
                              xmin, xmax, N,
                              left_offset=-(accuracy_order+1)÷2,
                              mode=FastMode())
@@ -54,7 +54,7 @@
 Periodic first-derivative operator of order 2 on a grid in [0.0, 1.0] using 11 nodes,
 stencils with 1 nodes to the left, 1 nodes to the right, and coefficients of Fornberg (1998)
   Calculation of Weights in Finite Difference Formulas.
-  SIAM Rev. 40.3, pp. 685-691.
source
SummationByPartsOperators.periodic_derivative_operatorMethod
periodic_derivative_operator(source::Holoborodko2008,
+  SIAM Rev. 40.3, pp. 685-691.
source
SummationByPartsOperators.periodic_derivative_operatorMethod
periodic_derivative_operator(source::Holoborodko2008,
                              derivative_order, accuracy_order,
                              xmin, xmax, N; mode=FastMode(), kwargs...)
 periodic_derivative_operator(source::Holoborodko2008;
@@ -64,7 +64,7 @@
 Periodic first-derivative operator of order 2 on a grid in [0.0, 1.0] using 11 nodes,
 stencils with 2 nodes to the left, 2 nodes to the right, and coefficients of   Holoborodko (2008)
   Smooth Noise Robust Differentiators.
-  http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/
source
SummationByPartsOperators.right_boundary_weightFunction
right_boundary_weight(D)

Return the left-boundary weight of the (diagonal) mass matrix M associated to the derivative operator D.

source
SummationByPartsOperators.semidiscretizeMethod
semidiscretize(u0func, semi::AbstractSemidiscretization, tspan)

Apply the semidiscretization semi to the initial data given by u0func and return an ODEProblem with time span tspan.

source
SummationByPartsOperators.source_of_coefficientsMethod
source_of_coefficients(D)

Return the source of coefficients of the derivative operator D. If you use the operator D for your research, please cite this source in addition to SummationByPartsOperators.

source
SummationByPartsOperators.upwind_operatorsMethod
upwind_operators(source_type, args...; derivative_order = 1, kwargs...)

Create UpwindOperators from the given source type. The positional arguments args... and keyword arguments kwargs... are passed directly to derivative_operator.

Examples

julia> D = upwind_operators(Mattsson2017, accuracy_order = 2,
+  http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/
source
SummationByPartsOperators.right_boundary_weightFunction
right_boundary_weight(D)

Return the left-boundary weight of the (diagonal) mass matrix M associated to the derivative operator D.

source
SummationByPartsOperators.semidiscretizeMethod
semidiscretize(u0func, semi::AbstractSemidiscretization, tspan)

Apply the semidiscretization semi to the initial data given by u0func and return an ODEProblem with time span tspan.

source
SummationByPartsOperators.source_of_coefficientsMethod
source_of_coefficients(D)

Return the source of coefficients of the derivative operator D. If you use the operator D for your research, please cite this source in addition to SummationByPartsOperators.

source
SummationByPartsOperators.upwind_operatorsMethod
upwind_operators(source_type, args...; derivative_order = 1, kwargs...)

Create UpwindOperators from the given source type. The positional arguments args... and keyword arguments kwargs... are passed directly to derivative_operator.

Examples

julia> D = upwind_operators(Mattsson2017, accuracy_order = 2,
                             xmin = 0//1, xmax = 9//1, N = 10)
 Upwind SBP first-derivative operators of order 2 on a grid in [0//1, 9//1] using 10 nodes
 and coefficients of Mattsson2017
@@ -94,7 +94,7 @@
   0//1   0//1   0//1   0//1   1//4  -1//1   0//1   1//1  -1//4   0//1
   0//1   0//1   0//1   0//1   0//1   1//4  -1//1   0//1   1//1  -1//4
   0//1   0//1   0//1   0//1   0//1   0//1   1//5  -4//5   0//1   3//5
-  0//1   0//1   0//1   0//1   0//1   0//1   0//1   1//1  -3//1   2//1
source
SummationByPartsOperators.upwind_operatorsMethod
upwind_operators(periodic_derivative_operator;
+  0//1   0//1   0//1   0//1   0//1   0//1   0//1   1//1  -3//1   2//1
source
SummationByPartsOperators.upwind_operatorsMethod
upwind_operators(periodic_derivative_operator;
                  derivative_order = 1, accuracy_order,
                  xmin, xmax, N,
                  mode = FastMode()))

Create PeriodicUpwindOperators from operators constructed by periodic_derivative_operator. The keyword arguments are passed directly to periodic_derivative_operator.

Examples

julia> D = upwind_operators(periodic_derivative_operator, accuracy_order = 2,
@@ -123,6 +123,6 @@
   0//1   0//1   1//4  -1//1   0//1   1//1  -1//4   0//1
   0//1   0//1   0//1   1//4  -1//1   0//1   1//1  -1//4
  -1//4   0//1   0//1   0//1   1//4  -1//1   0//1   1//1
-  1//1  -1//4   0//1   0//1   0//1   1//4  -1//1   0//1
source
SummationByPartsOperators.var_coef_derivative_operatorFunction
var_coef_derivative_operator(source_of_coefficients, derivative_order, accuracy_order,
+  1//1  -1//4   0//1   0//1   0//1   1//4  -1//1   0//1
source
SummationByPartsOperators.var_coef_derivative_operatorFunction
var_coef_derivative_operator(source_of_coefficients, derivative_order, accuracy_order,
                              xmin, xmax, N, left_weights, right_weights, bfunc,
-                             mode=FastMode())

Create a VarCoefDerivativeOperator approximating a derivative_order-th derivative with variable coefficients bfunc on a grid between xmin and xmax with N grid points up to order of accuracy accuracy_order with coefficients given by source_of_coefficients. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.xmaxFunction
xmax(D)

Return the right boundary xmax of the domain specified when constructing the derivative operator D. Note that this might be different from the rightmost node of the grid of D when not all boundary nodes are included, e.g., for periodic derivative operators.

source
SummationByPartsOperators.xminFunction
xmin(D)

Return the left boundary xmin of the domain specified when constructing the derivative operator D. Note that this might be different from the leftmost node of the grid of D when not all boundary nodes are included, e.g., for periodic derivative operators.

source
+ mode=FastMode())

Create a VarCoefDerivativeOperator approximating a derivative_order-th derivative with variable coefficients bfunc on a grid between xmin and xmax with N grid points up to order of accuracy accuracy_order with coefficients given by source_of_coefficients. The evaluation of the derivative can be parallelized using threads by choosing mode=ThreadedMode().

source
SummationByPartsOperators.xmaxFunction
xmax(D)

Return the right boundary xmax of the domain specified when constructing the derivative operator D. Note that this might be different from the rightmost node of the grid of D when not all boundary nodes are included, e.g., for periodic derivative operators.

source
SummationByPartsOperators.xminFunction
xmin(D)

Return the left boundary xmin of the domain specified when constructing the derivative operator D. Note that this might be different from the leftmost node of the grid of D when not all boundary nodes are included, e.g., for periodic derivative operators.

source
diff --git a/dev/applications/index.html b/dev/applications/index.html index 5c2c3681..9dfc4334 100644 --- a/dev/applications/index.html +++ b/dev/applications/index.html @@ -1,2 +1,2 @@ -Applications & references · SummationByPartsOperators.jl

Applications

Here is a (non-exhaustive) list of research using SummationByPartsOperators.jl.

  • Jesse Chan, Hendrik Ranocha, Andrés M. Rueda-Ramírez, Gregor Gassner, Tim Warburton (2022). On the Entropy Projection and the Robustness of High Order Entropy Stable Discontinuous Galerkin Schemes for Under-Resolved Flows. arXiv: 2203.10238 [math.NA] DOI: 10.3389/fphy.2022.898028 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.6364108
  • Hendrik Ranocha, Manuel Quezada de Luna, and David I Ketcheson (2021). On the Rate of Error Growth in Time for Numerical Solutions of Nonlinear Dispersive Wave Equations. arXiv: 2102.07376 [math.NA] DOI: 10.1007/s42985-021-00126-3 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.4540467
  • Hendrik Ranocha, Dimitrios Mitsotakis, and David I Ketcheson (2021). A Broad Class of Conservative Numerical Methods for Dispersive Wave Equations. DOI: 10.4208/cicp.OA-2020-0119 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.3908803
  • Philippe G LeFloch and Hendrik Ranocha (2021). Kinetic functions for nonclassical shocks, entropy stability, and discrete summation by parts. DOI: 10.1007/s10915-021-01463-6
  • Jan Nordström and Hendrik Ranocha (2021). A New Class of A Stable Summation by Parts Time Integration Schemes with Strong Initial Conditions. DOI: 10.1007/s10915-021-01454-7 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.3699173
  • Hendrik Ranocha (2021). On Strong Stability of Explicit Runge-Kutta Methods for Nonlinear Semibounded Operators. DOI: 10.1093/imanum/drz070
  • Hendrik Ranocha and David I Ketcheson (2020). Energy Stability of Explicit Runge-Kutta Methods for Nonautonomous or Nonlinear Problems. DOI: 10.1137/19M1290346 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.3464243
  • Hendrik Ranocha, Katharina Ostaszewski, and Philip Heinisch (2020). Discrete Vector Calculus and Helmholtz Hodge Decomposition for Classical Finite Difference Summation by Parts Operators. DOI: 10.1007/s42967-019-00057-2 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.3375170
  • Hendrik Ranocha and Gregor J Gassner (2020). Preventing pressure oscillations does not fix local linear stability issues of entropy-based split-form high-order schemes. arXiv: 2009.13139 [math.NA] A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.4054366
  • Philipp Öffner and Hendrik Ranocha (2019). Error Boundedness of Discontinuous Galerkin Methods with Variable Coefficients. DOI: 10.1007/s10915-018-00902-1

If you use this package for your own research, please cite it as described in the documentation and make a PR to add your work to the list above.

+Applications & references · SummationByPartsOperators.jl

Applications

Here is a (non-exhaustive) list of research using SummationByPartsOperators.jl.

  • Jesse Chan, Hendrik Ranocha, Andrés M. Rueda-Ramírez, Gregor Gassner, Tim Warburton (2022). On the Entropy Projection and the Robustness of High Order Entropy Stable Discontinuous Galerkin Schemes for Under-Resolved Flows. arXiv: 2203.10238 [math.NA] DOI: 10.3389/fphy.2022.898028 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.6364108
  • Hendrik Ranocha, Manuel Quezada de Luna, and David I Ketcheson (2021). On the Rate of Error Growth in Time for Numerical Solutions of Nonlinear Dispersive Wave Equations. arXiv: 2102.07376 [math.NA] DOI: 10.1007/s42985-021-00126-3 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.4540467
  • Hendrik Ranocha, Dimitrios Mitsotakis, and David I Ketcheson (2021). A Broad Class of Conservative Numerical Methods for Dispersive Wave Equations. DOI: 10.4208/cicp.OA-2020-0119 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.3908803
  • Philippe G LeFloch and Hendrik Ranocha (2021). Kinetic functions for nonclassical shocks, entropy stability, and discrete summation by parts. DOI: 10.1007/s10915-021-01463-6
  • Jan Nordström and Hendrik Ranocha (2021). A New Class of A Stable Summation by Parts Time Integration Schemes with Strong Initial Conditions. DOI: 10.1007/s10915-021-01454-7 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.3699173
  • Hendrik Ranocha (2021). On Strong Stability of Explicit Runge-Kutta Methods for Nonlinear Semibounded Operators. DOI: 10.1093/imanum/drz070
  • Hendrik Ranocha and David I Ketcheson (2020). Energy Stability of Explicit Runge-Kutta Methods for Nonautonomous or Nonlinear Problems. DOI: 10.1137/19M1290346 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.3464243
  • Hendrik Ranocha, Katharina Ostaszewski, and Philip Heinisch (2020). Discrete Vector Calculus and Helmholtz Hodge Decomposition for Classical Finite Difference Summation by Parts Operators. DOI: 10.1007/s42967-019-00057-2 A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.3375170
  • Hendrik Ranocha and Gregor J Gassner (2020). Preventing pressure oscillations does not fix local linear stability issues of entropy-based split-form high-order schemes. arXiv: 2009.13139 [math.NA] A reproducibility repository containing source code for all numerical experiments is available at DOI: 10.5281/zenodo.4054366
  • Philipp Öffner and Hendrik Ranocha (2019). Error Boundedness of Discontinuous Galerkin Methods with Variable Coefficients. DOI: 10.1007/s10915-018-00902-1

If you use this package for your own research, please cite it as described in the documentation and make a PR to add your work to the list above.

diff --git a/dev/benchmarks/index.html b/dev/benchmarks/index.html index 91080563..dab5770a 100644 --- a/dev/benchmarks/index.html +++ b/dev/benchmarks/index.html @@ -26,23 +26,23 @@ println() end
doit (generic function with 1 method)

First, we benchmark the implementation from SummationByPartsOperators.jl.

doit(D_SBP, "D_SBP:", du, u)
D_SBP:
 BenchmarkTools.Trial: 10000 samples with 995 evaluations.
- Range (minmax):  29.089 ns58.703 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     29.775 ns               GC (median):    0.00%
- Time  (mean ± σ):   29.901 ns ±  1.093 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  28.646 ns58.914 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     29.361 ns               GC (median):    0.00%
+ Time  (mean ± σ):   29.598 ns ±  1.357 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-      ▁▄▄▄▇▇████▆▅▄▃▃▁▁                                     
-  ▂▃▅▇██████████████████▆▆▅▄▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▁▂▂▂▂▂▂▁▂▂ ▄
-  29.1 ns         Histogram: frequency by time        32.1 ns <
+    ▅█▆                                                    
+  ▃████▇▆▄▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▁▂▂▂▂▂▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▂▂▂▂▂▂ ▃
+  28.6 ns         Histogram: frequency by time        37.3 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Next, we compare this to the runtime obtained using a sparse matrix representation of the derivative operator. Depending on the hardware etc., this can be an order of magnitude slower than the optimized implementation from SummationByPartsOperators.jl.

doit(D_sparse, "D_sparse:", du, u)
D_sparse:
-BenchmarkTools.Trial: 10000 samples with 656 evaluations.
- Range (minmax):  187.959 ns388.363 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     194.541 ns                GC (median):    0.00%
- Time  (mean ± σ):   196.902 ns ±  14.960 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 671 evaluations.
+ Range (minmax):  186.158 ns304.844 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     198.939 ns                GC (median):    0.00%
+ Time  (mean ± σ):   198.937 ns ±   5.098 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-      ▂▇██                                                   
-  ▁▁▃▆████▆▄▃▂▂▂▁▁▁▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
-  188 ns           Histogram: frequency by time          240 ns <
+      ▁▂▂▂▂▂▁              ▂█▇▅▄▂▁▁                            ▂
+  ▅▄▆▇██████████▇▇▅▅▅▆▅▄▅▄▃█████████▇▆▆▆▅▅▆▅▅▅▄▆▆▅▅███▇▇▆▆▄▄▂▄ █
+  186 ns        Histogram: log(frequency) by time        215 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Finally, we benchmark the implementation of the same derivative operator in DiffEqOperators.jl.

doit(D_DEO, "D_DEO:", du, u)
D_DEO:
 ┌ Warning: #= /home/runner/.julia/packages/DiffEqOperators/lHq9u/src/derivative_operators/convolutions.jl:412 =#:
@@ -53,14 +53,14 @@
 `LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead.
 Use `warn_check_args=false`, e.g. `@turbo warn_check_args=false ...`, to disable this warning.
 @ DiffEqOperators ~/.julia/packages/LoopVectorization/QgYWB/src/condense_loopset.jl:1166
-BenchmarkTools.Trial: 10000 samples with 102 evaluations.
- Range (minmax):  782.735 ns79.749 μs   GC (min … max): 0.00% … 98.31%
- Time  (median):     800.804 ns               GC (median):    0.00%
- Time  (mean ± σ):   854.872 ns ±  1.714 μs   GC (mean ± σ):  4.45% ±  2.20%
+BenchmarkTools.Trial: 10000 samples with 110 evaluations.
+ Range (minmax):  769.164 ns65.728 μs   GC (min … max): 0.00% … 98.37%
+ Time  (median):     784.818 ns               GC (median):    0.00%
+ Time  (mean ± σ):   831.009 ns ±  1.521 μs   GC (mean ± σ):  4.47% ±  2.41%
 
-   ▄▇██▆▅▄▃▃▃▂▁▂▁▁▂▃▂▂▁▁▁                     ▁              ▂
-  ▆███████████████████████████▇████▆▇▇▆▇▇████████▇▆▆▆▆▆▄▅▃▄▅ █
-  783 ns        Histogram: log(frequency) by time       990 ns <
+    ▂▅▆▇██▆▅▄▃▂▂▁▁  ▁       ▁▁▂▁  ▁▁▂▂▁                      ▂
+  ▅███████████████████▇▆▅▆▇▇████████████▇▇▇███▇▇███▆▆▆▅▆▆▅▅▄ █
+  769 ns        Histogram: log(frequency) by time       894 ns <
 
  Memory estimate: 416 bytes, allocs estimate: 6.

These results were obtained using the following versions.

using InteractiveUtils
 versioninfo()
@@ -79,7 +79,7 @@
   JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager
       Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml`
   [9fdde737] DiffEqOperators v4.45.0
-  [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`

Bounded domains

We start again by setting up some benchmark code.

using BenchmarkTools
+  [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`

Bounded domains

We start again by setting up some benchmark code.

using BenchmarkTools
 using LinearAlgebra, SparseArrays
 using SummationByPartsOperators, BandedMatrices
 
@@ -103,33 +103,33 @@
   println()
 end
doit (generic function with 1 method)

First, we benchmark the implementation from SummationByPartsOperators.jl.

doit(D_SBP, "D_SBP:", du, u)
D_SBP:
 BenchmarkTools.Trial: 10000 samples with 203 evaluations.
- Range (minmax):  382.143 ns587.552 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     386.586 ns                GC (median):    0.00%
- Time  (mean ± σ):   388.468 ns ±  10.913 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  381.350 ns531.039 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     386.286 ns                GC (median):    0.00%
+ Time  (mean ± σ):   387.618 ns ±   7.925 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-   ▄▆██▄▃▁                                                   ▂
-  █████████▆▆▇▆█▅▇▆▄▅▁▁▃▄▁▄▁▁▁▄▄▅▅▆▆▆▅▆▄▄▅▇█▇█▇▆▃▅▆▅▄▄▅▄▃▃▃▄ █
-  382 ns        Histogram: log(frequency) by time        439 ns <
+      ▃█                                                      
+  ▂▂▃▇██▅▃▃▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▁▁▁▁▂▁▁▂▂▂▂▂▂▂▁▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
+  381 ns           Histogram: frequency by time          429 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Again, we compare this to a representation of the derivative operator as a sparse matrix. No surprise - it is again much slower, as in periodic domains.

doit(D_sparse, "D_sparse:", du, u)
D_sparse:
 BenchmarkTools.Trial: 10000 samples with 7 evaluations.
- Range (minmax):  4.460 μs 11.619 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     4.487 μs                GC (median):    0.00%
- Time  (mean ± σ):   4.509 μs ± 190.759 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  4.457 μs  9.755 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     4.481 μs                GC (median):    0.00%
+ Time  (mean ± σ):   4.498 μs ± 164.651 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-  ▆                                                         ▁
-  █▄▄▅█▇▃▁▄▁▃▃▅▆▅▄▅▄▃▁▃▁▃▃▃▁▁▁▁▁▃▁▃▁▁▁▁▃▁▁▁▁▃▁▃▁▁▃▁▁▄▃▄▅▅▅▆ █
-  4.46 μs      Histogram: log(frequency) by time      5.66 μs <
+   █                                                         
+  ▄█▂▁▁▂▂▁▂▁▁▂▁▁▁▁▁▂▂▂▂▂▂▂▁▂▂▁▂▁▁▁▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▂▂ ▂
+  4.46 μs         Histogram: frequency by time        5.28 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

FInally, we compare it to a representation as banded matrix. Disappointingly, this is still much slower than the optimized implementation from SummationByPartsOperators.jl.

doit(D_banded, "D_banded:", du, u)
D_banded:
 BenchmarkTools.Trial: 10000 samples with 5 evaluations.
- Range (minmax):  6.640 μs 12.580 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     6.656 μs                GC (median):    0.00%
- Time  (mean ± σ):   6.686 μs ± 298.370 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  6.658 μs 12.812 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     6.684 μs                GC (median):    0.00%
+ Time  (mean ± σ):   6.709 μs ± 239.210 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-  █                                                           ▁
-  █▄▃▇█▃▁▁▁▁▁▄▅▅▄▄▄▄▄▁▃▁▁▁▃▁▃▃▁▃▁▃▃▁▁▄▃▁▃▁▃▁▁▁▁▁▁▁▁▁▁▁▃▄▄▅▅ █
-  6.64 μs      Histogram: log(frequency) by time       8.3 μs <
+  █                                                          
+  █▁▁▁▂▁▁▁▁▁▁▂▂▂▂▂▂▂▂▁▁▂▁▁▁▂▂▁▂▁▁▁▁▁▁▁▁▂▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▂▂ ▂
+  6.66 μs         Histogram: frequency by time        8.25 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

These results were obtained using the following versions.

using InteractiveUtils
 versioninfo()
@@ -148,7 +148,7 @@
   JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager
       Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml`
   [aae01518] BandedMatrices v0.17.18
-  [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`

Dissipation operators

We follow the same structure as before. At first, we set up some benchmark code.

using BenchmarkTools
+  [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`

Dissipation operators

We follow the same structure as before. At first, we set up some benchmark code.

using BenchmarkTools
 using LinearAlgebra, SparseArrays
 using SummationByPartsOperators, BandedMatrices
 
@@ -174,57 +174,57 @@
   println()
 end
doit (generic function with 1 method)

At first, let us benchmark the derivative and dissipation operators implemented in SummationByPartsOperators.jl.

doit(D_SBP, "D_SBP:", du, u)
 doit(Di_SBP, "Di_SBP:", du, u)
D_SBP:
-BenchmarkTools.Trial: 10000 samples with 203 evaluations.
- Range (minmax):  386.483 ns625.207 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     390.734 ns                GC (median):    0.00%
- Time  (mean ± σ):   392.099 ns ±   8.936 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 199 evaluations.
+ Range (minmax):  431.055 ns559.432 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     436.693 ns                GC (median):    0.00%
+ Time  (mean ± σ):   438.169 ns ±   8.363 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-     ▃▇                                                       
-  ▂▃▆██▅▄▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▁▂▂▁▁▁▁▂▁▂▂▁▁▁▁▂▁▁▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
-  386 ns           Histogram: frequency by time          435 ns <
+    ▁▄▆██▅▄▂▁                                                ▂
+  ▄▆█████████▇▇▅▇█▇▇▇▆▅▅▃▃▁▁▁▃▁▁▁▁▃▁▅▃▃▆▃▃▄▄▆▅▄▅▃▄▁▅▆████▇▇▇ █
+  431 ns        Histogram: log(frequency) by time        479 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 Di_SBP:
 BenchmarkTools.Trial: 10000 samples with 10 evaluations.
- Range (minmax):  1.016 μs 3.007 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     1.026 μs               GC (median):    0.00%
- Time  (mean ± σ):   1.034 μs ± 74.660 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  1.044 μs 3.257 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     1.058 μs               GC (median):    0.00%
+ Time  (mean ± σ):   1.062 μs ± 53.083 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-  ▇                                                        ▁
-  █▇▁▁▁▁▁▃▄▇▄▃▁▁▁▁▁▁▁▁▁▁▁▃▃▄▃▅▄▁▄▃▄▁▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▇ █
-  1.02 μs      Histogram: log(frequency) by time     1.46 μs <
+                  ▂ ▄ ▆ ▇ █  ▃ ▂▃ ▂ ▁ ▁                     
+  ▂▁▂▂▁▂▁▂▁▃▁▄▁▅▄▅█▁█▁█▁█▁█▁▆█▅██▁██▁█▁▇▁▇▃▅▅▁▄▁▄▁▃▁▃▁▂▁▂▂ ▄
+  1.04 μs        Histogram: frequency by time        1.08 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Next, we compare the results to sparse matrix representations. It will not come as a surprise that these are again much (around an order of magnitude) slower.

doit(Di_sparse, "Di_sparse:", du, u)
 doit(Di_banded, "Di_banded:", du, u)
Di_sparse:
 BenchmarkTools.Trial: 10000 samples with 6 evaluations.
- Range (minmax):  5.317 μs 12.291 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     5.375 μs                GC (median):    0.00%
- Time  (mean ± σ):   5.414 μs ± 327.372 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  5.445 μs  9.184 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     5.547 μs                GC (median):    0.00%
+ Time  (mean ± σ):   5.570 μs ± 201.796 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-  ▂▇                                                       ▂
-  ██▁▇█▆▄▁▁▄▁▄▆▅▅▅▄▄▆▆▁▁▃▄▁▃▃▁▁▁▁▃▁▁▁▁▃▁▁▃▃▁▁▁▁▄▃▁▁▄▅▅▆▆▆▆ █
-  5.32 μs      Histogram: log(frequency) by time      6.78 μs <
+     ▇                                                      
+  ▂▃▇█▄▂▂▂▂▂▂▁▁▂▂▂▂▂▂▂▁▂▁▁▂▁▁▁▁▂▂▂▂▂▁▁▁▁▂▁▁▁▁▁▁▁▂▂▂▁▂▁▂▁▂▂▂ ▂
+  5.45 μs         Histogram: frequency by time        6.89 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 Di_banded:
 BenchmarkTools.Trial: 10000 samples with 5 evaluations.
- Range (minmax):  6.186 μs 13.405 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     6.216 μs                GC (median):    0.00%
- Time  (mean ± σ):   6.416 μs ± 407.010 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  6.173 μs 14.962 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     6.195 μs                GC (median):    0.00%
+ Time  (mean ± σ):   6.416 μs ± 399.132 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-  █                                                          
-  █▂▂▂▁▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂█▅▂▁▂▂▂▂▁▁▁▁▁▂▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▂▂▂▂▂▂▂ ▂
-  6.19 μs         Histogram: frequency by time        7.83 μs <
+  █                               ▂                           
+  █▂▂▁▁▁▁▂▁▁▂▁▁▁▁▁▂▂▂▂▂▂▁▂▂▂▁▂▂▂█▃▂▂▂▂▁▁▁▁▂▁▂▁▁▁▁▁▂▂▂▂▂▁▁▁▂ ▂
+  6.17 μs         Histogram: frequency by time        7.37 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Finally, let's benchmark the same computation if a full (dense) matrix is used to represent the derivative operator. This is obviously a bad idea but 🤷

doit(Di_full, "Di_full:", du, u)
Di_full:
 BenchmarkTools.Trial: 10000 samples with 1 evaluation.
- Range (minmax):  138.278 μs387.955 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     140.593 μs                GC (median):    0.00%
- Time  (mean ± σ):   142.203 μs ±   7.599 μs   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  136.735 μs329.704 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     139.370 μs                GC (median):    0.00%
+ Time  (mean ± σ):   140.572 μs ±   7.811 μs   GC (mean ± σ):  0.00% ± 0.00%
 
-   ▂▅▇█▆▅▄▂▂▁▁            ▁  ▁▁                               ▂
-  ▆████████████▇▇▇▆▆▆▆▆▆▆▇████████▆▇▆▆▆▅▅▄▅▆▄▅▄▅▄▅▄▅▅▄▄▄▄▅▂▃▅ █
-  138 μs        Histogram: log(frequency) by time        166 μs <
+  ▁▅▅█ ▁         ▂▂                                           ▂
+  ████▇██▄▄▃▁▅▆▇▇████▇▆▃▃▃▃▄▅▆▆▇▆▆▅▅▆▁▄▃▁▃▁▁▃▃▃▃▁▁▃▁▁▁▁▃▁▄▁▁▃ █
+  137 μs        Histogram: log(frequency) by time        180 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

These results were obtained using the following versions.

using InteractiveUtils
 versioninfo()
@@ -243,7 +243,7 @@
   JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager
       Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml`
   [aae01518] BandedMatrices v0.17.18
-  [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`

Structure-of-Arrays (SoA) and Array-of-Structures (AoS)

SummationByPartsOperators.jl tries to provide efficient support of

To demonstrate this, let us set up some benchmark code.

using BenchmarkTools
+  [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`

Structure-of-Arrays (SoA) and Array-of-Structures (AoS)

SummationByPartsOperators.jl tries to provide efficient support of

To demonstrate this, let us set up some benchmark code.

using BenchmarkTools
 using StaticArrays, StructArrays
 using LinearAlgebra, SparseArrays
 using SummationByPartsOperators
@@ -300,36 +300,36 @@
 println("\nD_full")
 show(stdout, MIME"text/plain"(), @benchmark mul!($du, $D_full, $u))
Scalar case
 D_SBP
-BenchmarkTools.Trial: 10000 samples with 989 evaluations.
- Range (minmax):  44.685 ns90.746 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     46.467 ns               GC (median):    0.00%
- Time  (mean ± σ):   46.735 ns ±  2.336 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 987 evaluations.
+ Range (minmax):  49.007 ns81.083 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     49.798 ns               GC (median):    0.00%
+ Time  (mean ± σ):   49.998 ns ±  1.282 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-        ▁▃▂██▂                                              
-  ▂▂▁▁▂▅██████▇▅▄▃▃▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▁▂▁▂▁▂▁▁▁▁▁▂▁▂▁▁▂▂▂▂▂▂▂▂▂ ▃
-  44.7 ns         Histogram: frequency by time        54.6 ns <
+    ▄▇█                                                    
+  ▂▆████▆▅▄▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▂▁▁▁▁▁▂▁▂▂▂▂▂▂▂ ▃
+  49 ns           Histogram: frequency by time        57.6 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_sparse
-BenchmarkTools.Trial: 10000 samples with 231 evaluations.
- Range (minmax):  319.472 ns509.654 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     329.229 ns                GC (median):    0.00%
- Time  (mean ± σ):   331.516 ns ±  10.141 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 230 evaluations.
+ Range (minmax):  324.561 ns514.739 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     331.270 ns                GC (median):    0.00%
+ Time  (mean ± σ):   332.872 ns ±   8.164 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-         ▄▇█▆▃▁                                                
-  ▂▂▂▂▃▄███████▆▆▅▄▄▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
-  319 ns           Histogram: frequency by time          374 ns <
+       ▃▅▇█▇                                                 
+  ▂▂▃▄▇█████▇▆▅▄▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▁▁▁▁▁▂▂▂▂▂▂▂▂▂▂▂▂ ▃
+  325 ns           Histogram: frequency by time          368 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_full
 BenchmarkTools.Trial: 10000 samples with 10 evaluations.
- Range (minmax):  1.710 μs 4.440 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     1.723 μs               GC (median):    0.00%
- Time  (mean ± σ):   1.734 μs ± 96.922 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  1.727 μs 4.553 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     1.741 μs               GC (median):    0.00%
+ Time  (mean ± σ):   1.750 μs ± 85.281 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-  █                                                        ▂
-  █▅▅▁▁▇▇▃▁▁▁▁▃▁▃▃▄▄▄▃▄▃▄▁▁▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▃▁▁▁▁▃▁▃▁▁▁▃▁▁▆ █
-  1.71 μs      Histogram: log(frequency) by time     2.38 μs <
+    █▇                                                     
+  ▂▅██▃▂▂▂▂▂▁▁▁▁▁▁▁▁▁▂▂▁▂▁▁▂▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▂▂▂▂▂ ▃
+  1.73 μs        Histogram: frequency by time        1.94 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Next, we use a plain array of structures (AoS) in the form of a two-dimensional array and our custom mul_aos! implementation that loops over each component, using mul! on views. Here, the differences between the timings are less pronounced.

println("Plain Array of Structures")
 u_aos_plain = randn(T, 5, size(D_SBP, 1)); du_aos_plain = similar(u_aos_plain)
@@ -341,35 +341,35 @@
 show(stdout, MIME"text/plain"(), @benchmark mul_aos!($du_aos_plain, $D_full, $u_aos_plain))
Plain Array of Structures
 D_SBP
 BenchmarkTools.Trial: 10000 samples with 10 evaluations.
- Range (minmax):  1.302 μs 3.781 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     1.313 μs               GC (median):    0.00%
- Time  (mean ± σ):   1.318 μs ± 67.032 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  1.294 μs  3.531 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     1.308 μs                GC (median):    0.00%
+ Time  (mean ± σ):   1.326 μs ± 112.662 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-                   ▁    ▇ █ ▇ ▄  ▃                           
-  ▂▁▂▁▂▁▂▁▂▁▃▂▁▄▁▆▁█▁█▇▁█▁█▁██▁▁█▁█▁▇▁▁▄▅▁▆▁▅▁▄▁▂▃▁▃▁▃▁▂▁▂ ▃
-  1.3 μs         Histogram: frequency by time        1.33 μs <
+  ▄                                                        ▁
+  ██▆▁▁▃▁▅▆▄▁▁▁▃▁▁▃▃▃▁▄▄▄▄▄▃▄▁▄▃▃▄▁▄▃▁▄▁▃▅▃▅▅▅▅▅▅▅▆▇▇▇▆▇▆▆▅ █
+  1.29 μs      Histogram: log(frequency) by time      1.82 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_sparse
 BenchmarkTools.Trial: 10000 samples with 9 evaluations.
- Range (minmax):  2.347 μs  7.195 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     2.408 μs                GC (median):    0.00%
- Time  (mean ± σ):   2.421 μs ± 133.190 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  2.331 μs  5.714 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     2.370 μs                GC (median):    0.00%
+ Time  (mean ± σ):   2.388 μs ± 140.679 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-    ▁█                                                      
-  ▂▄██▄▃▂▂▂▂▂▁▁▁▂▂▂▂▂▂▂▂▂▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▁▁▁▁▁▂▁▂ ▂
-  2.35 μs         Histogram: frequency by time        3.24 μs <
+  ▃▇█▁                                                      ▂
+  ████▇▃▄▄▄▁▃▁▃▄▄▆▅▃▅▁▁▄▁▁▃▄▄▄▃▁▃▁▁▃▄▁▄▁▃▃▁▁▃▇▅▃▃▃▄▃▁▃▁▄▃▅▅ █
+  2.33 μs      Histogram: log(frequency) by time      3.22 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_full
 BenchmarkTools.Trial: 10000 samples with 3 evaluations.
- Range (minmax):  8.960 μs 23.865 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     9.027 μs                GC (median):    0.00%
- Time  (mean ± σ):   9.088 μs ± 576.999 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  8.883 μs21.290 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     8.940 μs               GC (median):    0.00%
+ Time  (mean ± σ):   9.181 μs ±  1.054 μs   GC (mean ± σ):  0.00% ± 0.00%
 
-  ▅                                                         ▁
-  █▅▅██▁▃▁▄▁▄▄▇▆▄▅▄▁▃▁▁▁▃▁▃▁▁▁▁▁▁▁▁▁▃▁▁▃▁▁▁▁▄▁▁▁▁▃▃▄▃▁▁▃▁▄ █
-  8.96 μs      Histogram: log(frequency) by time      11.7 μs <
+  █                                                         ▁
+  █▄▃▄▅█▅▅▄▁▁▃▃▁▄▄▄▁▁▁▃▃▃▅▅▄▄▆▅▄▅▅▅▄▄▄▄▄▄▄▄▅▅▅▅▆▆▆▇▇█▇███ █
+  8.88 μs      Histogram: log(frequency) by time     14.1 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Now, we use an array of structures (AoS) based on reinterpret and standard mul!. This is much more efficient for the implementation in SummationByPartsOperators.jl. In Julia v1.6, this is also more efficient for sparse matrices but less efficient for dense matrices (compared to the plain AoS approach with mul_aos! above).

println("Array of Structures (reinterpreted array)")
 u_aos_r = reinterpret(reshape, Vec5{T}, u_aos_plain); du_aos_r = similar(u_aos_r)
@@ -385,36 +385,36 @@
 D_SBP * u_aos_r ≈ D_sparse * u_aos_r ≈ D_full * u_aos_r = true
 reinterpret(reshape, T, du_aos_r) ≈ du_aos_plain = true
 D_SBP
-BenchmarkTools.Trial: 10000 samples with 550 evaluations.
- Range (minmax):  215.875 ns297.284 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     219.920 ns                GC (median):    0.00%
- Time  (mean ± σ):   221.268 ns ±   5.970 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 565 evaluations.
+ Range (minmax):  206.756 ns283.324 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     212.058 ns                GC (median):    0.00%
+ Time  (mean ± σ):   212.730 ns ±   3.580 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-     ▃▇█                                                      
-  ▂▃▆███▇▆▅▄▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
-  216 ns           Histogram: frequency by time          256 ns <
+             ▃▆▇█                                            
+  ▂▁▂▂▂▂▂▃▄▆█████▇▆▅▄▃▃▃▂▂▂▂▂▂▂▁▂▂▂▂▁▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
+  207 ns           Histogram: frequency by time          229 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_sparse
-BenchmarkTools.Trial: 10000 samples with 181 evaluations.
- Range (minmax):  576.934 ns 1.108 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     592.878 ns               GC (median):    0.00%
- Time  (mean ± σ):   595.460 ns ± 14.708 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 180 evaluations.
+ Range (minmax):  586.922 ns787.189 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     595.611 ns                GC (median):    0.00%
+ Time  (mean ± σ):   597.654 ns ±  11.200 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-            ▃▇█                                             
-  ▂▁▁▁▂▂▂▃▄▇███▇▅▄▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
-  577 ns          Histogram: frequency by time          650 ns <
+     ▁▃▅▇▇█▅▃▂▁   ▁▁                                ▁▁       ▂
+  ▃▆▇████████████████▇▇▅▆▁▄▃▁▄▁▁▁▃▄▁▁▁▃▁▁▁▁▁▁▁▅▆▄▇▇███▇▇▇▇▆▆ █
+  587 ns        Histogram: log(frequency) by time        646 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_full
 BenchmarkTools.Trial: 10000 samples with 4 evaluations.
- Range (minmax):  7.194 μs 15.827 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     7.266 μs                GC (median):    0.00%
- Time  (mean ± σ):   7.315 μs ± 459.315 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  7.208 μs 16.293 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     7.306 μs                GC (median):    0.00%
+ Time  (mean ± σ):   7.358 μs ± 496.764 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-   ▇                                                         
-  ▃█▂▂▂▂▂▁▁▁▁▁▂▂▂▂▂▂▂▂▂▁▁▁▁▁▁▁▁▁▂▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▂▂▂ ▂
-  7.19 μs         Histogram: frequency by time        9.31 μs <
+    █                                                        
+  ▂▆█▂▂▂▂▂▁▁▁▁▂▂▂▂▂▂▂▁▁▂▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▂▁▁▂▂▂▂ ▂
+  7.21 μs         Histogram: frequency by time        9.33 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Next, we still use an array of structures (AoS), but copy the data into a plain Array instead of using the reinterpreted versions. There is no significant difference to the previous version in this case.

println("Array of Structures")
 u_aos = Array(u_aos_r); du_aos = similar(u_aos)
@@ -430,36 +430,36 @@
 D_SBP * u_aos ≈ D_sparse * u_aos ≈ D_full * u_aos = true
 du_aos ≈ du_aos_r = true
 D_SBP
-BenchmarkTools.Trial: 10000 samples with 555 evaluations.
- Range (minmax):  219.058 ns337.027 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     222.036 ns                GC (median):    0.00%
- Time  (mean ± σ):   223.246 ns ±   5.911 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 560 evaluations.
+ Range (minmax):  206.455 ns296.123 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     211.071 ns                GC (median):    0.00%
+ Time  (mean ± σ):   211.768 ns ±   3.694 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-    ▃▇█▃▁▁▁              ▁▁                                   ▂
-  ▅████████▇▆▅▄▃▃▁▃▃▃▄▄▆███▇▆▆▆▆▅▆▇▆▆▅▅▅▄▃▃▄▁▄▁▃▃▄▃▃▃▄▅▆▆▅▅▆▄ █
-  219 ns        Histogram: log(frequency) by time        259 ns <
+           ▂▅▆█▅▄                                             
+  ▂▂▂▂▃▃▄▅████████▇▆▅▄▄▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▁▂▂▂▂▂▂▂▂▃▂▂▂▂▂▂▂ ▃
+  206 ns           Histogram: frequency by time          227 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_sparse
-BenchmarkTools.Trial: 10000 samples with 179 evaluations.
- Range (minmax):  585.670 ns 1.026 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     602.302 ns               GC (median):    0.00%
- Time  (mean ± σ):   605.180 ns ± 17.116 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 150 evaluations.
+ Range (minmax):  678.927 ns874.233 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     695.567 ns                GC (median):    0.00%
+ Time  (mean ± σ):   697.573 ns ±  12.202 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-           ▁▅█▇                                             
-  ▁▁▁▁▁▁▂▃▅████▆▄▃▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▂
-  586 ns          Histogram: frequency by time          664 ns <
+            ▁▃▇                                              
+  ▂▁▁▂▂▂▂▂▄▆███▇▄▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▁▁▂▁▁▂▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
+  679 ns           Histogram: frequency by time          755 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_full
 BenchmarkTools.Trial: 10000 samples with 4 evaluations.
- Range (minmax):  7.261 μs 23.323 μs   GC (min … max): 0.00% … 0.00%
- Time  (median):     7.359 μs                GC (median):    0.00%
- Time  (mean ± σ):   7.462 μs ± 910.966 ns   GC (mean ± σ):  0.00% ± 0.00%
+ Range (minmax):  7.286 μs22.761 μs   GC (min … max): 0.00% … 0.00%
+ Time  (median):     7.359 μs               GC (median):    0.00%
+ Time  (mean ± σ):   7.581 μs ±  1.301 μs   GC (mean ± σ):  0.00% ± 0.00%
 
-  ▅█                                                        ▂
-  ████▅▁▁▃▄▆▆▅▁▄▁▁▁▇▄▁▁▃▃▁▁▁▁▁▁▁▁▃▃▃▁▁▃▅█▆▅▆▅▄▄▃▁▃▁▄▁▁▃▃▃▃ █
-  7.26 μs      Histogram: log(frequency) by time      10.3 μs <
+                                                            ▁
+  ▆█▄▃▁▁▁▃▃▁▆▆▆▅▄▅▅▄▃▄▁▁▄▁▄▃▃▆▃▃▃▃▄▄▃▁▃▆▁▁▁▁▄▅▅▆▆▅▆▆▅▆▄▆▅ █
+  7.29 μs      Histogram: log(frequency) by time       16 μs <
 
  Memory estimate: 0 bytes, allocs estimate: 0.

Finally, let's look at a structure of arrays (SoA). Interestingly, this is slower than the array of structures we used above. On Julia v1.6, the sparse matrix representation performs particularly bad in this case.

println("Structure of Arrays")
 u_soa = StructArray(u_aos); du_soa = similar(u_soa)
@@ -475,36 +475,36 @@
 D_SBP * u_soa ≈ D_sparse * u_soa ≈ D_full * u_soa = true
 du_soa ≈ du_aos = true
 D_SBP
-BenchmarkTools.Trial: 10000 samples with 496 evaluations.
- Range (minmax):  220.454 ns321.550 ns   GC (min … max): 0.00% … 0.00%
- Time  (median):     222.756 ns                GC (median):    0.00%
- Time  (mean ± σ):   223.452 ns ±   3.952 ns   GC (mean ± σ):  0.00% ± 0.00%
+BenchmarkTools.Trial: 10000 samples with 478 evaluations.
+ Range (minmax):  224.351 ns345.224 ns   GC (min … max): 0.00% … 0.00%
+ Time  (median):     226.824 ns                GC (median):    0.00%
+ Time  (mean ± σ):   228.472 ns ±   9.283 ns   GC (mean ± σ):  0.00% ± 0.00%
 
-      ▄▇█                                                     
-  ▂▃▄▇███▅▄▃▂▂▂▂▂▂▂▂▂▂▂▁▂▂▁▂▁▁▁▁▁▁▁▁▂▂▂▂▁▁▂▁▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂ ▃
-  220 ns           Histogram: frequency by time          242 ns <
+  ▃▇▁           ▁▁                                           ▂
+  ████▇▄▄▄▄▁▄▄▅████▆▇▆▅▅▅▃▃▄▄▄▄▄▁▄▁▃▅▄▄▁▄▄▁▁▁▄▁▄▁▁▄▄▅▅▅▅▄▅▄▅ █
+  224 ns        Histogram: log(frequency) by time        289 ns <
 
  Memory estimate: 0 bytes, allocs estimate: 0.
 D_sparse
 BenchmarkTools.Trial: 10000 samples with 1 evaluation.
- Range (minmax):  214.611 μs  8.062 ms   GC (min … max):  0.00% … 94.53%
- Time  (median):     221.744 μs                GC (median):     0.00%
- Time  (mean ± σ):   276.692 μs ± 468.255 μs   GC (mean ± σ):  10.79% ±  6.18%
+ Range (minmax):  215.813 μs  7.587 ms   GC (min … max): 0.00% … 95.79%
+ Time  (median):     223.796 μs                GC (median):    0.00%
+ Time  (mean ± σ):   268.420 μs ± 416.942 μs   GC (mean ± σ):  9.93% ±  6.17%
 
-  ▃█▅▃▄▃▂▁                                   ▃▅▄▂▁▂▁   ▁▁    ▁ ▂
-  ███████████▇▇▆▆▇▇▆▅▆▅▆▅▄▄▁▅▄▄▄▃▄▁▃▃▃▁▃▁▃▃▄████████▆▇██▇▅▆▇█ █
-  215 μs        Histogram: log(frequency) by time        394 μs <
+  ▄▇▇▄▂▃▃▂▁ ▁                                         ▃▄▄▂ ▁▁  ▂
+  █████████████▆▇▇▇▅▄▃▁▅▄▄▄▄▄▅▃▄▄▁▄▅▁▄▁▁▁▁▁▃▁▃▄▁▃▁▃▄█████▇███ █
+  216 μs        Histogram: log(frequency) by time        365 μs <
 
  Memory estimate: 328.25 KiB, allocs estimate: 10504.
 D_full
 BenchmarkTools.Trial: 10000 samples with 1 evaluation.
- Range (minmax):  171.952 μs  8.305 ms   GC (min … max):  0.00% … 90.62%
- Time  (median):     179.825 μs                GC (median):     0.00%
- Time  (mean ± σ):   233.001 μs ± 470.412 μs   GC (mean ± σ):  12.86% ±  6.21%
+ Range (minmax):  177.691 μs  8.347 ms   GC (min … max):  0.00% … 76.66%
+ Time  (median):     183.041 μs                GC (median):     0.00%
+ Time  (mean ± σ):   227.071 μs ± 404.453 μs   GC (mean ± σ):  11.30% ±  6.18%
 
-  ▄▆█▄▃▃▃▂▁                                     ▄▅▄▁▂▁   ▁▁    ▂
-  ███████████▇▆▆▅▆▆▆▅▅▄▄▄▁▅▃▄▁▃▄▄▁▄▃▁▁▁▄▁▄▄▄▃▄▇████████▇███▇▆ █
-  172 μs        Histogram: log(frequency) by time        338 μs <
+   █                                         
+  ▆██▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▁▂▂▁▂▂▂▂▁▁▁▁▂▂▃▄▄▃▂▂▂▂ ▃
+  178 μs           Histogram: frequency by time          320 μs <
 
  Memory estimate: 328.25 KiB, allocs estimate: 10504.

These results were obtained using the following versions.

using InteractiveUtils
 versioninfo()
@@ -524,4 +524,4 @@
       Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml`
   [90137ffa] StaticArrays v1.9.5
   [09ab397b] StructArrays v0.6.18
-  [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`
+ [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` diff --git a/dev/code_of_conduct/index.html b/dev/code_of_conduct/index.html index cbbbd1be..3410c65a 100644 --- a/dev/code_of_conduct/index.html +++ b/dev/code_of_conduct/index.html @@ -1,2 +1,2 @@ -Code of conduct · SummationByPartsOperators.jl

Code of Conduct

Contributor Covenant Code of Conduct

Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

Our Standards

Examples of behavior that contributes to a positive environment for our community include:

  • Demonstrating empathy and kindness toward other people
  • Being respectful of differing opinions, viewpoints, and experiences
  • Giving and gracefully accepting constructive feedback
  • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
  • Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

  • The use of sexualized language or imagery, and sexual attention or advances of any kind
  • Trolling, insulting or derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or email address, without their explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting

Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to Hendrik Ranocha. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

1. Correction

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

2. Warning

Community Impact: A violation through a single incident or series of actions.

Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

3. Temporary Ban

Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

4. Permanent Ban

Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

Consequence: A permanent ban from any sort of public interaction within the community.

Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/codeofconduct.html.

Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

+Code of conduct · SummationByPartsOperators.jl

Code of Conduct

Contributor Covenant Code of Conduct

Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

Our Standards

Examples of behavior that contributes to a positive environment for our community include:

  • Demonstrating empathy and kindness toward other people
  • Being respectful of differing opinions, viewpoints, and experiences
  • Giving and gracefully accepting constructive feedback
  • Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
  • Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

  • The use of sexualized language or imagery, and sexual attention or advances of any kind
  • Trolling, insulting or derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others' private information, such as a physical or email address, without their explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting

Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to Hendrik Ranocha. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

1. Correction

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

2. Warning

Community Impact: A violation through a single incident or series of actions.

Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

3. Temporary Ban

Community Impact: A serious violation of community standards, including sustained inappropriate behavior.

Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

4. Permanent Ban

Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

Consequence: A permanent ban from any sort of public interaction within the community.

Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/codeofconduct.html.

Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

diff --git a/dev/contributing/index.html b/dev/contributing/index.html index ee922776..8ece0683 100644 --- a/dev/contributing/index.html +++ b/dev/contributing/index.html @@ -35,4 +35,4 @@ are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. + this project or the open source license(s) involved. diff --git a/dev/index.html b/dev/index.html index d01fe69f..d29b03ac 100644 --- a/dev/index.html +++ b/dev/index.html @@ -46,4 +46,4 @@ pages={3454}, publisher={The Open Journal}, url={https://github.com/ranocha/SummationByPartsOperators.jl} -}

Please also cite the appropriate references for specific SBP operators you use, which can be obtained via source_of_coefficients.

License and contributing

This project is licensed under the MIT license (see License). Since it is an open-source project, we are very happy to accept contributions from the community. Please refer to the section Contributing for more details.

+}

Please also cite the appropriate references for specific SBP operators you use, which can be obtained via source_of_coefficients.

License and contributing

This project is licensed under the MIT license (see License). Since it is an open-source project, we are very happy to accept contributions from the community. Please refer to the section Contributing for more details.

diff --git a/dev/introduction/index.html b/dev/introduction/index.html index 335870ff..d4c7cf6d 100644 --- a/dev/introduction/index.html +++ b/dev/introduction/index.html @@ -254,4 +254,4 @@ 0.0 0.0 0.0 3.0 -12.0 9.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -18.0 9.0 12.0 -3.0 0.0 0.0 0.0 0.0 0.0 0.0 -3.0 0.0 3.0 - 0.0 0.0 0.0 0.0 0.0 0.0 3.0 -12.0 9.0

Basic interfaces and additional features

To actually compute and plot the discrete grid functions, a few additional ingredients are necessary.

Next steps

If you are familiar with SBP operators in general, this introduction might already be enough for you to apply SummationByPartsOperators.jl to your problems. Otherwise, you might want to have a look at the references, the tutorials coming next, or some ready-to-use semidiscretizations of the following partial differential equations (PDEs). These are shipped with this package and you are encouraged to look at their source code to learn more about it.

Some additional examples are included as Jupyter notebooks in the directory notebooks. Even more examples and research articles making use of SummationByPartsOperators.jl are listed in the section Applications. If you want to know even more, you can have a look at the test.

References

+ 0.0 0.0 0.0 0.0 0.0 0.0 3.0 -12.0 9.0

Basic interfaces and additional features

To actually compute and plot the discrete grid functions, a few additional ingredients are necessary.

Next steps

If you are familiar with SBP operators in general, this introduction might already be enough for you to apply SummationByPartsOperators.jl to your problems. Otherwise, you might want to have a look at the references, the tutorials coming next, or some ready-to-use semidiscretizations of the following partial differential equations (PDEs). These are shipped with this package and you are encouraged to look at their source code to learn more about it.

Some additional examples are included as Jupyter notebooks in the directory notebooks. Even more examples and research articles making use of SummationByPartsOperators.jl are listed in the section Applications. If you want to know even more, you can have a look at the test.

References

diff --git a/dev/license/index.html b/dev/license/index.html index 14eb8e57..5664ee60 100644 --- a/dev/license/index.html +++ b/dev/license/index.html @@ -1,2 +1,2 @@ -License · SummationByPartsOperators.jl

License

MIT License

Copyright (c) 2017-present Hendrik Ranocha <mail@ranocha.de>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+License · SummationByPartsOperators.jl

License

MIT License

Copyright (c) 2017-present Hendrik Ranocha <mail@ranocha.de>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

diff --git a/dev/objects.inv b/dev/objects.inv index e1519614..bfa72a35 100644 Binary files a/dev/objects.inv and b/dev/objects.inv differ diff --git a/dev/tutorials/advection_diffusion/index.html b/dev/tutorials/advection_diffusion/index.html index 3573a47f..94b265c0 100644 --- a/dev/tutorials/advection_diffusion/index.html +++ b/dev/tutorials/advection_diffusion/index.html @@ -74,4 +74,4 @@ JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml` [1dea7af3] OrdinaryDiffEq v6.51.2 - [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` + [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` diff --git a/dev/tutorials/basic_interface/index.html b/dev/tutorials/basic_interface/index.html index 1a6b28a7..46bd21f3 100644 --- a/dev/tutorials/basic_interface/index.html +++ b/dev/tutorials/basic_interface/index.html @@ -96,15 +96,15 @@ Summation by parts operators for finite difference approximations of second derivatives. Journal of Computational Physics 199, pp. 503-540.
julia> x = grid(D); u = @. sin(pi * x); du = similar(u); mul!(du, D, u);
julia> mul!(du, D, u, 2) # equivalent to du .= 2 * D * u
julia> du ≈ 2 * D * utrue
julia> @allocated mul!(du, D, u, 2)0
julia> du_background = rand(length(du)); du .= du_background9-element Vector{Float64}: - 0.8258783766045397 - 0.6130782684711269 - 0.740951193761477 - 0.48156249863334866 - 0.40789502762647634 - 0.7144352391867894 - 0.28105225579133397 - 0.16225267276273247 - 0.8649698830852659
julia> mul!(du, D, u, 2, 3) # equivalent to du .= 2 * D * u + 3 * du
julia> du ≈ 2 * D * u + 3 * du_backgroundtrue
julia> @allocated mul!(du, D, u, 2, 3)0

Integration and the mass/norm matrix

SBP operators come with a mass matrix yielding a quadrature rule. In SummationByPartsOperators.jl, all operators typically have diagonal mass/norm matrices. You can access them via mass_matrix, e.g.,

julia> using SummationByPartsOperators
julia> D = derivative_operator(MattssonNordström2004(), + 0.47986354728910463 + 0.4163449431860988 + 0.905476463935047 + 0.20852424869309805 + 0.048280833724507755 + 0.4234102639649442 + 0.3649561892784483 + 0.75270073181531 + 0.11882104954583572
julia> mul!(du, D, u, 2, 3) # equivalent to du .= 2 * D * u + 3 * du
julia> du ≈ 2 * D * u + 3 * du_backgroundtrue
julia> @allocated mul!(du, D, u, 2, 3)0

Integration and the mass/norm matrix

SBP operators come with a mass matrix yielding a quadrature rule. In SummationByPartsOperators.jl, all operators typically have diagonal mass/norm matrices. You can access them via mass_matrix, e.g.,

julia> using SummationByPartsOperators
julia> D = derivative_operator(MattssonNordström2004(), derivative_order = 1, accuracy_order = 2, xmin = 0.0, xmax = 1.0, N = 9)SBP first-derivative operator of order 2 on a grid in [0.0, 1.0] using 9 nodes and coefficients of Mattsson, Nordström (2004) @@ -230,4 +230,4 @@ 0.0 0.15625 0.3125 0.46875 0.625 0.78125 0.9375 1.09375 1.25 0.0 0.1875 0.375 0.5625 0.75 0.9375 1.125 1.3125 1.5 0.0 0.21875 0.4375 0.65625 0.875 1.09375 1.3125 1.53125 1.75 - 0.0 0.25 0.5 0.75 1.0 1.25 1.5 1.75 2.0

Here, we have used views to interpret parts of the memory of the multi-dimensional arrays as one-diemnsional vectors that can be used together with the operators of SummationByPartsOperators.jl. You can use the same trick if you collect values of multiple variables in a multi-dimensional array.

+ 0.0 0.25 0.5 0.75 1.0 1.25 1.5 1.75 2.0

Here, we have used views to interpret parts of the memory of the multi-dimensional arrays as one-diemnsional vectors that can be used together with the operators of SummationByPartsOperators.jl. You can use the same trick if you collect values of multiple variables in a multi-dimensional array.

diff --git a/dev/tutorials/constant_linear_advection/index.html b/dev/tutorials/constant_linear_advection/index.html index 29daba45..da737cce 100644 --- a/dev/tutorials/constant_linear_advection/index.html +++ b/dev/tutorials/constant_linear_advection/index.html @@ -105,4 +105,4 @@ JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml` [1dea7af3] OrdinaryDiffEq v6.51.2 - [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` + [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` diff --git a/dev/tutorials/kdv/index.html b/dev/tutorials/kdv/index.html index 1c2121c1..ac2be38b 100644 --- a/dev/tutorials/kdv/index.html +++ b/dev/tutorials/kdv/index.html @@ -101,4 +101,4 @@ JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml` [1dea7af3] OrdinaryDiffEq v6.51.2 - [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` + [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` diff --git a/dev/tutorials/variable_linear_advection/index.html b/dev/tutorials/variable_linear_advection/index.html index d9595fa2..5d550dc6 100644 --- a/dev/tutorials/variable_linear_advection/index.html +++ b/dev/tutorials/variable_linear_advection/index.html @@ -54,4 +54,4 @@ JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml` [1dea7af3] OrdinaryDiffEq v6.51.2 - [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` + [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` diff --git a/dev/tutorials/wave_equation/index.html b/dev/tutorials/wave_equation/index.html index 1c6c7b96..1ccb2bda 100644 --- a/dev/tutorials/wave_equation/index.html +++ b/dev/tutorials/wave_equation/index.html @@ -76,4 +76,4 @@ JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager Status `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl/docs/Manifest.toml` [1dea7af3] OrdinaryDiffEq v6.51.2 - [9f78cca6] SummationByPartsOperators v0.5.61 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl` + [9f78cca6] SummationByPartsOperators v0.5.62 `~/work/SummationByPartsOperators.jl/SummationByPartsOperators.jl`