I'm implementing stencils as described in yesterday's post. If you have
particular stencil operations you'd like to see in blitz, please
send/post a quick note describing them, and I'll include them.
Currently I have:
BZ_DECLARE_STENCIL_OPERATOR1(Laplacian2D, A)
return -4*A(0,0) + A(-1,0) + A(1,0) + A(0,-1) + A(0,1)
BZ_END_STENCIL_OPERATOR
BZ_DECLARE_STENCIL_OPERATOR1(Laplacian3D, A)
return -6*A(0,0,0) + A(-1,0,0) + A(1,0,0) + A(0,-1,0) + A(0,1,0)
+ A(0,0,-1) + A(0,0,1);
BZ_END_STENCIL_OPERATOR
Some obvious candidates are:
FirstDeriv<dimension> [ -1 0 1 ]
SecondDeriv<dimension> [ 1 -2 1 ]
If anyone has patterns for curls, higher-order laplacians, grads,
you name it, I can include it if you send me the info.
Cheers,
Todd
--------------------- blitz-dev list --------------------------------
* To subscribe/unsubscribe: mail to majordomo@oonumerics.org, with
"subscribe blitz-dev" or "unsubscribe blitz-dev" in the body of the message
* Blitz++ web page: http://oonumerics.org/blitz/
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 04:30:05 EST