ug4
ug::DistributedGridManager Class Reference

manages the layouts and interfaces which are associated with a distributed grid. More...

#include <distributed_grid.h>

+ Inheritance diagram for ug::DistributedGridManager:

Classes

class  ElementInfo
 Be careful when creating copies of ElementInfo. More...
 
struct  ScheduledElement
 Used to schedule an element for insertion during ordered-insertion-mode. More...
 

Public Member Functions

void assign (MultiGrid &grid)
 
void begin_element_deletion ()
 call this method before you start deleting elements in the associated grid More...
 
void begin_ordered_element_insertion ()
 call this method before you start creating new elements in the associated grid. More...
 
template<class TElem >
void collect_interface_entries (std::vector< std::pair< int, size_t > > &vEntriesOut, TElem *elem, byte statusType, bool clearContainer=true)
 
template<class TGeomObj >
bool contains_status (TGeomObj *o, byte status) const
 returns true if the status of the given object contains the given status. More...
 
 DistributedGridManager ()
 
 DistributedGridManager (MultiGrid &grid)
 
SmartPtr< DistroAdjusterdistro_adjuster ()
 get the distribution adjuster More...
 
virtual void edge_created (Grid *grid, Edge *e, GridObject *pParent=NULL, bool replacesParent=false)
 Notified whenever a new element of the given type is created in the given grid. More...
 
virtual void edge_to_be_erased (Grid *grid, Edge *e, Edge *replacedBy=NULL)
 Notified whenever an element of the given type is erased from the given grid. More...
 
void enable_interface_management (bool bEnable)
 Enables or disables interface managment. Use with care! More...
 
void end_element_deletion ()
 call this method after you're done deleting elements from the associated grid More...
 
void end_ordered_element_insertion ()
 call this method when you're done with element creation. More...
 
virtual void face_created (Grid *grid, Face *f, GridObject *pParent=NULL, bool replacesParent=false)
 Notified whenever a new element of the given type is created in the given grid. More...
 
virtual void face_to_be_erased (Grid *grid, Face *f, Face *replacedBy=NULL)
 Notified whenever an element of the given type is erased from the given grid. More...
 
MultiGridget_assigned_grid ()
 
const MultiGridget_assigned_grid () const
 
GridLayoutMapgrid_layout_map ()
 
const GridLayoutMapgrid_layout_map () const
 
void grid_layouts_changed (bool addedElemsOnly=false)
 call this method if you altered the layout externally. More...
 
virtual void grid_to_be_destroyed (Grid *grid)
 
template<class TElem >
bool is_ghost (TElem *elem) const
 returns true if the element is a ghost More...
 
template<class TElem >
bool is_in_horizontal_interface (TElem *elem) const
 returns true if the element is contained in a horizontal interface More...
 
template<class TElem >
bool is_in_vertical_interface (TElem *elem) const
 returns true if the element is contained in a vertical interface More...
 
template<class TElem >
bool is_interface_element (TElem *elem)
 returns true if an element is in one or more interfaces More...
 
void set_distro_adjuster (SmartPtr< DistroAdjuster > adj)
 set a global distribution adjuster More...
 
virtual void vertex_created (Grid *grid, Vertex *vrt, GridObject *pParent=NULL, bool replacesParent=false)
 Notified whenever a new element of the given type is created in the given grid. More...
 
virtual void vertex_to_be_erased (Grid *grid, Vertex *vrt, Vertex *replacedBy=NULL)
 Notified whenever an element of the given type is erased from the given grid. More...
 
virtual void volume_created (Grid *grid, Volume *v, GridObject *pParent=NULL, bool replacesParent=false)
 Notified whenever a new element of the given type is created in the given grid. More...
 
virtual void volume_to_be_erased (Grid *grid, Volume *vol, Volume *replacedBy=NULL)
 Notified whenever an element of the given type is erased from the given grid. More...
 
virtual ~DistributedGridManager ()
 
byte get_status (GridObject *go) const
 returns the status of the given object. More...
 
byte get_status (Vertex *vrt) const
 returns the status of the given object. More...
 
byte get_status (Edge *edge) const
 returns the status of the given object. More...
 
byte get_status (Face *face) const
 returns the status of the given object. More...
 
byte get_status (Volume *vol) const
 returns the status of the given object. More...
 
- Public Member Functions inherited from ug::GridObserver
virtual void elements_to_be_cleared (Grid *grid)
 
virtual ~GridObserver ()
 
virtual void vertices_to_be_merged (Grid *grid, Vertex *target, Vertex *elem1, Vertex *elem2)
 Notified when two elements of the same type are going to be merged. More...
 
virtual void edges_to_be_merged (Grid *grid, Edge *target, Edge *elem1, Edge *elem2)
 Notified when two elements of the same type are going to be merged. More...
 
virtual void faces_to_be_merged (Grid *grid, Face *target, Face *elem1, Face *elem2)
 Notified when two elements of the same type are going to be merged. More...
 
virtual void volumes_to_be_merged (Grid *grid, Volume *target, Volume *elem1, Volume *elem2)
 Notified when two elements of the same type are going to be merged. More...
 

Protected Types

typedef Attachment< ElemInfoEdgeAElemInfoEdge
 
typedef Attachment< ElemInfoFaceAElemInfoFace
 
typedef Attachment< ElemInfoVolAElemInfoVol
 
typedef Attachment< ElemInfoVrtAElemInfoVrt
 
typedef ElementInfo< EdgeElemInfoEdge
 
typedef ElementInfo< FaceElemInfoFace
 
typedef ElementInfo< VolumeElemInfoVol
 
typedef ElementInfo< VertexElemInfoVrt
 
typedef std::multimap< size_t, ScheduledElementScheduledElemMap
 

Protected Member Functions

template<class TElem >
void add_element_to_interface (TElem *pElem, int procID)
 
void clear_scheduled_elements ()
 
template<class TElem >
void create_missing_constrained_h_interfaces (std::vector< TElem * > &newConstrainedElems)
 
ElemInfoEdgeelem_info (Edge *ele)
 
const ElemInfoEdgeelem_info (Edge *ele) const
 
ElemInfoFaceelem_info (Face *ele)
 
const ElemInfoFaceelem_info (Face *ele) const
 
ElemInfoVrtelem_info (Vertex *ele)
 
const ElemInfoVrtelem_info (Vertex *ele) const
 
ElemInfoVolelem_info (Volume *ele)
 
const ElemInfoVolelem_info (Volume *ele) const
 
template<class TElem >
void element_to_be_erased (TElem *elem)
 
void free_grid_data ()
 free's all grid related data More...
 
void got_new_constrained_vertical (Edge *e)
 
void got_new_constrained_vertical (Face *f)
 
void got_new_constrained_vertical (Vertex *v)
 
void got_new_constrained_vertical (Volume *)
 
template<class TElem >
void handle_created_element (TElem *pElem, GridObject *pParent, bool replacesParent)
 vertex_created, edge_created, ... callbacks call this method. More...
 
template<class TScheduledElemMap >
void perform_ordered_element_insertion (TScheduledElemMap &elemMap)
 
template<class TGeomObj >
void reset_elem_infos ()
 
template<class TElem , class TScheduledElemMap , class TParent >
void schedule_element_for_insertion (TScheduledElemMap &elemMap, TElem *elem, TParent *pParent)
 
void set_grid (Grid *grid)
 performs registration and deregistration at a grid. More...
 
template<class TGeomObj >
void update_all_elem_infos ()
 
template<class TGeomObj , class TLayoutMap >
void update_elem_info (TLayoutMap &layoutMap, int nodeType, byte newStatus, bool addStatus=false)
 

Protected Attributes

Grid::EdgeAttachmentAccessor< AElemInfoEdgem_aaElemInfoEDGE
 
Grid::FaceAttachmentAccessor< AElemInfoFacem_aaElemInfoFACE
 
Grid::VolumeAttachmentAccessor< AElemInfoVolm_aaElemInfoVOL
 
Grid::VertexAttachmentAccessor< AElemInfoVrtm_aaElemInfoVRT
 
AElemInfoEdge m_aElemInfoEdge
 
AElemInfoFace m_aElemInfoFace
 
AElemInfoVol m_aElemInfoVol
 
AElemInfoVrt m_aElemInfoVrt
 
bool m_bElementDeletionMode
 
bool m_bOrderedInsertionMode
 
ScheduledElemMap m_edgeMap
 holds all elements that were scheduled by edges More...
 
