Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Numpy-fication vs. Sympy.ufuncify/autowrap #1

@mlange05

Description

@mlange05

Starting from the excellent symbolic description of the Acoustic wave equation provided by @mloubout we now want to speed-up the basic python version of the equation. However, since we are performing a stencil computation the traditional Numpy-fication tricks of applying operations over arrays become very wasteful in terms of memory, because we effectively need to to replicate the matrix for each stencil point. This is illustrated in the bottom figure of this page.

Fortunately, the problem of applying complex Sympy expressions to numeric systems is known and documented here. In particular the ufuncify functionality, or the even lower level autowrap module that provide some control of the JIT process, should allow us to turn the expression stencil in the acoustic wave equation notebook into a compiled function that can be applied to the numpy arrays that represent our grid. This should speed up the notebook computation significantly and give us insights into the necessary steps to generate the core computation kernels, as well as a baseline performance target that opesci-fd will aim to beat.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions