void unpack_data(stk::CommSparse& comm, int my_proc_id, int num_procs, std::vector<SideSharingData>& sideSharingDataThisProc) { for(int i=0;i<num_procs;++i) { while(comm.recv_buffer(i).remaining()) { stk::mesh::impl::IdViaSidePair receivedIdSide; stk::mesh::EntityId chosenId; comm.recv_buffer(i).unpack<stk::mesh::EntityId>(receivedIdSide.id); comm.recv_buffer(i).unpack<int>(receivedIdSide.side); comm.recv_buffer(i).unpack<stk::mesh::EntityId>(chosenId); SideSharingData localTemp; localTemp.elementAndSide = receivedIdSide; localTemp.owningProc = std::min(my_proc_id, i);; localTemp.sharingProc = i; localTemp.chosenSideId = chosenId; unpack_vector(comm.recv_buffer(i), localTemp.sideNodes); unpack_vector(comm.recv_buffer(i), localTemp.partOrdinals); sideSharingDataThisProc.push_back(localTemp); } } }
inline static void unpack( const json::value& jsv, T& v ) { json::array::const_iterator itr = boost::get<json::array>(jsv.val).begin(); unpack_sequence unpack_vector(itr); boost::fusion::for_each( v, unpack_vector ); }