(arr)
| 11 | return '{' + ','.join(format1dforcplusplus(e) for e in arr) + '}' |
| 12 | |
| 13 | def format3dforcplusplus(arr): |
| 14 | return '{' + ','.join('\n'+format2dforcplusplus(e) for e in arr) + '}' |
| 15 | |
| 16 | # obtain a 2D tri-Laplacian stencil by convolving lap2d with bilap2d |
| 17 | lap2d = np.array([[1,4,1], [4,-20,4], [1,4,1]]) # / 6h^2 |
no test coverage detected