ScheduledElemMap m_faceMap
 holds all elements that were scheduled by faces More...
 
GridLayoutMap m_gridLayoutMap
 
bool m_interfaceManagementEnabled
 only for debug purposes More...
 
std::vector< Edge * > m_newConstrainedVerticalEdges
 
std::vector< Face * > m_newConstrainedVerticalFaces
 
std::vector< Vertex * > m_newConstrainedVerticalVrts
 
MultiGridm_pGrid
 
SmartPtr< DistroAdjusterm_spDistroAdjuster
 
ScheduledElemMap m_volMap
 holds all elements that were scheduled by volumes More...
 
ScheduledElemMap m_vrtMap
 holds all elements that were scheduled by vertices More...
 

Detailed Description

manages the layouts and interfaces which are associated with a distributed grid.

The DistributedGridManager is a grid observer, which manages the GridLayoutMap of a distributed grid. New elements are automatically added to interfaces as required and erased elements are automatically removed from interfaces.

Note that while a DistributedGridManager observes a grid, one may only create new elements in the associated grid between calls to begin_ordered_element_insertion() and end_ordered_element_insertion().

Similarly elements of the associated grid may only be erased during calls to begin_element_deletion() and end_element_deletion().

Those barriers are important, so that distributed grid managers can insert associated elements on different processes in the same order without communicating.

Note that only one layer of elements may be created / erased between calls to begin_ordered_element_insertion / end_ordered_... etc...

Member Typedef Documentation

◆ AElemInfoEdge

◆ AElemInfoFace

◆ AElemInfoVol

◆ AElemInfoVrt

◆ ElemInfoEdge

◆ ElemInfoFace

◆ ElemInfoVol

◆ ElemInfoVrt

◆ ScheduledElemMap

typedef std::multimap<size_t, ScheduledElement> ug::DistributedGridManager::ScheduledElemMap
protected

Constructor & Destructor Documentation

◆ DistributedGridManager() [1/2]

ug::DistributedGridManager::DistributedGridManager ( )

◆ DistributedGridManager() [2/2]

ug::DistributedGridManager::DistributedGridManager ( MultiGrid grid)

◆ ~DistributedGridManager()

Member Function Documentation

◆ add_element_to_interface()

◆ assign()

void ug::DistributedGridManager::assign ( MultiGrid grid)

◆ begin_element_deletion()

void ug::DistributedGridManager::begin_element_deletion ( )

◆ begin_ordered_element_insertion()

void ug::DistributedGridManager::begin_ordered_element_insertion ( )

call this method before you start creating new elements in the associated grid.

You shouldn't add new interfaces to the associated communication-set between begin_ and end_element_creation.

References m_bElementDeletionMode, and m_bOrderedInsertionMode.

Referenced by ug::ParallelHangingNodeRefiner_MultiGrid::pre_refine(), and ug::ParallelGlobalFracturedMediaRefiner::refinement_step_begins().

◆ clear_scheduled_elements()

void ug::DistributedGridManager::clear_scheduled_elements ( )
protected

◆ collect_interface_entries()

template<class TElem >
void ug::DistributedGridManager::collect_interface_entries ( std::vector< std::pair< int, size_t > > &  vEntriesOut,
TElem *  elem,
byte  statusType,
bool  clearContainer = true 
)

returns a list of pairs (procID, index) that tells for each element where in which interfaces it lies.

Parameters
statusTypemay be any or-combination of values enumerated in ElementStatusTypes.

References elem_info().

Referenced by ug::ComPol_NewConstrainedVerticals< TLayout >::collect(), ug::ComPol_NewConstrainedVerticals< TLayout >::create_initial_hash_entry(), and create_missing_constrained_h_interfaces().

◆ contains_status()

◆ create_missing_constrained_h_interfaces()

◆ distro_adjuster()

SmartPtr<DistroAdjuster> ug::DistributedGridManager::distro_adjuster ( )
inline

get the distribution adjuster

References m_spDistroAdjuster.

Referenced by ug::SelectElementsForTargetPartition().

◆ edge_created()

void ug::DistributedGridManager::edge_created ( Grid grid,
Edge e,
GridObject pParent = NULL,
bool  replacesParent = false 
)
virtual

Notified whenever a new element of the given type is created in the given grid.

