swh:1:snp:bbc0b94b1c0463480b615c86f1ae2df3fcc700c0
Tip revision: 722dbd95a4352965cd1492a15c6e07ddbb073986 authored by Karline Soetaert on 13 November 2009, 00:00:00 UTC
version 1.2
version 1.2
Tip revision: 722dbd9
fiadeiro.R
##==============================================================================
## The Fiadeiro and Veronis scheme: advective finite difference weights (AFDW)
##==============================================================================
fiadeiro <- function(v, D, dx.aux=NULL, grid=list(dx.aux=dx.aux)) {
Pe <- abs(v)*grid$dx.aux/D
sigma <- (1+(1/tanh(Pe)-1/Pe))/2
return(sigma)
}