SummationByParts is a Julia package that implements summation-by-parts (SBP) operators, which can be used to construct stable, high-order discretizations of partial differential equations. SBP operators are finite-difference operators, but they share much in common with finite-element operators. For more information about SBP methods, the following reviews are a great place to start:
- M. Svärd and Jan Nordström, "Review of summation-by-parts schemes for initial–boundary-value problems," Journal of Computational Physics, July, 2014.
- D. Del Rey Fernández, J. Hicken, and D. Zingg, "Review of summation-by-parts operators with simultaneous approximation terms for the numerical solution of partial differential equations," Computers & Fluids, May, 2014.
This package focuses on multidimensional SBP operators for the triangle and tetrahedral. For the theory behind multidimensional SBP operators please see
- J. Hicken, D. Del Rey Fernández, and D. Zingg, "Multidimensional Summation-by-Parts Operators: General Theory and Application to Simplex Elements," SIAM Journal on Scientific Computing, July 06, 2016.
The following documentation provides a brief overview of how to use the SummationByParts package. This assumes the user has some familiarity with Julia.
The construction of an SBP operator is best explained with an example. The following code produces a degree 3 (order 4) SBP operator on a triangle.
using SummationByParts
sbp = TriSBP{Float64}(degree=3)
Here is another example, which shows how to construct a degree 2 SBP element on a tetrahedron (in this example, it has been assumed that the using SummationByParts
statement has already been executed).
sbp = TetSBP{Float64}(degree=2)
The Float64
type is necessary, because the SBP operators in the package are parameterized. This means that the matrix fields inside the sbp
type are Float64
arrarys. We will describe the fields inside the operators below.
The TriSBP
and TetSBP
constructors have a couple keyword arguments that you can use to obtain operators with different properties. As these are keyword arguments, you must provide the keyword name before the value desired.
degree
: AnInt
keyword that specifies the "polynomial" degree of the operator. At this time, degrees up to 4 are supported.internal
: ABool
keyword that indicates if all the nodes of the operator are strictly internal to the simplex (internal=true
), or if there a sufficient number of nodes are on the boundary in order to form a complete basis on the face (internal=false
). The default isinternal=false
.
In general, we recommend using the SBP operators with methods provided by the package and that users do not rely on the fields of the sbp type directly. This is because we may, in the future, change the fields to support different SBP operators (or some fields may become obsolete). Nevertheless, for those who are curious, here is a partial list of the most important fields.
sbp.degree
: maximum polynomial degree for which the derivatives are exactsbp.numnodes
: number of nodes for the operatorsbp.vtx
: vertices of the reference element in computational spacesbp.w
: cubature weights, i.e. the diagonal SBP norm, stored as an arrayQ[:,:,i]
: discrete stiffness matrix operator in ith coordinate direction