ug4
|
Communication Policy sending fractions to. More...
#include <communication_policies.h>
Public Types | |
typedef TAlgebra::matrix_type | TMatrix |
typedef TAlgebra::vector_type | TVector |
Public Types inherited from pcl::ICommunicationPolicy< IndexLayout > | |
typedef Layout::Interface | Interface |
typedef IndexLayout | Layout |
Public Member Functions | |
virtual bool | begin_layout_extraction (const Layout *pLayout) |
signals the beginning of a layout extraction. More... | |
virtual bool | collect (ug::BinaryBuffer &buff, const Interface &interface) |
writes the interface values into a buffer that will be sent More... | |
ComPol_MatDistributeDiag (TMatrix &rMat, TVector &rWeight, double theta=1.0) | |
Constructor setting the vector. More... | |
virtual bool | extract (ug::BinaryBuffer &buff, const Interface &interface) |
writes values from a buffer into the interface More... | |
virtual int | get_required_buffer_size (const Interface &interface) |
returns the buffer size 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 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 | |
double | m_dTheta |
TMatrix & | m_rMat |
TVector & | m_rWeight |
Communication Policy sending fractions to.
This Communication policy assumes that the matrix is stored additively with no overlap. It then copies the row entries of the slaves indices to the corresponding master rows. Only those values are copied that have if the index the slave couples to has also a representation on the other process. This means that couplings to inner indices or to other slave/master, that have only connections to other processes, are not taken into account.
TMatrix | matrix type |
typedef TAlgebra::matrix_type ug::ComPol_MatDistributeDiag< TAlgebra >::TMatrix |
typedef TAlgebra::vector_type ug::ComPol_MatDistributeDiag< TAlgebra >::TVector |
|
inline |
Constructor setting the vector.
vGlobalID must have size >= mat.num_rows()
References ug::ComPol_MatDistributeDiag< TAlgebra >::m_rMat, ug::ComPol_MatDistributeDiag< TAlgebra >::m_rWeight, and UG_ASSERT.
|
inlinevirtual |
signals the beginning of a layout extraction.
the default implementation returns true and does nothing else. This method is only called on processes which extract data.
Reimplemented from pcl::ICommunicationPolicy< IndexLayout >.
|
inlinevirtual |
writes the interface values into a buffer that will be sent
done
Implements pcl::ICommunicationPolicy< IndexLayout >.
References pcl::OrderedInterface< TType, TContainer, TAlloc >::begin(), ug::BlockRef(), pcl::OrderedInterface< TType, TContainer, TAlloc >::end(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_element(), ug::ComPol_MatDistributeDiag< TAlgebra >::m_rMat, ug::ComPol_MatDistributeDiag< TAlgebra >::m_rWeight, PROFILE_BEGIN_GROUP, and ug::Serialize().
|
inlinevirtual |
writes values from a buffer into the interface
done
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_MatDistributeDiag< TAlgebra >::m_rMat, 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().
|
private |
|
private |
|
private |