Creation callbacks are called in the order in which the GridObservers were registered at the given grid.

If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.

Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).

Reimplemented from ug::GridObserver.

References handle_created_element().

◆ edge_to_be_erased()

void ug::DistributedGridManager::edge_to_be_erased ( Grid grid,
Edge e,
Edge replacedBy = NULL 
)
virtual

Notified whenever an element of the given type is erased from the given grid.

Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.

if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).

Reimplemented from ug::GridObserver.

References element_to_be_erased().

◆ elem_info() [1/8]

ElemInfoEdge& ug::DistributedGridManager::elem_info ( Edge ele)
inlineprotected

References m_aaElemInfoEDGE.

◆ elem_info() [2/8]

const ElemInfoEdge& ug::DistributedGridManager::elem_info ( Edge ele) const
inlineprotected

References m_aaElemInfoEDGE.

◆ elem_info() [3/8]

ElemInfoFace& ug::DistributedGridManager::elem_info ( Face ele)
inlineprotected

References m_aaElemInfoFACE.

◆ elem_info() [4/8]

const ElemInfoFace& ug::DistributedGridManager::elem_info ( Face ele) const
inlineprotected

References m_aaElemInfoFACE.

◆ elem_info() [5/8]

◆ elem_info() [6/8]

const ElemInfoVrt& ug::DistributedGridManager::elem_info ( Vertex ele) const
inlineprotected

References m_aaElemInfoVRT.

◆ elem_info() [7/8]

ElemInfoVol& ug::DistributedGridManager::elem_info ( Volume ele)
inlineprotected

References m_aaElemInfoVOL.

◆ elem_info() [8/8]

const ElemInfoVol& ug::DistributedGridManager::elem_info ( Volume ele) const
inlineprotected

References m_aaElemInfoVOL.

◆ element_to_be_erased()

◆ enable_interface_management()

void ug::DistributedGridManager::enable_interface_management ( bool  bEnable)
inline

Enables or disables interface managment. Use with care!

Interface managment is enabled by default. If you intend to completly restructure the grid and its interfaces, it may be beneficial to disable interface management before doing so. You should then use the method grid_layouts_changed to inform the DistributedGridManager that you modified the interfaces externally.

References m_interfaceManagementEnabled.

Referenced by ug::DistributeGrid().

◆ end_element_deletion()

◆ end_ordered_element_insertion()

void ug::DistributedGridManager::end_ordered_element_insertion ( )

call this method when you're done with element creation.

Elements will not be added to the associated

See also
GridCommunicationSet until this method is called.

References clear_scheduled_elements(), m_bOrderedInsertionMode, m_edgeMap, m_faceMap, m_interfaceManagementEnabled, m_volMap, m_vrtMap, and perform_ordered_element_insertion().

Referenced by ug::ParallelHangingNodeRefiner_MultiGrid::post_refine(), and ug::ParallelGlobalFracturedMediaRefiner::refinement_step_ends().

◆ face_created()

void ug::DistributedGridManager::face_created ( Grid grid,
Face f,
GridObject pParent = NULL,
bool  replacesParent = false 
)
virtual

Notified whenever a new element of the given type is created in the given grid.

Creation callbacks are called in the order in which the GridObservers were registered at the given grid.

If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.

Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).

Reimplemented from ug::GridObserver.

References handle_created_element().

◆ face_to_be_erased()

void ug::DistributedGridManager::face_to_be_erased ( Grid grid,
Face f,
Face replacedBy = NULL 
)
virtual

Notified whenever an element of the given type is erased from the given grid.

Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.

if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).

Reimplemented from ug::GridObserver.

References element_to_be_erased().

◆ free_grid_data()

◆ get_assigned_grid() [1/2]

◆ get_assigned_grid() [2/2]

const MultiGrid* ug::DistributedGridManager::get_assigned_grid ( ) const
inline

References m_pGrid.

◆ get_status() [1/5]

byte ug::DistributedGridManager::get_status ( Edge edge) const
inline

returns the status of the given object.

The status gives information about the type of interfaces in which a node lies. The returned value is an or combination of the constants enumerated in InterfaceNodeTypes and ElementStatusTypes.

See also
contains_status

References elem_info(), and ug::DistributedGridManager::ElementInfo< TGeomObj >::get_status().

◆ get_status() [2/5]

