ug4
ug::ComPol_MatDistributeDiag< TAlgebra > Class Template Reference

Communication Policy sending fractions to. More...

#include <communication_policies.h>

+ Inheritance diagram for ug::ComPol_MatDistributeDiag< TAlgebra >:

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
 
TMatrixm_rMat
 
TVectorm_rWeight
 

Detailed Description

template<class TAlgebra>
class ug::ComPol_MatDistributeDiag< TAlgebra >

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.

Template Parameters
TMatrixmatrix type

Member Typedef Documentation

◆ TMatrix

template<class TAlgebra >
typedef TAlgebra::matrix_type ug::ComPol_MatDistributeDiag< TAlgebra >::TMatrix

◆ TVector

template<class TAlgebra >
typedef TAlgebra::vector_type ug::ComPol_MatDistributeDiag< TAlgebra >::TVector

Constructor & Destructor Documentation

◆ ComPol_MatDistributeDiag()

template<class TAlgebra >
ug::ComPol_MatDistributeDiag< TAlgebra >::ComPol_MatDistributeDiag ( TMatrix rMat,
TVector rWeight,
double  theta = 1.0 
)
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.

Member Function Documentation

◆ begin_layout_extraction()

template<class TAlgebra >
virtual bool ug::ComPol_MatDistributeDiag< TAlgebra >::begin_layout_extraction ( const Layout pLayout)
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 >.

◆ collect()

◆ extract()

◆ get_required_buffer_size()

template<class TAlgebra >
virtual int ug::ComPol_MatDistributeDiag< TAlgebra >::get_required_buffer_size ( const Interface interface)
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.

Parameters
[in]interfaceInterface that will communicate

Reimplemented from pcl::ICommunicationPolicy< IndexLayout >.

References pcl::OrderedInterface< TType, TContainer, TAlloc >::size().

Member Data Documentation

◆ m_dTheta

template<class TAlgebra >
double ug::ComPol_MatDistributeDiag< TAlgebra >::m_dTheta
private

◆ m_rMat

◆ m_rWeight


The documentation for this class was generated from the following file: