This module contains a collection of high-resolution weighted essentially non-oscillatory (WENO) schemes for arbitrary (uniform or non-uniform) finite volume/difference methods. Source: ICASE 97-65 by Shu, 1997.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public, | parameter | :: | c1(0:0,-1:0) | = | reshape([1._rk, 1._rk], [1, 2], order=[1, 2]) | |
real(kind=rk), | public, | parameter | :: | c2(0:1,-1:1) | = | reshape([3._rk/2, -1._rk/2, 1._rk/2, 1._rk/2, -1._rk/2, 3._rk/2], [2, 3], order=[1, 2]) | |
real(kind=rk), | public, | parameter | :: | c3(0:2,-1:2) | = | reshape([11._rk/6, -7._rk/6, 1._rk/3, 1._rk/3, 5._rk/6, -1._rk/6, -1._rk/6, 5._rk/6, 1._rk/3, 1._rk/3, -7._rk/6, 11._rk/6], [3, 4], order=[1, 2]) |
Initialize weno
object.
Note
If the grid is not uniform, the user must supply the edges of the grid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ncells |
number of cells |
||
integer, | intent(in), | optional | :: | k |
(2k - 1) is the order of reconstruction within the cell (1 <= k <= 3). By default, k = 3, i.e. 5th order reconstruction. |
|
real(kind=rk), | intent(in), | optional | :: | eps |
numerical smoothing factor (default=1e-6) |
|
real(kind=rk), | intent(in), | optional | :: | xedges(0:) |
vector(0:ncells) of cell edges; xedges(i) is the value of x at the right boundary of cell i, ; xedges(i-1) is the value of x at the left boundary of cell i, . |
WENO class.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | msg |
error message |
||
integer, | public | :: | ierr | = | 0 |
error status |
|
integer, | public | :: | ncells |
number of cells |
|||
integer, | public | :: | k | = | 3 |
order of reconstruction within the cell (k = 1, 2 or 3) |
|
real(kind=rk), | public | :: | eps | = | 1e-6_rk |
numerical smoothing factor |
|
real(kind=rk), | public, | allocatable | :: | cnu(:,:,:) |
array of constants for a non-uniform grid |
private pure function weno_init (ncells, k, eps, xedges) | Initialize Note If the grid is not uniform, the user must supply the edges of the grid. |
procedure, public, pass(self) :: reconstruct => weno_reconstruct |