ug4
|
Communication Policy to subtract only one slave value per master of a vector. More...
#include <communication_policies.h>
Public Member Functions | |
void | clear () |
clear processed flag More... | |
virtual bool | collect (ug::BinaryBuffer &buff, const Interface &interface) |
writes the interface values into a buffer that will be sent More... | |
ComPol_VecSubtractOnlyOneSlave () | |
Default constructor. More... | |
ComPol_VecSubtractOnlyOneSlave (TVector *pVec) | |
Constructor setting the values. More... | |
virtual bool | extract (ug::BinaryBuffer &buff, const Interface &interface) |
subtracts values of a buffer to the interface values More... | |
virtual int | get_required_buffer_size (const Interface &interface) |
returns the buffer size More... | |
void | set_vector (TVector *pVec) |
sets the vector used in communication More... | |
Public Member Functions inherited from pcl::ICommunicationPolicy< IndexLayout > | |
virtual bool | begin_layout_collection (const Layout *pLayout) |
signals the beginning of a layout collection. More... | |
virtual bool | begin_layout_extraction (const Layout *pLayout) |
signals the beginning of a layout extraction. More... | |
virtual void | begin_level_extraction (int level) |
signals that a new layout-level will now be processed. More... | |
virtual bool | end_layout_collection (const Layout *pLayout) |
signals the end of a layout collection More... | |
virtual bool | end_layout_extraction (const Layout *pLayout) |
signals the end of a layout extraction More... | |
virtual | ~ICommunicationPolicy () |
Private Attributes | |
TVector * | m_pVec |
std::vector< bool > | m_vProcessed |
Additional Inherited Members | |
Public Types inherited from pcl::ICommunicationPolicy< IndexLayout > | |
typedef Layout::Interface | Interface |
typedef IndexLayout | Layout |
Communication Policy to subtract only one slave value per master of a vector.
This class is used as a policy to subtract values on the interfaces of a parallel vector. The collecting interfaces - supposed to consist of slave dofs - pack the values on the interface into a stream. The extracting interfaces - supposed to consist of master dofs - receive the stream and subtracts only one slave value (the first) per master.
TVector | Vector type |
|
inline |
Default constructor.
|
inline |
Constructor setting the values.
References ug::ComPol_VecSubtractOnlyOneSlave< TVector >::set_vector().
|
inline |
clear processed flag
References ug::ComPol_VecSubtractOnlyOneSlave< TVector >::m_pVec, and ug::ComPol_VecSubtractOnlyOneSlave< TVector >::m_vProcessed.
|
inlinevirtual |
writes the interface values into a buffer that will be sent
This function collects all entries of the vector into a buffer that are part of the interface.
[out] | buff | Buffer |
[in] | interface | Interface that will communicate |
Implements pcl::ICommunicationPolicy< IndexLayout >.
References pcl::OrderedInterface< TType, TContainer, TAlloc >::begin(), pcl::OrderedInterface< TType, TContainer, TAlloc >::end(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_element(), ug::ComPol_VecSubtractOnlyOneSlave< TVector >::m_pVec, PROFILE_BEGIN_GROUP, and ug::Serialize().
|
inlinevirtual |
subtracts values of a buffer to the interface values
This function subtracts the buffer values to the vector values.
[out] | buff | Buffer |
[in] | interface | Interface that communicates |
Implements pcl::ICommunicationPolicy< IndexLayout >.
References pcl::OrderedInterface< TType, TContainer, TAlloc >::begin(), ug::Deserialize(), pcl::OrderedInterface< TType, TContainer, TAlloc >::end(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_element(), ug::ComPol_VecSubtractOnlyOneSlave< TVector >::m_pVec, ug::ComPol_VecSubtractOnlyOneSlave< TVector >::m_vProcessed, and PROFILE_BEGIN_GROUP.
|
inlinevirtual |
returns the buffer size
This function returns the size of the buffer needed for the communication of passed interface. If the vector has fixed size entries this is just the number of interface entries times the size of the entry. In case of a variable size entry type a negative value is returned to indicate that no buffer size can be determined in advanced.
[in] | interface | Interface that will communicate |
Reimplemented from pcl::ICommunicationPolicy< IndexLayout >.
References pcl::OrderedInterface< TType, TContainer, TAlloc >::size().
|
inline |
sets the vector used in communication
References ug::ComPol_VecSubtractOnlyOneSlave< TVector >::m_pVec, and ug::ComPol_VecSubtractOnlyOneSlave< TVector >::m_vProcessed.
Referenced by ug::ComPol_VecSubtractOnlyOneSlave< TVector >::ComPol_VecSubtractOnlyOneSlave().
|
private |
|
private |