byte ug::DistributedGridManager::get_status ( Face face) const
inline

returns the status of the given object.

The status gives information about the type of interfaces in which a node lies. The returned value is an or combination of the constants enumerated in InterfaceNodeTypes and ElementStatusTypes.

See also
contains_status

References elem_info(), and ug::DistributedGridManager::ElementInfo< TGeomObj >::get_status().

◆ get_status() [3/5]

byte ug::DistributedGridManager::get_status ( GridObject go) const

returns the status of the given object.

The status gives information about the type of interfaces in which a node lies. The returned value is an or combination of the constants enumerated in InterfaceNodeTypes and ElementStatusTypes.

See also
contains_status

References ug::GridObject::base_object_id(), ug::EDGE, ug::FACE, ug::VERTEX, and ug::VOLUME.

Referenced by add_element_to_interface(), ug::AssignSubsetsByInterfaceType(), contains_status(), create_missing_constrained_h_interfaces(), handle_created_element(), is_ghost(), is_in_horizontal_interface(), is_in_vertical_interface(), ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >::prep_elem(), ug::FV1InnerBoundaryElemDisc< TImpl, TDomain >::prep_err_est_elem(), and ug::DoFDistribution::sum_dof_count().

◆ get_status() [4/5]

byte ug::DistributedGridManager::get_status ( Vertex vrt) const
inline

returns the status of the given object.

The status gives information about the type of interfaces in which a node lies. The returned value is an or combination of the constants enumerated in InterfaceNodeTypes and ElementStatusTypes.

See also
contains_status

References elem_info(), and ug::DistributedGridManager::ElementInfo< TGeomObj >::get_status().

◆ get_status() [5/5]

byte ug::DistributedGridManager::get_status ( Volume vol) const
inline

returns the status of the given object.

The status gives information about the type of interfaces in which a node lies. The returned value is an or combination of the constants enumerated in InterfaceNodeTypes and ElementStatusTypes.

See also
contains_status

References elem_info(), and ug::DistributedGridManager::ElementInfo< TGeomObj >::get_status().

◆ got_new_constrained_vertical() [1/4]

void ug::DistributedGridManager::got_new_constrained_vertical ( Edge e)
inlineprotected

◆ got_new_constrained_vertical() [2/4]

void ug::DistributedGridManager::got_new_constrained_vertical ( Face f)
inlineprotected

◆ got_new_constrained_vertical() [3/4]

void ug::DistributedGridManager::got_new_constrained_vertical ( Vertex v)
inlineprotected

◆ got_new_constrained_vertical() [4/4]

void ug::DistributedGridManager::got_new_constrained_vertical ( Volume )
inlineprotected

References UG_THROW.

◆ grid_layout_map() [1/2]

GridLayoutMap& ug::DistributedGridManager::grid_layout_map ( )
inline

if you change the layout externally, be sure to call DistributedGrid::layout_changed() afterwards.

References m_gridLayoutMap.

Referenced by ug::ApplySmoothManifoldPosToTopLevelAveragingScheme(), ug::ApplySmoothManifoldPosToTopLevelButterflyScheme(), ug::ApplySmoothManifoldPosToTopLevelLoopScheme(), ug::ApplySmoothVolumePosToTopLevel(), ug::ParallelHangingNodeRefiner_MultiGrid::assign_hnode_marks(), ug::AttachmentAllReduce(), ug::ParallelHangingNodeRefiner_MultiGrid::broadcast_marks_horizontally(), ug::ParallelHangingNodeRefiner_MultiGrid::broadcast_marks_vertically(), ug::ISelector::broadcast_selection_states(), ug::CalculateNumElemsVertexAttachmentInTopLevel(), ug::CalculateNumManifoldEdgesVertexAttachmentInParentLevel(), ug::CalculateNumManifoldFacesVertexAttachmentInTopLevel(), ug::CheckDistributedObjectConstraintTypes(), ug::ParallelGlobalFracturedMediaRefiner::communicate_marks(), ug::ParallelHangingNodeRefiner_MultiGrid::copy_marks_to_vmasters(), ug::ParallelHangingNodeRefiner_MultiGrid::copy_marks_to_vslaves(), ug::Partitioner_DynamicBisection< TElem, dim >::copy_partitions_to_children(), ug::IDomain< TGrid, TSubsetHandler >::count_ghosts(), ug::CreateSurfaceView(), ug::DistributeGrid(), ug::ComPol_NewConstrainedVerticals< TLayout >::exchange_data(), ug::ExchangeAndAdjustSideErrors(), ug::Partitioner_DynamicBisection< TElem, dim >::gather_weights_from_level(), ug::ParallelDualGraph< TGeomBaseObj, TIndexType, TConnectingObj >::generate_graph(), ug::GridFunction< TDomain, TAlgebra >::grid_changed_callback(), ug::GridFunction< TDomain, TAlgebra >::grid_distribution_callback(), ug::MarkForAdaption_GradientAverage(), ug::IApproximationSpace::might_contain_ghosts(), ug::PartitionMultiGridLevel_ParmetisKway(), ug::Partitioner_DynamicBisection< TElem, dim >::perform_bisection(), ug::ProjectHierarchyToSubdivisionLimit(), ug::CopyAttachmentHandler< TElem, TAttachment >::propagate_to_level(), ug::ParallelHNodeAdjuster::ref_marks_changed(), ug::SideAndElemErrEstData< TDomain >::summarize_err_est_data(), and ug::SynchronizeDistInfos().

