One more thing I thought about. Has anyone given any thought about how to
send mixed types through these packed ranges? My specific use case needs a
few Real numbers (Points, but not Nodes) along with all the integers I'm
sending. I suppose I could pack all of my types into an unsigned char array
and reconstruct them... I'm not sure I want to do that so I'll probably
just send a second list for now.

On Thu, Nov 19, 2015 at 1:09 PM Cody Permann <codyperm...@gmail.com> wrote:

> I contacted Roy off-list yesterday to inquire about using packed ranges.
> It's probably a good idea for me to continue the discussion on the list so
> others can benefit from my learning experience. So, here goes!
>
> So far I've managed to get the 4 key methods stubbed out with the right
> template arguments compiled and running:
> packable_size, pack, unpacked and packed_size
>
> I must say that it took me a bit of time to understand the difference
> between "packed_size" and "packable_size". Just to disclose that here, the
> former is called during unpack while the latter is called during pack.
> Makes sense now.
>
> I did run into one hitch that I wasn't able to get around cleanly. The
> various packed range receiving operations take output iterators to fill a
> container somewhere. I wasn't able to figure out what to do here. Using the
> standard iterators (like back_inserter) failed with missing operators
> errors or other template instantiation problems. As a workaround, I snagged
> the mesh_insert_iterator and was able to adapt it so my code compiles. Is
> this an unintended consequence of all this heavy templating? It seems like
> we should be able to use a standard insert iterator here with any old
> container (unless I'm just doing something plain wrong).
>
> Anyway, I haven't successfully implemented the routines to actually move
> the data yet but I can see that they are being called as expected so it's
> just a matter of filling in the details now. I'm excited about using this
> capability!
>
> Cody
>
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to