GalerkinEtena.jl
Documentation for GalerkinEtena.jl
GalerkinEtena.Advec — Typestructure 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)\]
GalerkinEtena.Maxwell1D — Typestructure 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} \]
GalerkinEtena.RefGrid — Typetype for discretisation in r,s,t coordinates
GalerkinEtena.JacobiGL — MethodJacobiGL(α::Float64, β::Float64, N::Int)
computes the N'th order Gauß Lobatto quadrature formula points
GalerkinEtena.JacobiGQ — MethodJacobiGQ(α::Float64,β::Float64,N::Int)
return the N'th Gauß quadrature points
GalerkinEtena.JacobiP — MethodJacobiP(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
GalerkinEtena.Legendre — FunctionLegendre(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)\]
GalerkinEtena.WarpFactor — MethodWarpFactor(N::Int64, rout::Vector{Float64}) compute the warping function as defined p. 177 in Warburton-Hesthaven
GalerkinEtena.discretize — Method[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
GalerkinEtena.elementaryMatrices — MethodelementaryMatrices(ξ::RefGrid{1})computes the elementary matrices 𝓥, 𝓓ᵣ on the Gauß-Lobatto grid on I₁ = [-1,1]
GalerkinEtena.integrate — Methodintegrate(f,q)
computes the numerical approximation of the integral of f on the interval [-1,1] using q as a Quadrature formula
GalerkinEtena.mask — Methodmask(ξ::RefGrid{1})retrieves the index of the boundary nodes on the reference element
GalerkinEtena.nodes2D — Methodnodes2D(N::Int64) computes the interpolation nodes (x,y) nodes in equilateral triangle for polynomial of order N
GalerkinEtena.npToN — MethodnpToN(np::Int64)
GalerkinEtena.refGrid1D — MethodRefGrid1D(a::Float64, b::Float64, N::Int64)initialize a 1D grid reference on [a,b] with a N order polynomial
GalerkinEtena.rhs1D — Methodrhs1D(ad::Advec1D, u::Array{Float64,2}, t::Float64, a::Float64, α::Float64)computes the right hand side of the advection problem
GalerkinEtena.rhs1D — Methodcompute trhs1D(pb::Maxwell1D, u::Array{Float64,2}, t::Float64)compute the right hand side of the maxwell equation with u = [E, H]
GalerkinEtena.rsToAb — MethodrsToAb(r::Vector{Float64}, s::Vector{Float64}) changes (r,s) coordinates to (a,b) coordinates
GalerkinEtena.xyToRs — Methodfunction 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)]
GalerkinEtena.𝓔 — Methodcomputes flux integral