ug4
|
Public Types | |
enum | ConversionTypes { CT_IGNORE = 0 , CT_TO_NORMAL = 1 , CT_TO_CONSTRAINED = 2 , CT_TO_CONSTRAINING = 3 } |
typedef Layout::Element | Element |
typedef Layout::Type | GeomObj |
typedef Layout::Interface | Interface |
typedef Interface::const_iterator | InterfaceIter |
typedef TLayout | Layout |
Public Types inherited from pcl::ICommunicationPolicy< TLayout > | |
typedef Layout::Interface | Interface |
typedef TLayout | Layout |
Public Member Functions | |
virtual bool | collect (ug::BinaryBuffer &buff, const Interface &interface) |
writes the selection states of the interface entries More... | |
ComPol_AdjustType (ISelector &sel, DistributedGridManager &distGridMgr) | |
virtual bool | extract (ug::BinaryBuffer &buff, const Interface &interface) |
reads marks from the given stream 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 | ~ComPol_AdjustType () |
Public Member Functions inherited from pcl::ICommunicationPolicy< TLayout > | |
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 | |
DistributedGridManager & | m_distGridMgr |
ISelector & | m_sel |
During collection all elements which change their constrained/constraining type push their interface index and an indicator for their new type to the buffer.
During extraction, the local type of the element at a received interface entry is checked. If the type is different, the element is immediately replaced in the underlying grid. This should work fine with the distributed grid manager, which updates interfaces on the fly.
This ComPol is intended for communication from vertical slaves to vertical masters only. Changes are only applied to ghost-elements.
This ComPol may currently only be used for vertices, edges and faces.
typedef Layout::Element ug::ComPol_AdjustType< TLayout >::Element |
typedef Layout::Type ug::ComPol_AdjustType< TLayout >::GeomObj |
typedef Layout::Interface ug::ComPol_AdjustType< TLayout >::Interface |
typedef Interface::const_iterator ug::ComPol_AdjustType< TLayout >::InterfaceIter |
typedef TLayout ug::ComPol_AdjustType< TLayout >::Layout |
enum ug::ComPol_AdjustType::ConversionTypes |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
writes the selection states of the interface entries
Implements pcl::ICommunicationPolicy< TLayout >.
References ug::ComPol_AdjustType< TLayout >::CT_IGNORE, ug::ComPol_AdjustType< TLayout >::CT_TO_CONSTRAINED, ug::ComPol_AdjustType< TLayout >::CT_TO_CONSTRAINING, ug::ComPol_AdjustType< TLayout >::CT_TO_NORMAL, ug::DistributedGridManager::get_assigned_grid(), ug::ISelector::get_selection_status(), ug::HangingNodeRefinerBase< MGSelector >::HNRM_TO_CONSTRAINED, ug::HangingNodeRefinerBase< MGSelector >::HNRM_TO_CONSTRAINING, ug::HangingNodeRefinerBase< MGSelector >::HNRM_TO_NORMAL, ug::ISelector::is_selected(), ug::ComPol_AdjustType< TLayout >::m_distGridMgr, ug::ComPol_AdjustType< TLayout >::m_sel, UG_ASSERT, and ug::BinaryBuffer::write().
|
inlinevirtual |
reads marks from the given stream
Implements pcl::ICommunicationPolicy< TLayout >.
References ug::MultiGrid::begin(), ug::ComPol_AdjustType< TLayout >::CT_TO_CONSTRAINED, ug::ComPol_AdjustType< TLayout >::CT_TO_CONSTRAINING, ug::ComPol_AdjustType< TLayout >::CT_TO_NORMAL, ug::DistributedGridManager::get_assigned_grid(), ug::DistributedGridManager::is_in_horizontal_interface(), ug::ComPol_AdjustType< TLayout >::m_distGridMgr, ug::BinaryBuffer::read(), ug::ReplaceByConstrained(), ug::ReplaceByConstraining(), ug::ReplaceByNormal(), UG_ASSERT, and UG_LOG.
|
inlinevirtual |
returns the size of the buffer in bytes, that will be required for interface-communication.
Determines the size of the buffer on which the extract and receive methods for the given interface will operate. If the buffer-size can't be calculated on both sides (sender and receiver) this method should return -1. This will lead to an additional communication step in which buffer-sizes will be exchanged. If the buffer-size can be calculated on both sides, it makes sense to do so, since this leads to less communication and overall improved performance. The buffer-size has to exactly match the size of required memory. Make sure that you completely fill the buffer during collect(...) and that you read all data during extract(...). The default implementation returns -1.
Reimplemented from pcl::ICommunicationPolicy< TLayout >.
|
private |
|
private |
Referenced by ug::ComPol_AdjustType< TLayout >::collect().