GalerkinEtena.jl

Documentation for GalerkinEtena.jl

GalerkinEtena.AdvecType

structure for modelizing the 1D advection equation

\[\frac{\partial u}{\partial t} + a \frac{\partial u}{\partial x} = 0\]

with

\[u(x,0) = \sin (x) \\ u(0,t) = -\sin (a t)\]

source
GalerkinEtena.Maxwell1DType

structure for modelizing the 1D Maxwell's equation

\[\varepsilon(x)\frac{\partial E}{\partial t} = - \frac{\partial H}{\partial x} \mbox{ and } \mu(x)\frac{\partial H}{\partial t} = - \frac{\partial E}{\partial x} \]

source
GalerkinEtena.JacobiGLMethod

JacobiGL(α::Float64, β::Float64, N::Int)

computes the N'th order Gauß Lobatto quadrature formula points

source
GalerkinEtena.JacobiPMethod
JacobiP(x::Vector{Float64}, α::Float64, β::Float64, N::Int)

evaluates the Jacobi polynomial of type (α,β) > -1 (α+β ≢ -1) at points x for order N

Note : the Jacobi polynomial is normalize by a factor $γₙ = \sqrt{\frac{2}{2n+1}}$ adapted from nodal-dg

source
GalerkinEtena.LegendreFunction
Legendre(n::Int64, x::Array{Float64}, derive::Bool=true)

computes the two matrices (if derive is true, otherwise just P)

\[P_{ij} = P^j(x_i) \qquad and \qquad P'_{ij} = \frac{dP^j}{dx}(x_i)\]

where

\[P^n(x) = \frac{1}{2^nn!}\frac{d^n}{dx^n}\left((x^2-1)^n\right)\]

source
GalerkinEtena.WarpFactorMethod

WarpFactor(N::Int64, rout::Vector{Float64}) compute the warping function as defined p. 177 in Warburton-Hesthaven

source
GalerkinEtena.discretizeMethod

[x, vmapM, vmapP] = discretize(m::SimplexMesh{1}, ξ::RefGrid{1})

return a DG discretization along the mesh and the local discretization ξ x is of size (#ξ, K ) vmapP and vmapP is a vector of size 2*K, if we reshape into a (2,K), matrix, then [vmapM[1, i], vmapM[2, i]] are the indices of internal vertices of the i element [vmapP[1, i], vmapP[2, i]] are the indices of external vertices of the i element

source
GalerkinEtena.integrateMethod

integrate(f,q)

computes the numerical approximation of the integral of f on the interval [-1,1] using q as a Quadrature formula

source
GalerkinEtena.maskMethod
mask(ξ::RefGrid{1})

retrieves the index of the boundary nodes on the reference element

source
GalerkinEtena.nodes2DMethod

nodes2D(N::Int64) computes the interpolation nodes (x,y) nodes in equilateral triangle for polynomial of order N

source
GalerkinEtena.refGrid1DMethod
RefGrid1D(a::Float64, b::Float64, N::Int64)

initialize a 1D grid reference on [a,b] with a N order polynomial

source
GalerkinEtena.rhs1DMethod
rhs1D(ad::Advec1D, u::Array{Float64,2}, t::Float64, a::Float64, α::Float64)

computes the right hand side of the advection problem

source
GalerkinEtena.rhs1DMethod
compute trhs1D(pb::Maxwell1D, u::Array{Float64,2}, t::Float64)

compute the right hand side of the maxwell equation with u = [E, H]

source
GalerkinEtena.rsToAbMethod

rsToAb(r::Vector{Float64}, s::Vector{Float64}) changes (r,s) coordinates to (a,b) coordinates

source
GalerkinEtena.xyToRsMethod

function xyToRs(x::Vector{Float64}, y::Vector{Float64}) convert (x,y) coords in equilateral triangle to (r,s) coordinates standard triangle I = [(-1,-1), (1,-1), (-1,1)]

source