[Dune-devel] [GSoC2016] Wrapper for the FieldMatrix class

Michaël Sghaïer sghaier.michael at gmail.com
Tue Mar 29 05:47:20 CEST 2016


Hi Andreas,

2016-03-27 5:56 GMT-04:00 Andreas Dedner <a.s.dedner at warwick.ac.uk>:
>
> I agree that we will have to think carefully about these details during
> the course of this project. Perhaps starting out with distinguishing
> different places where the FieldMatrix/Vectors are used. For example
> they are important for the grid geometry classes (used for the
> jacobianInverseTranspose method for example). Here the most important
> cases are n x n and then perhaps 1xn, nx1 and 2xn,nx2. If we can cover
> the most important cases that would already be helpful.
>

Thank you, I think I missed that with my grep. I am going to check that and
see how to handle these cases.


> Btw: I just came across this
>
>
> http://www.boost.org/doc/libs/1_57_0/libs/python/doc/v2/indexing.html#vector_indexing_suite
>
> which might be of interest. I think FieldVector/Matrix do not quite
> satisfy the std::vector interface at the moment (I know for example that
> difference_t is missing) but perhaps we can add the missing items to the
> classes. This might provide quite a nice approach for the wrapping.
>
> I came across this in the following discussion which has a nice summary
> of some of the problems encountered when wrapping C++ containers:
>
>
> http://stackoverflow.com/questions/27077518/wrapping-an-stdvector-using-boostpython-vector-indexing-suite


This is quite interesting! Let me think of that, I am going to complete the
FieldVector class to satisfy the std::vector interface and then see what
kind of wrapper I can get with vector_indexing_suite. I'll let you know,
soon, about the results.

Best,
Michaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20160328/d0517338/attachment.htm>


More information about the Dune-devel mailing list