diff options
author | Adrian Kummerlaender | 2019-10-26 13:38:09 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2019-10-26 13:38:09 +0200 |
commit | 1c58183e84b2f7024855dc3c5bac19c48ba45f69 (patch) | |
tree | 46de9a7b46bdc069ac64df7911a01e205510074a | |
parent | b2013631b880972f5632e88b3d1bee77935720fb (diff) | |
download | boltzgen-1c58183e84b2f7024855dc3c5bac19c48ba45f69.tar boltzgen-1c58183e84b2f7024855dc3c5bac19c48ba45f69.tar.gz boltzgen-1c58183e84b2f7024855dc3c5bac19c48ba45f69.tar.bz2 boltzgen-1c58183e84b2f7024855dc3c5bac19c48ba45f69.tar.lz boltzgen-1c58183e84b2f7024855dc3c5bac19c48ba45f69.tar.xz boltzgen-1c58183e84b2f7024855dc3c5bac19c48ba45f69.tar.zst boltzgen-1c58183e84b2f7024855dc3c5bac19c48ba45f69.zip |
Fix cpp test function
-rw-r--r-- | boltzgen/kernel/template/basic.cpp.mako | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/boltzgen/kernel/template/basic.cpp.mako b/boltzgen/kernel/template/basic.cpp.mako index 1036c8f..bee25a7 100644 --- a/boltzgen/kernel/template/basic.cpp.mako +++ b/boltzgen/kernel/template/basic.cpp.mako @@ -79,6 +79,13 @@ void test(std::size_t nStep) for (int iX = 0; iX < ${geometry.size_x}; ++iX) { for (int iY = 0; iY < ${geometry.size_y}; ++iY) { +% if descriptor.d == 2: + if (iX == 0 || iY == 0 || iX == ${geometry.size_x-1} || iY == ${geometry.size_y-1}) { + material[iX*${geometry.size_y} + iY] = 0; + } else { + material[iX*${geometry.size_y} + iY] = 1; + } +% elif descriptor.d == 3: for (int iZ = 0; iZ < ${geometry.size_z}; ++iZ) { if (iX == 0 || iY == 0 || iZ == 0 || iX == ${geometry.size_x-1} || iY == ${geometry.size_y-1} || iZ == ${geometry.size_z-1}) { @@ -87,6 +94,7 @@ void test(std::size_t nStep) material[iX*${geometry.size_y*geometry.size_z} + iY*${geometry.size_z} + iZ] = 1; } } +% endif } } |