35 #ifndef __H__PLG__COMPOL_GATHER_VEC_ATTACHMENT__
36 #define __H__PLG__COMPOL_GATHER_VEC_ATTACHMENT__
50 template <
class TLayout,
class TAttachment>
58 typedef typename TAttachment::ValueType
Vector;
100 template <
class TNodeLayout,
class TAttachment>
107 template <
class TNodeLayout,
class TAttachment>
111 set_attachment(grid, attachment);
115 template <
class TNodeLayout,
class TAttachment>
119 m_aaVec.access(grid, attachment);
123 template <
class TNodeLayout,
class TAttachment>
127 for(
typename Interface::const_iterator iter = interface.begin();
128 iter != interface.end(); ++iter)
130 Serialize(buff, m_aaVec[interface.get_element(iter)]);
136 template <
class TNodeLayout,
class TAttachment>
141 for(
typename Interface::const_iterator iter = interface.begin();
142 iter != interface.end(); ++iter)
144 Element e = interface.get_element(iter);
147 m_aaVec[e].reserve(m_aaVec[e].size() + tvec.
size());
148 for(
size_t i = 0; i < tvec.
size(); ++i)
149 m_aaVec[e].push_back(tvec[i]);
Definition: vector_interface.h:38
specializations are responsible to pack and unpack interface data during communication.
Definition: pcl_communication_structs.h:790
A Buffer for binary data.
Definition: binary_buffer.h:56
Gathers the values stored in vector-attachments.
Definition: compol_gather_vec_attachment.h:52
virtual bool extract(ug::BinaryBuffer &buff, const Interface &interface)
reads the data from the buffer to the given interface .
Definition: compol_gather_vec_attachment.h:138
Layout::Interface Interface
Definition: compol_gather_vec_attachment.h:57
void set_attachment(Grid &grid, TAttachment &attachment)
The grid and the attachment from where the data shall be copied.
Definition: compol_gather_vec_attachment.h:117
Layout::Element Element
Definition: compol_gather_vec_attachment.h:56
virtual bool collect(ug::BinaryBuffer &buff, const Interface &interface)
writes the data for the given interface to the buffer.
Definition: compol_gather_vec_attachment.h:125
Vector::value_type Value
Definition: compol_gather_vec_attachment.h:59
TAttachment::ValueType Vector
Definition: compol_gather_vec_attachment.h:58
ComPol_GatherVecAttachment()
Initialises the collector with an invalid grid.
Definition: compol_gather_vec_attachment.h:102
TLayout Layout
Definition: compol_gather_vec_attachment.h:54
Layout::Type GeomObj
Definition: compol_gather_vec_attachment.h:55
Grid::AttachmentAccessor< GeomObj, TAttachment > m_aaVec
Definition: compol_gather_vec_attachment.h:90
virtual ~ComPol_GatherVecAttachment()
Definition: compol_gather_vec_attachment.h:68
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
TValueType value_type
Definition: vector.h:57
void Deserialize(TIStream &buf, ParallelVector< T > &v)
Deerialize for ParallelVector<T>
Definition: restart_bridge.cpp:112
void Serialize(TOStream &buf, const ParallelVector< T > &v)
Serialize for ParallelVector<T>
Definition: restart_bridge.cpp:103