Hello Petros,
I think that what you are looking for is a different storage order.
Take a look at "boost/multi_array/storage_order.hpp". 3 classes are defined: general_storage_order, c_storage_order and fortran_storage_order.
You need to make a "cyclic_storage_order" (or something like that) that receives an integer. When receiving zero, it should behave like c_storage_order. When receiving 1, everything should be permuted by 1 etc. This new class should inherit from general_storage_order. Use c_storage_order and fortran_storage_order as examples.
Keep "ascending" true, only "ordering" has to be changed. A modulo should do it.
Hope it helps,
Pierre-André Noël
On Sun, May 22, 2011 at 11:53 AM, petros <pmamales@nyc.rr.com> wrote:
Hi Larry,
apologies, for not being clear.
Yes, MA is boost::multi_array. M, N, L are the dimensions
(this is only a "logical" statement, rather than a proper code snippet).
I think I have pretty much sorted out the calling practices wrt multi-aray and looking
for if certain functionality exists.
My problem amounts to having a view that would allow for the permutation
(if not rotation) of axes.
As I begun to explain, the operator splitting methods decompose a problem in N dimensions
into N 1-dimensional problems.
The problem itself is stated, though, in a certain reference system (this means that the discretized
operators (stencils) and the boundary conditions are expressed in terms of these boundary conditions.
However, the linear equation systems that are produced, are in tridiagonal form, only in one of these steps
( the first step of the 1-D problems ). Otherwise it produces a block-banded system of equations, that can
be reduced back to the familiar tridiagonal ( conceptually), through axes permutation (or rotation).
If one things in terms of the 2D problem analog, while conceptually it would amount to exchange the two axes,
in matrix form, and because of the storage alignment it would involve a much bigger operation. Since, these
operators/systems are created from the problem, it would be very nice to have this view functionality to exploit
for keeping the storage of the operators in the desired form.
I hope this is clearer now - don't mean to drag you into my problem.
Thank you for your response,
Petros
-----Original Message----- From: Larry Evans
Sent: Sunday, May 22, 2011 10:43 AM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] multi-array and pdes
On 05/21/11 15:02, petros wrote:
Hi Petros,
[snip]
Suppose then that I have a MA( M, N, L ):
Please be more specific. I assume:
MA means boost::multi_array
however, I've no idea what M, N, and L are. Could you please
explain further?
-regards,
Larry
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users