◆ grid_layout_map() [2/2]

const GridLayoutMap& ug::DistributedGridManager::grid_layout_map ( ) const
inline

References m_gridLayoutMap.

◆ grid_layouts_changed()

void ug::DistributedGridManager::grid_layouts_changed ( bool  addedElemsOnly = false)

call this method if you altered the layout externally.

This should be done as seldom as possible. If you only added elements you may set addedElemsOnly to true. The complexity in this case is proportional to the number of elements in the layout. If you removed elements or if you are unsure what operations have been performed on the layout, you have to set addedElemsOnly to false (the default value). Complexity in this case is proportional to the number of elements in the underlying grid (or numer of elements in the layout - whichever is higher).

Referenced by ug::DistributeGrid(), and set_grid().

◆ grid_to_be_destroyed()

void ug::DistributedGridManager::grid_to_be_destroyed ( Grid grid)
virtual

Reimplemented from ug::GridObserver.

References free_grid_data(), and m_pGrid.

◆ handle_created_element()

◆ is_ghost()

template<class TElem >
bool ug::DistributedGridManager::is_ghost ( TElem *  elem) const
inline

returns true if the element is a ghost

ghost elements are vertical masters that are in no other interfaces. Those elements shouldn't be refined.

References ug::ES_H_MASTER, ug::ES_H_SLAVE, ug::ES_V_MASTER, and get_status().

Referenced by ug::AddEntriesToSurfaceIndexLayout(), ug::CalculateConstrainedSmoothVolumePosInTopLevel(), ug::CalculateNumElemsVertexAttachmentInTopLevel(), ug::CalculateNumManifoldEdgesVertexAttachmentInParentLevel(), ug::CalculateNumManifoldFacesVertexAttachmentInTopLevel(), ug::CalculateSmoothCreaseManifoldPosInParentLevelLoopScheme(), ug::CalculateSmoothManifoldPosInParentLevelButterflyScheme(), ug::CalculateSmoothManifoldPosInParentLevelLoopScheme(), ug::CalculateSmoothManifoldPosInTopLevelAveragingScheme(), ug::CalculateSmoothVolumePosInTopLevel(), ug::bridge::Evaluate::CloseVertexExists(), ug::CollectSurfaceViewElements(), ug::ConstructParallelDualGraphMGLevel(), ug::IDomain< TGrid, TSubsetHandler >::count_ghosts(), ug::IDomain< TGrid, TSubsetHandler >::count_local_unique_surface_elements(), ug::LoadBalancer::estimate_distribution_quality_impl(), ug::bridge::Evaluate::EvaluateAtVertex(), ug::Partitioner_DynamicBisection< TElem, dim >::gather_weights_from_level(), ug::ParallelDualGraph< TGeomBaseObj, TIndexType, TConnectingObj >::generate_graph(), ug::SurfaceView::is_ghost(), ug::IsRegularSurfaceElem::is_ok(), ug::PartitionMultiGridLevel_ParmetisKway(), ug::Partitioner_DynamicBisection< TElem, dim >::perform_bisection(), ug::PrintElementEdgeRatios(), ug::ParallelGlobalFracturedMediaRefiner::refinement_is_allowed(), ug::ParallelHangingNodeRefiner_MultiGrid::refinement_is_allowed(), ug::SelectChildrenOfSelectedShadowRimEdges(), ug::SelectChildrenOfSelectedShadowRimFaces(), ug::SelectChildrenOfSelectedShadowVertices(), and ug::ZRayTracer< TDomain >::ZRayTracer().

