ug4
|
Highly specialized communication policy for matrix overlap creation. More...
#include <matrix_overlap_impl.h>
Classes | |
struct | ExtCon |
Public Types | |
typedef TMatrix::value_type | block_t |
Public Types inherited from pcl::ICommunicationPolicy< IndexLayout > | |
typedef Layout::Interface | Interface |
typedef IndexLayout | Layout |
Public Member Functions | |
virtual bool | collect (ug::BinaryBuffer &buff, const Interface &interface) |
writes the interface values into a buffer that will be sent More... | |
ComPol_MatCreateOverlap (TMatrix &rMat, AlgebraIDVec &vGlobalID) | |
Constructor setting the vector. More... | |
virtual bool | extract (ug::BinaryBuffer &buff, const Interface &interface) |
writes values from a buffer into the interface More... | |
virtual void | post_process () |
After communication is done, this method should be called to create the overlap. 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 int | get_required_buffer_size (const Interface &interface) |
returns the size of the buffer in bytes, that will be required for interface-communication. More... | |
virtual | ~ICommunicationPolicy () |
Private Attributes | |
AlgebraIDHashList | m_algIDHash |
map globalID->localID More... | |
AlgebraIDVec & | m_globalIDs |
map localID->globalID More... | |
TMatrix & | m_mat |
std::map< ExtCon, block_t > | m_recvNewCons |
New connections received from other processes. More... | |
std::set< AlgebraID > | m_recvNewIDs |
Here we just collect the new IDs which are added to the local matrix. More... | |
Highly specialized communication policy for matrix overlap creation.
After communicating from slave->master, call post_process() to create the actual overlap. GlobalIDs will also be updated for new entries.
typedef TMatrix::value_type ug::ComPol_MatCreateOverlap< TMatrix >::block_t |
|
inline |
Constructor setting the vector.
vGlobalID must have size >= mat.num_rows()
References ug::GenerateAlgebraIDHashList(), ug::ComPol_MatCreateOverlap< TMatrix >::m_algIDHash, ug::ComPol_MatCreateOverlap< TMatrix >::m_globalIDs, ug::ComPol_MatCreateOverlap< TMatrix >::m_mat, and UG_COND_THROW.
|
inlinevirtual |
writes the interface values into a buffer that will be sent
done
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_MatCreateOverlap< TMatrix >::m_globalIDs, ug::ComPol_MatCreateOverlap< TMatrix >::m_mat, 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::Hash< TKey, TValue >::get_entry(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_target_proc(), ug::ComPol_MatCreateOverlap< TMatrix >::m_algIDHash, ug::ComPol_MatCreateOverlap< TMatrix >::m_globalIDs, ug::ComPol_MatCreateOverlap< TMatrix >::m_mat, ug::ComPol_MatCreateOverlap< TMatrix >::m_recvNewCons, ug::ComPol_MatCreateOverlap< TMatrix >::m_recvNewIDs, and PROFILE_BEGIN_GROUP.
|
inlinevirtual |
After communication is done, this method should be called to create the overlap.
References ug::BinaryBuffer::buffer(), ug::ComPol_MatCreateOverlap< TMatrix >::ExtCon::conProc, ug::Deserialize(), ug::ComPol_MatCreateOverlap< TMatrix >::ExtCon::fromInd, ug::Hash< TKey, TValue >::get_entry(), pcl::OrderedInterface< TType, TContainer, TAlloc >::get_target_proc(), ug::GetLayoutTargetProcs(), ug::Hash< TKey, TValue >::insert(), ug::ComPol_MatCreateOverlap< TMatrix >::m_algIDHash, ug::ComPol_MatCreateOverlap< TMatrix >::m_globalIDs, ug::ComPol_MatCreateOverlap< TMatrix >::m_mat, ug::ComPol_MatCreateOverlap< TMatrix >::m_recvNewCons, ug::ComPol_MatCreateOverlap< TMatrix >::m_recvNewIDs, make_sp(), pcl::OrderedInterface< TType, TContainer, TAlloc >::push_back(), ug::BinaryBuffer::read_pos(), ug::Serialize(), ug::SetDirichletRow(), ug::ComPol_MatCreateOverlap< TMatrix >::ExtCon::toID, UG_COND_THROW, UG_THROW, and ug::BinaryBuffer::write_pos().
Referenced by ug::CreateOverlap().
|
private |
map globalID->localID
Referenced by ug::ComPol_MatCreateOverlap< TMatrix >::ComPol_MatCreateOverlap(), ug::ComPol_MatCreateOverlap< TMatrix >::extract(), and ug::ComPol_MatCreateOverlap< TMatrix >::post_process().
|
private |
|
private |
|
private |
New connections received from other processes.
Referenced by ug::ComPol_MatCreateOverlap< TMatrix >::extract(), and ug::ComPol_MatCreateOverlap< TMatrix >::post_process().
|
private |
Here we just collect the new IDs which are added to the local matrix.
Referenced by ug::ComPol_MatCreateOverlap< TMatrix >::extract(), and ug::ComPol_MatCreateOverlap< TMatrix >::post_process().