<div dir="ltr"><div class="gmail_extra">Hi Andreas,</div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-27 5:56 GMT-04:00 Andreas Dedner <span dir="ltr"><<a href="mailto:a.s.dedner@warwick.ac.uk" target="_blank">a.s.dedner@warwick.ac.uk</a>></span>:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree that we will have to think carefully about these details during<br>
the course of this project. Perhaps starting out with distinguishing<br>
different places where the FieldMatrix/Vectors are used. For example<br>
they are important for the grid geometry classes (used for the<br>
jacobianInverseTranspose method for example). Here the most important<br>
cases are n x n and then perhaps 1xn, nx1 and 2xn,nx2. If we can cover<br>
the most important cases that would already be helpful.<br></blockquote><div><br></div><div>Thank you, I think I missed that with my grep. I am going to check that and see how to handle these cases.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Btw: I just came across this<br>
<br>
<a href="http://www.boost.org/doc/libs/1_57_0/libs/python/doc/v2/indexing.html#vector_indexing_suite" rel="noreferrer" target="_blank">http://www.boost.org/doc/libs/1_57_0/libs/python/doc/v2/indexing.html#vector_indexing_suite</a><br>
<br>
which might be of interest. I think FieldVector/Matrix do not quite<br>
satisfy the std::vector interface at the moment (I know for example that<br>
difference_t is missing) but perhaps we can add the missing items to the<br>
classes. This might provide quite a nice approach for the wrapping.<br>
<br>
I came across this in the following discussion which has a nice summary<br>
of some of the problems encountered when wrapping C++ containers:<br>
<br>
<a href="http://stackoverflow.com/questions/27077518/wrapping-an-stdvector-using-boostpython-vector-indexing-suite" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/27077518/wrapping-an-stdvector-using-boostpython-vector-indexing-suite</a></blockquote><div> </div><div>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. </div><div><br></div><div>Best,</div><div>Michaël</div></div><br></div></div>