On Mon, 29 Oct 2012, Derek Gaston wrote:
Is there a way to broadcast a vector of strings?
Easily? Not currently.
/Users/gastdr/projects/libmesh/include/libmesh/parallel.h:285: error:
‘libMesh::Parallel::StandardType<T>::StandardType(const T*) [with T =
std::basic_string<char, std::char_traits<char>, std::allocator<char> >]’ is
private
/Users/gastdr/projects/libmesh/include/libmesh/parallel.h:3696: error: within
this context
Which obviously means that this is a datatype that no one has worked with yet.
So... any ideas? Should I go ahead and implement a datatype for this... or is
there a better way?
I'm afraid implementing a datatype won't work - that's a mechanism for
constant-size objects.
For sending variable-size objects our best idiom right now is the
"packed_range" code. See "parallel_node.h" or "parallel_elem.h" for
examples, which (fortunately or unfortunately depending on your point
of view) are much much more complicated than the corresponding code
for std::basic_string<T> would need to be.
I'm working on refactoring parallel.h right now, actually. Could you
keep a "parallel_string.h" separate the way the node/elem packing is?
---
Roy
------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel