view d2_4th.txt @ 129:1aaeb46ba5f4 cell_based_test

Improve efficiency of apply by the following: - Remove divisions in interior loop by storing and multiplying by the reciprocal of grid spacing instead. - Add @inline to apply(::Laplace - Remove initialization of w = 0 in apply(::Stencil) by manually unrolling first iteration of the loop.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 14 Feb 2019 16:25:22 +0100
parents 8a30ea842c8e
children
line wrap: on
line source

# D2 order 4

boundary_stencils
     2    -5       4      -1     0     0
     1    -2       1       0     0     0
 -4/43 59/43 -110/43   59/43 -4/43     0
 -1/49     0   59/49 -118/49 64/49 -4/49

inner_stencil
-1/12     4/3  -5/2   4/3 -1/12

e
1

d1
-11/6 3 -3/2 1/3