ianhinder / Kranc

A Mathematica package for generating code for solving time dependent partial differential equations
http://kranccode.org
GNU General Public License v2.0
28 stars 10 forks source link

Don't set EXTERIOR CaKernel attribute to 1's if stencil is nonzero. #119

Open dmkoppelman opened 9 years ago

dmkoppelman commented 9 years ago

The CaKernel gpu_cuda_dc/3dblock2 templates expect the stencil to stay within the grid. For the faces for which EXTERIOR is set to 1 the corresponding stencil must be zero. Currently Kranc will set all EXTERIOR faces to 1 if any face's stencil is zero. In this bug set all EXTERIOR faces to 1 if explicitly requested or if all stencil faces are zero.

I've checked this in as commit 0b648270c5ecaecdec987cec2395e8cb0c76e69b in a private Chemora branch.