This page groups the modifications related to managing entity connectivities across different versions of Arcane.
Version 3.7 of Arcane introduces several modifications to how mesh entities are managed. These modifications aim to:
To meet these objectives, the following modifications were made:
With these modifications, it will eventually be possible to completely eliminate the use of Arcane::ItemInternal.
However, this class is often used in code, so this change must be gradual. Notably, the method Arcane::IItemFamily::itemsInternal() is used to retrieve an instance of Arcane::Item from an Arcane::ItemInternalArrayView (which is the type returned by this method).
To prepare for this and keep the code compatible, a new class Arcane::ItemInfoListView (and entity-specific derived classes like Arcane::CellInfoListView, Arcane::DoFInfoListView) allows retrieving information about entities for which Arcane::IItemFamily::itemsInternal() was previously used.
It is possible to modify the current code as follows:
This code should be replaced by this:
Later, if the unique instance of Arcane::ItemSharedInfo per family is created in unified memory, it will be possible to access entity information on the accelerator.
Arcane frequently uses lists of Arcane::ItemLocalId to manage mesh entities, which can be converted into lists of Arcane::Int32. This is used in the following cases, for example:
For these two cases, the internal structure is managed in the same way (via an instance of Arcane::ItemVectorView), and Arcane internally maintains objects of type Arcane::Int32ConstArrayView that can be accessed directly by the developer (for example, via Arcane::ItemVectorView::localIds()).
To more efficiently manage connectivities, especially in the Cartesian case, and reduce memory footprint, it is necessary to evolve how these localId() lists are stored. To enable these evolutions, two things must be modified in Arcane:
This involves changing certain mechanisms for accessing this information, which are detailed below.
This means that the methods for accessing connectivities and those for accessing group entities do not return the same type of object. In version 3.9 of Arcane, the connectivity access methods were therefore modified and now return an instance of Arcane::ItemConnectedListViewT instead of an instance of Arcane::ItemVectorViewT.
There is currently a conversion operator between Arcane::ItemConnectedListViewT and Arcane::ItemVectorViewT to make the code compatible with existing usage.
This also impacts macros such as ENUMERATE_(), ENUMERATE_CELL() or ENUMERATE_NODE(), which are now reserved for iterations over Arcane::ItemGroup or Arcane::ItemVector. Currently, there are several ways to iterate over entities in another connectivity. For example:
Mechanism (3) should be preferred. Eventually, mechanism (1) will disappear because the Arcane::ItemEnumerator type will be reserved for iterations over groups. Mechanism (2) might continue to be available but will be less performant than mechanism (3).
To also avoid any risk of future incompatibility, it is preferable not to directly use the returned iterator types but to use the auto keyword instead.
To hide these structures, Arcane classes that manage entity lists will no longer return types such as Arcane::Int32ConstArrayView. For example, methods such as Arcane::ItemVectorView::localIds() or Arcane::ItemIndexArrayView::localIds() will disappear. To be compatible with existing usage, the methods Arcane::ItemVectorView::fillLocalIds() and Arcane::ItemIndexArrayView::fillLocalIds() have been added to allow filling an array with the list of localIds().