annotate h_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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
8a30ea842c8e add fourth order stencil
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
1 # H order 4
8a30ea842c8e add fourth order stencil
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
2
8a30ea842c8e add fourth order stencil
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
3 closure
8a30ea842c8e add fourth order stencil
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
4 17/48 59/48 43/48 49/48
8a30ea842c8e add fourth order stencil
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
5
8a30ea842c8e add fourth order stencil
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
6 inner_stencil
8a30ea842c8e add fourth order stencil
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
7 1