◆ is_in_horizontal_interface()

template<class TElem >
bool ug::DistributedGridManager::is_in_horizontal_interface ( TElem *  elem) const
inline

returns true if the element is contained in a horizontal interface

References ug::ES_H_MASTER, ug::ES_H_SLAVE, and get_status().

Referenced by ug::ComPol_AdjustType< TLayout >::extract().

◆ is_in_vertical_interface()

template<class TElem >
bool ug::DistributedGridManager::is_in_vertical_interface ( TElem *  elem) const
inline

returns true if the element is contained in a vertical interface

References ug::ES_V_MASTER, ug::ES_V_SLAVE, and get_status().

Referenced by handle_created_element().

◆ is_interface_element()

template<class TElem >
bool ug::DistributedGridManager::is_interface_element ( TElem *  elem)

returns true if an element is in one or more interfaces

References elem_info(), ug::ES_IN_INTERFACE, and ug::DistributedGridManager::ElementInfo< TGeomObj >::get_status().

Referenced by ug::ContainsInterfaceElem().

◆ perform_ordered_element_insertion()

template<class TScheduledElemMap >
void ug::DistributedGridManager::perform_ordered_element_insertion ( TScheduledElemMap &  elemMap)
protected

◆ reset_elem_infos()

template<class TGeomObj >
void ug::DistributedGridManager::reset_elem_infos
protected

◆ schedule_element_for_insertion()

◆ set_distro_adjuster()

void ug::DistributedGridManager::set_distro_adjuster ( SmartPtr< DistroAdjuster adj)
inline

set a global distribution adjuster

A distribution adjuster may be used to manually adjust how elements are distributed by the domain distribution. For example, in the circumstances that led to the implementation of this feature, it was necessary to distribute certain vertices to all processes which held elements of a specific subset (regardless of whether those processes had any elements connected to these vertices or not). During the distribution process, the adjuster's adjust() method is called at the end of SelectElementsForTargetPartition() in distribution.cpp.

Warning
This is a highly experimental feature and as such not guaranteed to work properly.

References m_spDistroAdjuster.

◆ set_grid()

◆ update_all_elem_infos()

template<class TGeomObj >
void ug::DistributedGridManager::update_all_elem_infos
protected

◆ update_elem_info()

template<class TGeomObj , class TLayoutMap >
void ug::DistributedGridManager::update_elem_info ( TLayoutMap &  layoutMap,
int  nodeType,
byte  newStatus,
bool  addStatus = false 
)
protected

◆ vertex_created()

void ug::DistributedGridManager::vertex_created ( Grid grid,
Vertex vrt,
GridObject pParent = NULL,
bool  replacesParent = false 
)
virtual

Notified whenever a new element of the given type is created in the given grid.

Creation callbacks are called in the order in which the GridObservers were registered at the given grid.

If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.

Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).

Reimplemented from ug::GridObserver.

References handle_created_element().

◆ vertex_to_be_erased()

void ug::DistributedGridManager::vertex_to_be_erased ( Grid grid,
Vertex vrt,
Vertex replacedBy = NULL 
)
virtual

Notified whenever an element of the given type is erased from the given grid.

Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.

if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).

Reimplemented from ug::GridObserver.

References element_to_be_erased().

◆ volume_created()

void ug::DistributedGridManager::volume_created ( Grid grid,
Volume vol,
GridObject pParent = NULL,
bool  replacesParent = false 
)
virtual

Notified whenever a new element of the given type is created in the given grid.

Creation callbacks are called in the order in which the GridObservers were registered at the given grid.

If replacesParent is true, then pParent is of the same base type as the created object (e.g. in case of edge_created, the parent is an Edge*). This case usually appears, when a contraining object is replaced by a regular grid object if the same base type during refinement. The method is called with replacesParent == true by Grid::create_and_replace methods.

