Cuchulainn wrote:ADE for 3+1 dimensional PDE
Could you make the source code in the article available?
I'd like to try using the array_recur in the attachment to:
http://lists.boost.org/Archives/boost/2 ... 183118.phpwhich, IIUC, would be applicable if NX, NY, and NZ were
compile-time constants. IOW, instead of:
multi_array<double, Dim>
you could use:
array_recur<double, NX, NY, NZ>
Also, since V and U have the same shape, you could do:
enum{U_ndx, V_ndx};
array_recur<double, V_ndx+1, NX,NY,NZ>
and since U and UOld have the same shape, you could do:
array_recur<double, 2, V_ndx+1,NX,NY,NZ> uv;
and instead of copying UOld to U, you could just
change the outer most indices:
old_ndx=0;
new_ndx=old_ndx+1;
while(/*not converted*/)
{
//calculate uv[new_ndx,...] from uv[old_ndx,...];
...
old_ndx = (old_ndx+1)%2;
new_ndx = (new_ndx+1)%2;
};
Does that make sense?