Index

Functions

StartUpDG.MeshDataType
struct MeshData{Dim, Tv}

MeshData: contains info for a high order piecewise polynomial discretization on an unstructured mesh.

Use @unpack to extract fields. Example:

N,K1D = 3,2
rd = RefElemData(Tri(),N)
VX,VY,EToV = uniform_mesh(Tri(),K1D)
md = MeshElemData(VX,VY,EToV,rd)
@unpack x,y = md
source
StartUpDG.RefElemDataType
struct RefElemData{Dim, ElemShape <: AbstractElemShape, Nfaces, Tv}

RefElemData: contains info (interpolation points, volume/face quadrature, operators) for a high order nodal basis on a given reference element.

Use @unpack to extract fields. Example:

N = 3
rd = RefElemData(Tri(),N)
@unpack r,s = rd
source
StartUpDG.RefElemDataMethod
function RefElemData(elem; N, kwargs...)

Keyword argument constructor for RefElemData (to "label" N via rd = RefElemData(Line(),N=3))

source
StartUpDG.RefElemDataMethod

function RefElemData(elementType::Quad, approxType::SBP, N)

SBP reference element data for DGSEM.

source
StartUpDG.RefElemDataMethod
RefElemData(elem::Line, N;
            quad_rule_vol = quad_nodes(elem,N+1))
RefElemData(elem::Union{Tri,Quad}, N;
             quad_rule_vol = quad_nodes(elem,N),
             quad_rule_face = gauss_quad(0,0,N))
RefElemData(elem::Hex,N;
             quad_rule_vol = quad_nodes(elem,N),
             quad_rule_face = quad_nodes(Quad(),N))
RefElemData(elem; N, kwargs...) # version with keyword arg

Constructor for RefElemData for different element types.

source
StartUpDG.RefElemDataMethod

function RefElemData(elementType::Quad, approxType::SBP, N)

SBP reference element data for DGSEM.

source
StartUpDG.RefElemDataMethod
function RefElemData(elementType::Tri, approxType::SBP, N; kwargs...)

kwargs = quadraturestrength=2N-1 (or 2N), quadrule_face=:Lobatto (or :Legendre)

source
StartUpDG.ck45Method
ck45()

Returns coefficients rka,rkb,rkc for the 4th order 5-stage low storage Carpenter/Kennedy Runge Kutta method. Coefficients evolve the residual, solution, and local time, e.g.,

Example

res = rk4a[i]*res + dt*rhs # i = RK stage
@. u += rk4b[i]*res
source
StartUpDG.compute_adaptive_dtFunction
compute_adaptive_dt(Q,rhsQrk,dt,rkE,PI::PIparams,prevErrEst=nothing)

returns acceptstep (true/false), dtnew, errEst. uses PI error control method copied from Paranumal library (Warburton et al).

Inputs:

  • Q: container of arrays, Q[i] = ith solution field
  • rhsQrk: container whose entries are type(Q) for RK rhs evaluations
source
StartUpDG.connect_meshMethod
connect_mesh(EToV,fv)

Initialize element connectivity matrices, element to element and element to face connectivity.

Inputs:

  • EToV is a K by Nv matrix whose rows identify the Nv vertices

which make up an element.

  • fv (an array of arrays containing unordered indices of face vertices).

Output: FToF, length(fv) by K index array containing face-to-face connectivity.

source
StartUpDG.dp56Method
dp56()

Dormand-prince 5th order 7 stage Runge-Kutta method (6 function evals via the FSAL property) Returns Butcher table arrays A,c and error evolution coefficients rkE.

Note there is no b array needed due to the FSAL property and because the last stage is used to compute the error estimator.

source
StartUpDG.make_periodicMethod
make_periodic(md::MeshData{Dim},rd::RefElemData,is_periodic...) where {Dim}
make_periodic(md::MeshData{Dim},rd::RefElemData,is_periodic=ntuple(x->true,Dim)) where {Dim}
make_periodic(md::MeshData{1},rd::RefElemData,is_periodic=true)

Returns new MeshData such that the node maps mapP and face maps FToF are now periodic. Here, is_periodic is a tuple of Bool indicating whether or not to impose periodic BCs in the x,y, or z coordinate.

source
StartUpDG.readGmsh2DMethod
function readGmsh2D(filename)

reads triangular GMSH 2D file format 2.2 0 8. returns VX,VY,EToV

Examples

VXY,EToV = readGmsh2D("eulerSquareCylinder2D.msh")
source