Boost logo

Boost Users :

Subject: Re: [Boost-users] multi-array and pdes
From: Pierre-Andre Noel (noel.pierre.andre_at_[hidden])
Date: 2011-05-22 12:17:22


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_at_[hidden]> 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_at_[hidden]
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net