Please note: If replacesParent == true, then a call to OBJECT_to_be_erased(grid, pParent, obj) will follow (OBJECT and obj are pseudonyms for the concrete type).

Reimplemented from ug::GridObserver.

References handle_created_element().

◆ volume_to_be_erased()

void ug::DistributedGridManager::volume_to_be_erased ( Grid grid,
Volume vol,
Volume replacedBy = NULL 
)
virtual

Notified whenever an element of the given type is erased from the given grid.

Erase callbacks are called in reverse order in which the GridObservers were registered at the given grid.

if replacedBy != NULL the erased object is only replaced by another grid object of the same base type. This usually happens when constraining objects are replaced by regular objects in refinements. (E.g. a constraining edge by become a regular Edge; note that both objects are of type Edge*).

Reimplemented from ug::GridObserver.

References element_to_be_erased().

Member Data Documentation

◆ m_aaElemInfoEDGE

Grid::EdgeAttachmentAccessor<AElemInfoEdge> ug::DistributedGridManager::m_aaElemInfoEDGE
protected

Referenced by elem_info(), and set_grid().

◆ m_aaElemInfoFACE

Grid::FaceAttachmentAccessor<AElemInfoFace> ug::DistributedGridManager::m_aaElemInfoFACE
protected

Referenced by elem_info(), and set_grid().

◆ m_aaElemInfoVOL

Grid::VolumeAttachmentAccessor<AElemInfoVol> ug::DistributedGridManager::m_aaElemInfoVOL
protected

Referenced by elem_info(), and set_grid().

◆ m_aaElemInfoVRT

Grid::VertexAttachmentAccessor<AElemInfoVrt> ug::DistributedGridManager::m_aaElemInfoVRT
protected

Referenced by elem_info(), and set_grid().

◆ m_aElemInfoEdge

AElemInfoEdge ug::DistributedGridManager::m_aElemInfoEdge
protected

◆ m_aElemInfoFace

AElemInfoFace ug::DistributedGridManager::m_aElemInfoFace
protected

◆ m_aElemInfoVol

AElemInfoVol ug::DistributedGridManager::m_aElemInfoVol
protected

◆ m_aElemInfoVrt

AElemInfoVrt ug::DistributedGridManager::m_aElemInfoVrt
protected

◆ m_bElementDeletionMode

◆ m_bOrderedInsertionMode

bool ug::DistributedGridManager::m_bOrderedInsertionMode
protected

◆ m_edgeMap

ScheduledElemMap ug::DistributedGridManager::m_edgeMap
protected

holds all elements that were scheduled by edges

Referenced by clear_scheduled_elements(), end_ordered_element_insertion(), and handle_created_element().

◆ m_faceMap

ScheduledElemMap ug::DistributedGridManager::m_faceMap
protected

holds all elements that were scheduled by faces

Referenced by clear_scheduled_elements(), end_ordered_element_insertion(), and handle_created_element().

◆ m_gridLayoutMap

GridLayoutMap ug::DistributedGridManager::m_gridLayoutMap
protected

◆ m_interfaceManagementEnabled

bool ug::DistributedGridManager::m_interfaceManagementEnabled
protected

◆ m_newConstrainedVerticalEdges

std::vector<Edge*> ug::DistributedGridManager::m_newConstrainedVerticalEdges
protected

◆ m_newConstrainedVerticalFaces

std::vector<Face*> ug::DistributedGridManager::m_newConstrainedVerticalFaces
protected

◆ m_newConstrainedVerticalVrts

std::vector<Vertex*> ug::DistributedGridManager::m_newConstrainedVerticalVrts
protected

◆ m_pGrid

◆ m_spDistroAdjuster

SmartPtr<DistroAdjuster> ug::DistributedGridManager::m_spDistroAdjuster
protected

◆ m_volMap

ScheduledElemMap ug::DistributedGridManager::m_volMap
protected

holds all elements that were scheduled by volumes

Referenced by clear_scheduled_elements(), end_ordered_element_insertion(), and handle_created_element().

◆ m_vrtMap

ScheduledElemMap ug::DistributedGridManager::m_vrtMap
protected

holds all elements that were scheduled by vertices

Referenced by clear_scheduled_elements(), end_ordered_element_insertion(), and handle_created_element().


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