Derivative operators

Below are the first and second derivative summation by parts operators. All stencils are written in 1D and then extended to two dimensions by looping over the required axis.

FaADE.DerivativesModule
Derivatives

Module containing first and second derivative variable coefficient SBP operators.

source

Derivative operators with structs belong to the abstract type.

First derivative operators

The below operators are for first derivatives

FaADE.Derivatives.D₁!Method
D₁!(uₓ::AbstractArray{T},u::AbstractArray{T},nx::Integer,ny::Integer,Δx::T,Δy::T,order::Int,ordery::Int,α::T) where T

2D D₁!.

source
FaADE.Derivatives.D₁!Method
D₁!(uₓ::AbstractArray{T},u::AbstractArray{T},n::Integer,Δ::T,order::Integer,α::T,dim::Integer) where T

1D implementation for 2D problems for D₁!.

source
FaADE.Derivatives.D₁Method
D₁(u::AbstractMatrix{T},nx::Integer,ny::Integer,Δx::T,Δy::T;order::Integer=2) where T

2D implementation of D₁ operator.

source
FaADE.Derivatives.D₁Method
D₁(u::AbstractVector{T},Δx::T;order::Integer=2) where T

1D implementation of D₁ operator.

julia> n = 101
julia> x = collect(LinRange(0.0,1.0,n))

julia> u = sin.(x)
julia> Δx = 1/(n-1)

julia> D₁(u,Δx,order=2)
source

Second Derivative operators

FaADE.Derivatives.D₂!Method
D₂!(uₓₓ::AbstractVector{T},u::AbstractVector{T},c::AbstractVector{T},n::Integer,Δx::T,order::Val,α::T) where T
source

Internals

First derivative internals

Second Derivative internals

FaADE.Derivatives.SecondDerivativeInternal!Method
SecondDerivativeInternal!(uₓₓ::AbstractVector{TT},u::AbstractVector{TT},cx::AbstractVector{TT},Δx::TT,nx::Integer,::Val{2},α::TT)

In place second derivative function for internal nodes.

source