Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::GhostLayerFromConnectivityComputer Class Reference

Tool for calculating the ghost layer of a family based on connectivity. More...

#include <arcane/mesh/GhostLayerFromConnectivityComputer.h>

Inheritance diagram for Arcane::GhostLayerFromConnectivityComputer:
Collaboration diagram for Arcane::GhostLayerFromConnectivityComputer:

Public Member Functions

 GhostLayerFromConnectivityComputer (IItemConnectivity *item_to_dofs)
virtual ~GhostLayerFromConnectivityComputer ()
Int32ConstArrayView communicatingRanks ()
 Interface IItemConnectivityGhostPolicy.
Int32ConstArrayView sharedItems (const Integer rank, const String &family_name)
 gives the local_ids of the items of the family family_name shared for the connectivity with the rank process rank.
Int32ConstArrayView sharedItemsConnectedItems (const Integer rank, const String &family_name)
 gives the local_ids of the items of the family family_name connected with the sharedItems(rank).
void updateConnectivity (Int32ConstArrayView ghost_items, Int64ConstArrayView ghost_items_connected_items)
 updates the connectivity by connecting the added ghost items.
Public Member Functions inherited from Arcane::IItemConnectivityGhostPolicy
virtual ~IItemConnectivityGhostPolicy ()

Protected Attributes

IItemConnectivitym_connectivity
ITraceMngm_trace_mng
SharedArray< Int32SharedArraym_shared_items
SharedArray< Int32SharedArraym_shared_items_connected_items

Private Member Functions

void _computeSharedItems ()

Detailed Description

Tool for calculating the ghost layer of a family based on connectivity.

Implements the IConnectivityGhostPolicy interface.

This implementation defines a policy where items in the "To" family are defined as shared if they are connected to shared items in the "From" family.

These shared items (with the rank k process) from the "To" family are obtained via sharedItems(k, ToFamilyName). The items in the "From" family to which they are connected are obtained via sharedItemsConnectedItems(k, FromFamilyName).

The calculation of these shared items is done during object construction and upon every call to the sharedItems() method, to account for a possible evolution of the "From" family. Therefore, be careful: if the family has evolved, sharedItems() must be called before sharedItemsConnectedItems().

Definition at line 52 of file GhostLayerFromConnectivityComputer.h.

Constructor & Destructor Documentation

◆ GhostLayerFromConnectivityComputer() [1/2]

Arcane::GhostLayerFromConnectivityComputer::GhostLayerFromConnectivityComputer ( IItemConnectivity * item_to_dofs)

Class constructor

Definition at line 27 of file GhostLayerFromConnectivityComputer.cc.

◆ GhostLayerFromConnectivityComputer() [2/2]

Arcane::GhostLayerFromConnectivityComputer::GhostLayerFromConnectivityComputer ( )
inline

Definition at line 60 of file GhostLayerFromConnectivityComputer.h.

◆ ~GhostLayerFromConnectivityComputer()

virtual Arcane::GhostLayerFromConnectivityComputer::~GhostLayerFromConnectivityComputer ( )
inlinevirtual

Class destructor

Definition at line 66 of file GhostLayerFromConnectivityComputer.h.

Member Function Documentation

◆ _computeSharedItems()

void Arcane::GhostLayerFromConnectivityComputer::_computeSharedItems ( )
private

Definition at line 38 of file GhostLayerFromConnectivityComputer.cc.

◆ communicatingRanks()

Arcane::Int32ConstArrayView Arcane::GhostLayerFromConnectivityComputer::communicatingRanks ( )
virtual

◆ sharedItems()

Arcane::Int32ConstArrayView Arcane::GhostLayerFromConnectivityComputer::sharedItems ( const Integer rank,
const String & family_name )
virtual

gives the local_ids of the items of the family family_name shared for the connectivity with the rank process rank.

The items are repeated as many times as they appear in a connectivity. If they are connected to three items, they appear three times. This array constitutes, with the sharedItemsConnectedItems array which is of the same size, a set of connected item pairs (one element of the connection in each array).

Implements Arcane::IItemConnectivityGhostPolicy.

Definition at line 94 of file GhostLayerFromConnectivityComputer.cc.

◆ sharedItemsConnectedItems()

Arcane::Int32ConstArrayView Arcane::GhostLayerFromConnectivityComputer::sharedItemsConnectedItems ( const Integer rank,
const String & family_name )
virtual

gives the local_ids of the items of the family family_name connected with the sharedItems(rank).

The items are repeated as many times as they appear in a connectivity. If they are connected to three items, they appear three times. This array constitutes, with the sharedItems array which is of the same size, a set of connected item pairs (one element of the connection in each array).

Implements Arcane::IItemConnectivityGhostPolicy.

Definition at line 107 of file GhostLayerFromConnectivityComputer.cc.

◆ updateConnectivity()

void Arcane::GhostLayerFromConnectivityComputer::updateConnectivity ( Int32ConstArrayView ghost_items,
Int64ConstArrayView ghost_items_connected_items )
virtual

updates the connectivity by connecting the added ghost items.

The two arrays are of the same size, equal to the number of existing 1-to-1 connections. For each connection, the items are repeated, for example for two connections between identifiers 1-3 and 1-4 the arrays will be [ 1 1 ] and [ 3 4 ]

This format is identical to that of the two arrays shared_items and shared_items_connected_items. Warning, ghost_items_connected_items are unique identifiers (uids). They are the items to which the ghost_items were connected on their owning sub-domain. These items do not necessarily exist on the current sub-domain.

TODO: check if it is necessary to provide the families?

Implements Arcane::IItemConnectivityGhostPolicy.

Definition at line 69 of file GhostLayerFromConnectivityComputer.cc.

References Arcane::ConstArrayView< T >::size().

Here is the call graph for this function:

Member Data Documentation

◆ m_connectivity

IItemConnectivity* Arcane::GhostLayerFromConnectivityComputer::m_connectivity
protected

Definition at line 78 of file GhostLayerFromConnectivityComputer.h.

◆ m_shared_items

SharedArray<Int32SharedArray> Arcane::GhostLayerFromConnectivityComputer::m_shared_items
protected

Definition at line 80 of file GhostLayerFromConnectivityComputer.h.

◆ m_shared_items_connected_items

SharedArray<Int32SharedArray> Arcane::GhostLayerFromConnectivityComputer::m_shared_items_connected_items
protected

Definition at line 81 of file GhostLayerFromConnectivityComputer.h.

◆ m_trace_mng

ITraceMng* Arcane::GhostLayerFromConnectivityComputer::m_trace_mng
protected

Definition at line 79 of file GhostLayerFromConnectivityComputer.h.


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