Brief: Implementation of a mesh entity group. More...
#include <arcane/core/ItemGroupImpl.h>
Classes | |
| class | ItemSorter |
Public Member Functions | |
| ItemGroupImpl () | |
| Constructs a null group. | |
| ItemGroupImpl (IItemFamily *family, const String &name) | |
| Brief: Constructs a group. Constructs an empty group named name, associated with the family family. | |
| ItemGroupImpl (IItemFamily *family, ItemGroupImpl *parent, const String &name) | |
| Brief: Constructs a child group of another group. Constructs a group named name which is a child of group parent. The type of this group is the same as that of the family it belongs to. | |
| virtual | ~ItemGroupImpl () |
| Releases resources. | |
| virtual ISharedReference & | sharedReference () |
| const String & | name () const |
| Group name. | |
| const String & | fullName () const |
| Full group name (with mesh + family). | |
| virtual Integer | nbRef () const |
| Number of references on the group. | |
| ItemGroupImpl * | parent () const |
| Parent group (0 if none). | |
| bool | null () const |
| Returns true if the group is null. | |
| bool | isOwn () const |
| Returns whether the group contains only elements specific to the subdomain. | |
| void | setOwn (bool v) |
| Sets whether the group property is local or not. | |
| ItemGroupImpl * | ownGroup () |
| Group of entities owned by the entities of this group. | |
| ItemGroupImpl * | ghostGroup () |
| Items in the group not owned by the subdomain. | |
| ItemGroupImpl * | interfaceGroup () |
| ItemGroupImpl * | nodeGroup () |
| Group of nodes of the elements of this group. | |
| ItemGroupImpl * | edgeGroup () |
| Group of edges of the elements of this group. | |
| ItemGroupImpl * | faceGroup () |
| Group of faces of the elements of this group. | |
| ItemGroupImpl * | cellGroup () |
| Group of cells of the elements of this group. | |
| ItemGroupImpl * | createSubGroup (const String &suffix, IItemFamily *family, ItemGroupComputeFunctor *functor) |
| Creates a calculated subgroup. | |
| ItemGroupImpl * | findSubGroup (const String &suffix) |
| Accesses a calculated subgroup. | |
| ItemGroupImpl * | innerFaceGroup () |
| Brief: Group of internal faces of the elements of this group. | |
| ItemGroupImpl * | outerFaceGroup () |
| Brief: Group of external faces of the elements of this group. | |
| ItemGroupImpl * | activeCellGroup () |
| AMR. | |
| ItemGroupImpl * | ownActiveCellGroup () |
| Brief: Group of own active cells of this group. | |
| ItemGroupImpl * | levelCellGroup (const Integer &level) |
| Brief: Group of active cells of this group. | |
| ItemGroupImpl * | ownLevelCellGroup (const Integer &level) |
| Brief: Group of own active cells of this group. | |
| ItemGroupImpl * | activeFaceGroup () |
| Brief: Group of domain-specific active faces. | |
| ItemGroupImpl * | ownActiveFaceGroup () |
| Brief: Group of active external faces of the elements of this group. | |
| ItemGroupImpl * | innerActiveFaceGroup () |
| Brief: Group of active internal faces of the elements of this group. | |
| ItemGroupImpl * | outerActiveFaceGroup () |
| Brief: Group of active external faces of the elements of this group. | |
| bool | isLocalToSubDomain () const |
| AMR OFF. | |
| void | setLocalToSubDomain (bool v) |
| Sets the boolean indicating if the group is local to the subdomain. | |
| IMesh * | mesh () const |
| Mesh to which the group belongs (0 for the null group). | |
| eItemKind | itemKind () const |
| Type of the group. It is the type of its elements. | |
| IItemFamily * | itemFamily () const |
| Family to which the group belongs (or 0 if none). | |
| Integer | size () const |
| Number of entities in the group. | |
| bool | empty () const |
| True if the group is empty. | |
| void | clear () |
| Removes the entities from the group. | |
| ItemGroup | parentGroup () |
| Parent group. | |
| void | invalidate (bool force_recompute) |
| Invalidates the group. | |
| void | addItems (Int32ConstArrayView items_local_id, bool check_if_present) |
| Adds entities with local IDs items_local_id. | |
| void | setItems (Int32ConstArrayView items_local_id) |
| Positions the group entities at items_local_id. | |
| void | setItems (Int32ConstArrayView items_local_id, bool do_sort) |
| Positions the group entities at items_local_id, optionally sorting them. | |
| void | removeItems (Int32ConstArrayView items_local_id, bool check_if_present) |
| Removes the entities items_local_id from the group. | |
| void | removeAddItems (Int32ConstArrayView removed_local_id, Int32ConstArrayView added_local_id, bool check_if_present) |
| Removes and adds the entities removed_local_id and added_local_id from the group. | |
| void | removeSuppressedItems () |
| Removes entities from the group whose isSuppressed() flag is true. | |
| void | checkValid () |
| Checks that the group is valid. | |
| bool | checkNeedUpdate () |
| Updates the group if necessary. | |
| Int32ConstArrayView | itemsLocalId () const |
| List of local IDs of the entities in this group. | |
| void | beginTransaction () |
| Starts a transaction. | |
| void | endTransaction () |
| Ends a transaction. | |
| ItemInternalList | itemsInternal () const |
| List of entities that the group relies on. | |
| ItemInfoListView | itemInfoListView () const |
| List of entities that the group relies on. | |
| void | setIsAllItems () |
| Indicates to this group that it is the group of all entities in the family. | |
| bool | isAllItems () const |
| Indicates if the group is the group of all entities. | |
| void | changeIds (Int32ConstArrayView old_to_new_ids) |
| Changes the indices of the group entities. | |
| void | applyOperation (IItemOperationByBasicType *operation) |
| Applies the operation operation to the group entities. | |
| bool | needSynchronization () const |
| Indicates if the group structurally needs parallel synchronization. | |
| Int64 | timestamp () const |
| Returns the group's timestamp. This time is incremented after every modification. | |
| void | attachObserver (const void *ref, IItemGroupObserver *obs) |
| Attaches an observer. | |
| void | detachObserver (const void *ref) |
| Detaches an observer. | |
| bool | hasInfoObserver () const |
| Indicates if the content of this group is observed. | |
| void | setComputeFunctor (IFunctor *functor) |
| Defines a group calculation function. | |
| bool | hasComputeFunctor () const |
| Indicates if the group is calculated. | |
| void | destroy () |
| Destroys the group. After this call, the group becomes a null group. | |
| SharedPtrT< GroupIndexTable > | localIdToIndex () |
| Table of local IDs to a position for all entities in the group. | |
| IVariableSynchronizer * | synchronizer () |
| Group synchronizer. | |
| bool | hasSynchronizer () |
| Indicates if this group has a synchronizer. | |
| bool | checkIsSorted () const |
| Checks and returns whether the group is sorted by increasing uniqueId(). | |
| bool | isContigousLocalIds () const |
| bool | isContiguousLocalIds () const |
| Indicates if the group entities have contiguous localIds(). | |
| void | checkLocalIdsAreContigous () const |
| void | checkLocalIdsAreContiguous () const |
| Checks if the group entities have contiguous localIds(). | |
| void | shrinkMemory () |
| Limits the maximum memory used by the group. | |
| Int64 | capacity () const |
| Number of allocated elements. | |
| ItemGroupImplInternal * | _internalApi () const |
| Internal Arcane API. | |
| Int32Array & | unguardedItemsLocalId (const bool self_invalidate=true) |
| List of local IDs of the entities in this group. | |
| Public Member Functions inherited from Arcane::SharedReference | |
| void | addRef () override |
| Increments the reference counter. | |
| void | removeRef () override |
| Decrements the reference counter. | |
| Int32 | refCount () const override |
| Returns the value of the reference counter. | |
| Public Member Functions inherited from Arcane::ISharedReference | |
| virtual | ~ISharedReference ()=default |
| Releases resources. | |
Static Public Member Functions | |
| static ItemGroupImpl * | checkSharedNull () |
| static void | _buildSharedNull () |
| Internal. | |
| static void | _destroySharedNull () |
| Internal. | |
Private Member Functions | |
| void | _computeChildrenByType () |
| Method for calculating sub-groups by type. | |
| void | _executeExtend (const Int32ConstArrayView *info) |
| Sub-group invalidation. | |
| void | _executeReduce (const Int32ConstArrayView *info) |
| Sub-group invalidation. | |
| void | _executeCompact (const Int32ConstArrayView *info) |
| Sub-group invalidation. | |
| void | _executeReorder (const Int32ConstArrayView *info) |
| Sub-group invalidation. | |
| void | _executeInvalidate () |
| Sub-group invalidation. | |
| void | _updateNeedInfoFlag (const bool flag) |
| Forced update of the restructuring information flag. | |
| void | _forceInvalidate (const bool self_invalidate) |
| Recursive forced invalidation. | |
| void | _checkUpdateSimdPadding () |
| virtual void | deleteMe () |
| Notification from SharedReference indicating that the instance must be destroyed. | |
| void | _removeItems (SmallSpan< const Int32 > items_local_id) |
| Removes the entities items_local_id from the group. | |
| bool | _checkNeedUpdateNoPadding () |
| bool | _checkNeedUpdateWithPadding () |
| bool | _checkNeedUpdate (bool do_padding) |
Private Attributes | |
| friend | ItemGroup |
| ItemGroupInternal * | m_p = nullptr |
| Group implementation. | |
Static Private Attributes | |
| static ItemGroupImpl * | shared_null = nullptr |
Friends | |
| class | ItemGroupSubPartsByType |
Brief: Implementation of a mesh entity group.
A group is a set of mesh entities (nodes, faces, cells, etc.) of the same type.
An instance of this class should not be used directly, but through an instance of ItemGroup.
An element entity can only be present once.
The developer should not directly keep instances of this class but go through an ItemGroup. Since some groups are determined dynamically based on the content of another group (for example, the groups of entities specific to subdomains are calculated from the group of all entities of the subdomain), this ensures that group updates are performed correctly.
This instance is managed by a reference counter and is destroyed automatically when it reaches zero.
Definition at line 72 of file ItemGroupImpl.h.
| Arcane::ItemGroupImpl::ItemGroupImpl | ( | ) |
Constructs a null group.
Definition at line 146 of file ItemGroupImpl.cc.
References m_p.
Referenced by _updateNeedInfoFlag(), activeCellGroup(), activeFaceGroup(), cellGroup(), createSubGroup(), edgeGroup(), faceGroup(), findSubGroup(), ghostGroup(), innerActiveFaceGroup(), innerFaceGroup(), ItemGroupImpl(), levelCellGroup(), nodeGroup(), outerActiveFaceGroup(), outerFaceGroup(), ownActiveCellGroup(), ownActiveFaceGroup(), ownGroup(), ownLevelCellGroup(), and parent().
| Arcane::ItemGroupImpl::ItemGroupImpl | ( | IItemFamily * | family, |
| const String & | name ) |
Brief: Constructs a group. Constructs an empty group named name, associated with the family family.
Definition at line 126 of file ItemGroupImpl.cc.
| Arcane::ItemGroupImpl::ItemGroupImpl | ( | IItemFamily * | family, |
| ItemGroupImpl * | parent, | ||
| const String & | name ) |
Brief: Constructs a child group of another group. Constructs a group named name which is a child of group parent. The type of this group is the same as that of the family it belongs to.
Definition at line 136 of file ItemGroupImpl.cc.
References ItemGroupImpl(), m_p, name(), and parent().
|
virtual |
|
static |
Definition at line 1650 of file ItemGroupImpl.cc.
Referenced by Arcane::ArcaneMain::arcaneInitialize().
|
private |
Definition at line 1125 of file ItemGroupImpl.cc.
|
private |
Definition at line 1162 of file ItemGroupImpl.cc.
|
private |
Definition at line 1171 of file ItemGroupImpl.cc.
|
private |
Definition at line 1189 of file ItemGroupImpl.cc.
|
private |
Method for calculating sub-groups by type.
Definition at line 1413 of file ItemGroupImpl.cc.
References m_p.
|
static |
Definition at line 1662 of file ItemGroupImpl.cc.
Referenced by Arcane::ArcaneMain::arcaneFinalize().
|
private |
Sub-group invalidation.
Definition at line 1481 of file ItemGroupImpl.cc.
References m_p.
Referenced by _updateNeedInfoFlag().
|
private |
Sub-group invalidation.
Definition at line 1457 of file ItemGroupImpl.cc.
References m_p.
Referenced by _updateNeedInfoFlag().
|
private |
Sub-group invalidation.
Definition at line 1493 of file ItemGroupImpl.cc.
References m_p.
Referenced by _executeReorder(), _updateNeedInfoFlag(), and createSubGroup().
|
private |
Sub-group invalidation.
Definition at line 1469 of file ItemGroupImpl.cc.
References m_p.
Referenced by _updateNeedInfoFlag().
|
private |
Recursive forced invalidation.
Does not notify observers. Must be followed by a normal invalidate()
Definition at line 1525 of file ItemGroupImpl.cc.
References m_p.
Referenced by _executeReorder(), and unguardedItemsLocalId().
| ItemGroupImplInternal * Arcane::ItemGroupImpl::_internalApi | ( | ) | const |
|
private |
Forced update of the restructuring information flag.
Definition at line 1503 of file ItemGroupImpl.cc.
References _executeCompact(), _executeExtend(), _executeInvalidate(), _executeReduce(), ItemGroupImpl(), m_p, Arcane::newItemGroupObserverT(), and parent().
Referenced by _executeReorder(), attachObserver(), and detachObserver().
| ItemGroupImpl * Arcane::ItemGroupImpl::activeCellGroup | ( | ) |
AMR.
Brief: Group of active cells of this group.
An active cell is a leaf cell in the AMR tree.
Definition at line 485 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::activeFaceGroup | ( | ) |
Brief: Group of domain-specific active faces.
This group only exists for a cell group (itemKind()==IK_Cell). An active face is internal if it is connected to two active cells of this group.
Definition at line 558 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| void Arcane::ItemGroupImpl::addItems | ( | Int32ConstArrayView | items_local_id, |
| bool | check_if_present ) |
Adds entities with local IDs items_local_id.
Definition at line 771 of file ItemGroupImpl.cc.
References Arcane::Array< T >::add(), ARCANE_FATAL, Arcane::arcaneIsCheck(), Arcane::MemoryUtils::checkResizeArrayWithCapacity(), checkValid(), Arcane::MemoryUtils::copy(), Arcane::Array< T >::fill(), Arcane::ITraceMng::info(), isAllItems(), m_p, mesh(), name(), Arcane::AbstractArray< T >::size(), Arcane::ConstArrayView< T >::size(), Arcane::Array< T >::subView(), Arcane::IMeshBase::traceMng(), and Arcane::Array< T >::unguardedBasePointer().
Referenced by removeAddItems().
| void Arcane::ItemGroupImpl::applyOperation | ( | IItemOperationByBasicType * | operation | ) |
Applies the operation operation to the group entities.
Definition at line 1226 of file ItemGroupImpl.cc.
References m_p.
| void Arcane::ItemGroupImpl::attachObserver | ( | const void * | ref, |
| IItemGroupObserver * | obs ) |
Attaches an observer.
| ref | reference of the observer emitter |
| obs | Observer |
Definition at line 1332 of file ItemGroupImpl.cc.
References _updateNeedInfoFlag(), m_p, and Arcane::IItemGroupObserver::needInfo().
Referenced by createSubGroup(), and Arcane::AnyItem::FamilyInternal::operator<<().
| void Arcane::ItemGroupImpl::beginTransaction | ( | ) |
Starts a transaction.
A transaction allows write access to protected groups. Using this mechanism indicates to Arcane that the user is aware that they are modifying a group 'at their own risk'.
Definition at line 210 of file ItemGroupImpl.cc.
References ARCANE_FATAL, and m_p.
| Int64 Arcane::ItemGroupImpl::capacity | ( | ) | const |
Number of allocated elements.
Definition at line 1692 of file ItemGroupImpl.cc.
References Arcane::AbstractArray< T >::capacity(), and m_p.
Referenced by Arcane::MeshUtils::printMeshGroupsMemoryUsage().
| ItemGroupImpl * Arcane::ItemGroupImpl::cellGroup | ( | ) |
Group of cells of the elements of this group.
Definition at line 432 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| void Arcane::ItemGroupImpl::changeIds | ( | Int32ConstArrayView | old_to_new_ids | ) |
Changes the indices of the group entities.
Definition at line 664 of file ItemGroupImpl.cc.
References checkNeedUpdate(), Arcane::ITraceMng::debug(), Arcane::Trace::High, isAllItems(), m_p, name(), and Arcane::ArrayView< T >::size().
Referenced by Arcane::mesh::ItemFamily::compactVariablesAndGroups().
| bool Arcane::ItemGroupImpl::checkIsSorted | ( | ) | const |
Checks and returns whether the group is sorted by increasing uniqueId().
Definition at line 1607 of file ItemGroupImpl.cc.
References m_p, null(), and Arcane::ConstArrayView< T >::size().
|
inline |
Definition at line 419 of file ItemGroupImpl.h.
References checkLocalIdsAreContiguous().
| void Arcane::ItemGroupImpl::checkLocalIdsAreContiguous | ( | ) | const |
Checks if the group entities have contiguous localIds().
If so, isContiguousLocalIds() will return true.
Definition at line 1683 of file ItemGroupImpl.cc.
References m_p.
Referenced by checkLocalIdsAreContigous().
| bool Arcane::ItemGroupImpl::checkNeedUpdate | ( | ) |
Updates the group if necessary.
A group must be updated when it becomes invalid, for example after calling invalidate().
| true | if the group was updated, |
| false | otherwise. |
Definition at line 1180 of file ItemGroupImpl.cc.
Referenced by changeIds(), and invalidate().
|
static |
Definition at line 112 of file ItemGroupImpl.cc.
| void Arcane::ItemGroupImpl::checkValid | ( | ) |
Checks that the group is valid.
Definition at line 1116 of file ItemGroupImpl.cc.
References m_p.
Referenced by addItems(), removeAddItems(), removeSuppressedItems(), and setItems().
| void Arcane::ItemGroupImpl::clear | ( | ) |
Removes the entities from the group.
Definition at line 1198 of file ItemGroupImpl.cc.
References Arcane::Array< T >::clear(), Arcane::AbstractArray< T >::empty(), and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::createSubGroup | ( | const String & | suffix, |
| IItemFamily * | family, | ||
| ItemGroupComputeFunctor * | functor ) |
Creates a calculated subgroup.
The memory management of the functor is then delegated to the group
Definition at line 624 of file ItemGroupImpl.cc.
References _executeInvalidate(), ARCANE_FATAL, attachObserver(), Arcane::IItemFamily::createGroup(), Arcane::ItemGroup::internal(), invalidate(), ItemGroupImpl(), m_p, name(), Arcane::newItemGroupObserverT(), and setComputeFunctor().
Referenced by activeCellGroup(), activeFaceGroup(), cellGroup(), edgeGroup(), faceGroup(), ghostGroup(), innerActiveFaceGroup(), innerFaceGroup(), levelCellGroup(), nodeGroup(), outerActiveFaceGroup(), outerFaceGroup(), ownActiveCellGroup(), ownActiveFaceGroup(), ownGroup(), and ownLevelCellGroup().
|
privatevirtual |
Notification from SharedReference indicating that the instance must be destroyed.
Implements Arcane::SharedReference.
Definition at line 1636 of file ItemGroupImpl.cc.
Referenced by _executeReorder().
| void Arcane::ItemGroupImpl::destroy | ( | ) |
Destroys the group. After this call, the group becomes a null group.
Definition at line 1542 of file ItemGroupImpl.cc.
References detachObserver(), and m_p.
Referenced by Arcane::mesh::ItemFamily::destroyGroups().
| void Arcane::ItemGroupImpl::detachObserver | ( | const void * | ref | ) |
Detaches an observer.
| ref | reference of the observer emitter |
Definition at line 1353 of file ItemGroupImpl.cc.
References _updateNeedInfoFlag(), m_p, and Arcane::IItemGroupObserver::needInfo().
Referenced by destroy(), and Arcane::VariableMng::removeVariable().
| ItemGroupImpl * Arcane::ItemGroupImpl::edgeGroup | ( | ) |
Group of edges of the elements of this group.
Definition at line 400 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Edge, ItemGroupImpl(), itemKind(), and m_p.
| bool Arcane::ItemGroupImpl::empty | ( | ) | const |
| void Arcane::ItemGroupImpl::endTransaction | ( | ) |
Ends a transaction.
Definition at line 221 of file ItemGroupImpl.cc.
References ARCANE_FATAL, and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::faceGroup | ( | ) |
Group of faces of the elements of this group.
Definition at line 416 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Face, ItemGroupImpl(), itemKind(), and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::findSubGroup | ( | const String & | suffix | ) |
Accesses a calculated subgroup.
The memory management of the functor is then delegated to the group
Definition at line 647 of file ItemGroupImpl.cc.
References ItemGroupImpl(), m_p, and name().
| const String & Arcane::ItemGroupImpl::fullName | ( | ) | const |
Full group name (with mesh + family).
Definition at line 174 of file ItemGroupImpl.cc.
References m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::ghostGroup | ( | ) |
Items in the group not owned by the subdomain.
Definition at line 354 of file ItemGroupImpl.cc.
References createSubGroup(), ItemGroupImpl(), and m_p.
| bool Arcane::ItemGroupImpl::hasComputeFunctor | ( | ) | const |
Indicates if the group is calculated.
Definition at line 1404 of file ItemGroupImpl.cc.
References m_p.
Referenced by Arcane::mesh::ItemFamily::notifyItemsOwnerChanged(), Arcane::mesh::ItemFamily::prepareForDump(), Arcane::MeshUtils::printMeshGroupsMemoryUsage(), and shrinkMemory().
| bool Arcane::ItemGroupImpl::hasInfoObserver | ( | ) | const |
Indicates if the content of this group is observed.
This has the effect of enabling incremental modification mechanisms.
A group may only be observed for its structure by non-incrementally recalculated objects.
Definition at line 1385 of file ItemGroupImpl.cc.
References m_p.
Referenced by Arcane::mesh::ItemGroupsSynchronize::synchronize().
| bool Arcane::ItemGroupImpl::hasSynchronizer | ( | ) |
Indicates if this group has a synchronizer.
Definition at line 1598 of file ItemGroupImpl.cc.
References m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::innerActiveFaceGroup | ( | ) |
Brief: Group of active internal faces of the elements of this group.
This group only exists for a cell group (itemKind()==IK_Cell). An active face is internal if it is connected to two active cells of this group.
Definition at line 591 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::innerFaceGroup | ( | ) |
Brief: Group of internal faces of the elements of this group.
This group only exists for a cell group (itemKind()==IK_Cell). A face is internal if it is connected to two cells of this group.
Definition at line 448 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::interfaceGroup | ( | ) |
Definition at line 368 of file ItemGroupImpl.cc.
| void Arcane::ItemGroupImpl::invalidate | ( | bool | force_recompute | ) |
Invalidates the group.
A very aggressive operation that causes the invalidation of all dependencies, both of observers and constructed sub-groups.
Definition at line 714 of file ItemGroupImpl.cc.
References checkNeedUpdate(), Arcane::ITraceMng::debug(), Arcane::Trace::High, m_p, and name().
Referenced by createSubGroup(), and shrinkMemory().
| bool Arcane::ItemGroupImpl::isAllItems | ( | ) | const |
Indicates if the group is the group of all entities.
Definition at line 1007 of file ItemGroupImpl.cc.
References m_p.
Referenced by addItems(), changeIds(), removeAddItems(), and setOwn().
|
inline |
Definition at line 413 of file ItemGroupImpl.h.
References isContigousLocalIds(), and isContiguousLocalIds().
Referenced by isContigousLocalIds().
| bool Arcane::ItemGroupImpl::isContiguousLocalIds | ( | ) | const |
Indicates if the group entities have contiguous localIds().
Definition at line 1674 of file ItemGroupImpl.cc.
References m_p.
Referenced by isContigousLocalIds().
| bool Arcane::ItemGroupImpl::isLocalToSubDomain | ( | ) | const |
AMR OFF.
True if the group is local to the subdomain.
Definition at line 753 of file ItemGroupImpl.cc.
References m_p.
| bool Arcane::ItemGroupImpl::isOwn | ( | ) | const |
Returns whether the group contains only elements specific to the subdomain.
Definition at line 290 of file ItemGroupImpl.cc.
References m_p.
Referenced by removeAddItems().
| IItemFamily * Arcane::ItemGroupImpl::itemFamily | ( | ) | const |
Family to which the group belongs (or 0 if none).
Definition at line 272 of file ItemGroupImpl.cc.
References m_p.
Referenced by setItems().
| ItemInfoListView Arcane::ItemGroupImpl::itemInfoListView | ( | ) | const |
List of entities that the group relies on.
Definition at line 744 of file ItemGroupImpl.cc.
References m_p.
Referenced by setItems().
| eItemKind Arcane::ItemGroupImpl::itemKind | ( | ) | const |
Type of the group. It is the type of its elements.
Definition at line 323 of file ItemGroupImpl.cc.
References m_p.
Referenced by Arcane::ItemGroup::_check(), activeCellGroup(), activeFaceGroup(), cellGroup(), edgeGroup(), faceGroup(), innerActiveFaceGroup(), innerFaceGroup(), levelCellGroup(), nodeGroup(), outerActiveFaceGroup(), outerFaceGroup(), ownActiveCellGroup(), ownActiveFaceGroup(), and ownLevelCellGroup().
| ItemInternalList Arcane::ItemGroupImpl::itemsInternal | ( | ) | const |
List of entities that the group relies on.
Definition at line 735 of file ItemGroupImpl.cc.
References m_p.
Referenced by removeAddItems().
| Int32ConstArrayView Arcane::ItemGroupImpl::itemsLocalId | ( | ) | const |
List of local IDs of the entities in this group.
Definition at line 201 of file ItemGroupImpl.cc.
References m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::levelCellGroup | ( | const Integer & | level | ) |
Brief: Group of active cells of this group.
An active cell is a leaf cell in the AMR tree.
Definition at line 521 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| SharedPtrT< GroupIndexTable > Arcane::ItemGroupImpl::localIdToIndex | ( | ) |
Table of local IDs to a position for all entities in the group.
Definition at line 1566 of file ItemGroupImpl.cc.
References Arcane::ITraceMng::debug(), Arcane::Trace::High, and m_p.
| IMesh * Arcane::ItemGroupImpl::mesh | ( | ) | const |
Mesh to which the group belongs (0 for the null group).
Definition at line 263 of file ItemGroupImpl.cc.
References m_p.
Referenced by addItems(), and removeAddItems().
| const String & Arcane::ItemGroupImpl::name | ( | ) | const |
Group name.
Definition at line 165 of file ItemGroupImpl.cc.
References m_p.
Referenced by Arcane::Numerics::GeometryServiceBase::_checkItemGroupProperty(), addItems(), changeIds(), createSubGroup(), findSubGroup(), invalidate(), ItemGroupImpl(), ItemGroupImpl(), removeAddItems(), removeSuppressedItems(), setItems(), and unguardedItemsLocalId().
|
inlinevirtual |
Number of references on the group.
Definition at line 120 of file ItemGroupImpl.h.
References Arcane::SharedReference::refCount().
Referenced by Arcane::MeshUtils::printMeshGroupsMemoryUsage().
| bool Arcane::ItemGroupImpl::needSynchronization | ( | ) | const |
Indicates if the group structurally needs parallel synchronization.
Definition at line 1312 of file ItemGroupImpl.cc.
References m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::nodeGroup | ( | ) |
Group of nodes of the elements of this group.
Definition at line 384 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Node, ItemGroupImpl(), itemKind(), and m_p.
| bool Arcane::ItemGroupImpl::null | ( | ) | const |
Returns true if the group is null.
Definition at line 281 of file ItemGroupImpl.cc.
References m_p.
Referenced by checkIsSorted().
| ItemGroupImpl * Arcane::ItemGroupImpl::outerActiveFaceGroup | ( | ) |
Brief: Group of active external faces of the elements of this group.
This group only exists for a cell group (itemKind()==IK_Cell). An active face is external if it is connected to only one cell of this group and is active.
Definition at line 608 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::outerFaceGroup | ( | ) |
Brief: Group of external faces of the elements of this group.
This group only exists for a cell group (itemKind()==IK_Cell). A face is external if it is connected to only one cell of this group.
Definition at line 465 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::ownActiveCellGroup | ( | ) |
Brief: Group of own active cells of this group.
Definition at line 503 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), m_p, and setOwn().
| ItemGroupImpl * Arcane::ItemGroupImpl::ownActiveFaceGroup | ( | ) |
Brief: Group of active external faces of the elements of this group.
This group only exists for a cell group (itemKind()==IK_Cell). An active face is external if it is connected to only one cell of this group and is active.
Definition at line 575 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), and m_p.
| ItemGroupImpl * Arcane::ItemGroupImpl::ownGroup | ( | ) |
Group of entities owned by the entities of this group.
Definition at line 332 of file ItemGroupImpl.cc.
References createSubGroup(), ItemGroupImpl(), m_p, and setOwn().
| ItemGroupImpl * Arcane::ItemGroupImpl::ownLevelCellGroup | ( | const Integer & | level | ) |
Brief: Group of own active cells of this group.
Definition at line 539 of file ItemGroupImpl.cc.
References createSubGroup(), Arcane::IK_Cell, ItemGroupImpl(), itemKind(), m_p, and setOwn().
| ItemGroupImpl * Arcane::ItemGroupImpl::parent | ( | ) | const |
Parent group (0 if none).
Definition at line 254 of file ItemGroupImpl.cc.
References ItemGroupImpl(), and m_p.
Referenced by _updateNeedInfoFlag(), and ItemGroupImpl().
| ItemGroup Arcane::ItemGroupImpl::parentGroup | ( | ) |
Parent group.
Definition at line 1215 of file ItemGroupImpl.cc.
References m_p.
Referenced by Arcane::mesh::ItemFamily::createGroup().
| void Arcane::ItemGroupImpl::removeAddItems | ( | Int32ConstArrayView | removed_local_id, |
| Int32ConstArrayView | added_local_id, | ||
| bool | check_if_present ) |
Removes and adds the entities removed_local_id and added_local_id from the group.
Definition at line 856 of file ItemGroupImpl.cc.
References addItems(), ARCANE_FATAL, ARCANE_THROW, Arcane::arcaneIsCheck(), checkValid(), Arcane::ITraceMng::info(), isAllItems(), isOwn(), Arcane::ItemBase::isSuppressed(), itemsInternal(), Arcane::ItemBase::localId(), m_p, mesh(), Arcane::IMesh::meshPartInfo(), name(), removeItems(), Arcane::Array< T >::resize(), Arcane::ConstArrayView< T >::size(), size(), and Arcane::IMeshBase::traceMng().
| void Arcane::ItemGroupImpl::removeItems | ( | Int32ConstArrayView | items_local_id, |
| bool | check_if_present ) |
Removes the entities items_local_id from the group.
Definition at line 847 of file ItemGroupImpl.cc.
References m_p.
Referenced by removeAddItems().
| void Arcane::ItemGroupImpl::removeSuppressedItems | ( | ) |
Removes entities from the group whose isSuppressed() flag is true.
Definition at line 1040 of file ItemGroupImpl.cc.
References Arcane::Array< T >::add(), Arcane::arcaneIsCheck(), checkValid(), Arcane::ITraceMng::debug(), Arcane::ITraceMng::fatal(), Arcane::Trace::High, m_p, name(), Arcane::Array< T >::reserve(), Arcane::Array< T >::resize(), Arcane::AbstractArray< T >::size(), Arcane::ConstArrayView< T >::size(), and Arcane::Array< T >::unguardedBasePointer().
| void Arcane::ItemGroupImpl::setComputeFunctor | ( | IFunctor * | functor | ) |
Defines a group calculation function.
Definition at line 1394 of file ItemGroupImpl.cc.
References m_p.
Referenced by createSubGroup().
| void Arcane::ItemGroupImpl::setIsAllItems | ( | ) |
Indicates to this group that it is the group of all entities in the family.
Definition at line 998 of file ItemGroupImpl.cc.
References m_p.
| void Arcane::ItemGroupImpl::setItems | ( | Int32ConstArrayView | items_local_id | ) |
Positions the group entities at items_local_id.
Definition at line 927 of file ItemGroupImpl.cc.
References ARCANE_FATAL, Arcane::arcaneIsCheck(), checkValid(), Arcane::ArrayView< T >::copy(), Arcane::ITraceMng::debug(), Arcane::Trace::High, m_p, name(), Arcane::Array< T >::resize(), Arcane::ConstArrayView< T >::size(), and size().
Referenced by setItems().
| void Arcane::ItemGroupImpl::setItems | ( | Int32ConstArrayView | items_local_id, |
| bool | do_sort ) |
Positions the group entities at items_local_id, optionally sorting them.
Definition at line 982 of file ItemGroupImpl.cc.
References itemFamily(), itemInfoListView(), and setItems().
| void Arcane::ItemGroupImpl::setLocalToSubDomain | ( | bool | v | ) |
Sets the boolean indicating if the group is local to the subdomain.
Definition at line 762 of file ItemGroupImpl.cc.
References m_p.
| void Arcane::ItemGroupImpl::setOwn | ( | bool | v | ) |
Sets whether the group property is local or not.
Definition at line 299 of file ItemGroupImpl.cc.
References ARCANE_THROW, isAllItems(), and m_p.
Referenced by ownActiveCellGroup(), ownGroup(), and ownLevelCellGroup().
|
inlinevirtual |
Definition at line 109 of file ItemGroupImpl.h.
| void Arcane::ItemGroupImpl::shrinkMemory | ( | ) |
Limits the maximum memory used by the group.
If the group is a calculated group, it is invalidated and all its allocated memory is released.
If the group is a user-created group (i.e., persistent), it ensures that the consumed memory is minimal. Normally, Arcane allocates a few more elements than necessary to avoid frequent reallocations.
Definition at line 1702 of file ItemGroupImpl.cc.
References hasComputeFunctor(), invalidate(), and m_p.
| Integer Arcane::ItemGroupImpl::size | ( | ) | const |
Number of entities in the group.
Definition at line 183 of file ItemGroupImpl.cc.
References m_p.
Referenced by Arcane::MeshUtils::printMeshGroupsMemoryUsage(), removeAddItems(), and setItems().
| IVariableSynchronizer * Arcane::ItemGroupImpl::synchronizer | ( | ) |
Group synchronizer.
Definition at line 1581 of file ItemGroupImpl.cc.
References Arcane::ParallelMngUtils::createSynchronizerRef(), Arcane::ITraceMng::debug(), Arcane::Trace::High, and m_p.
| Int64 Arcane::ItemGroupImpl::timestamp | ( | ) | const |
Returns the group's timestamp. This time is incremented after every modification.
Definition at line 1323 of file ItemGroupImpl.cc.
References m_p.
| Int32Array & Arcane::ItemGroupImpl::unguardedItemsLocalId | ( | const bool | self_invalidate = true | ) |
List of local IDs of the entities in this group.
Definition at line 237 of file ItemGroupImpl.cc.
References _forceInvalidate(), ARCANE_FATAL, Arcane::ITraceMng::debug(), m_p, Arcane::Trace::Medium, and name().
|
friend |
Definition at line 77 of file ItemGroupImpl.h.
|
private |
Definition at line 78 of file ItemGroupImpl.h.
|
private |
Group implementation.
Definition at line 490 of file ItemGroupImpl.h.
Referenced by _computeChildrenByType(), _executeCompact(), _executeExtend(), _executeInvalidate(), _executeReduce(), _forceInvalidate(), _internalApi(), _updateNeedInfoFlag(), activeCellGroup(), activeFaceGroup(), addItems(), applyOperation(), attachObserver(), beginTransaction(), capacity(), cellGroup(), changeIds(), checkIsSorted(), checkLocalIdsAreContiguous(), checkValid(), clear(), createSubGroup(), destroy(), detachObserver(), edgeGroup(), empty(), endTransaction(), faceGroup(), findSubGroup(), fullName(), ghostGroup(), hasComputeFunctor(), hasInfoObserver(), hasSynchronizer(), innerActiveFaceGroup(), innerFaceGroup(), invalidate(), isAllItems(), isContiguousLocalIds(), isLocalToSubDomain(), isOwn(), itemFamily(), ItemGroupImpl(), ItemGroupImpl(), ItemGroupImpl(), itemInfoListView(), itemKind(), itemsInternal(), itemsLocalId(), levelCellGroup(), localIdToIndex(), mesh(), name(), needSynchronization(), nodeGroup(), null(), outerActiveFaceGroup(), outerFaceGroup(), ownActiveCellGroup(), ownActiveFaceGroup(), ownGroup(), ownLevelCellGroup(), parent(), parentGroup(), removeAddItems(), removeItems(), removeSuppressedItems(), setComputeFunctor(), setIsAllItems(), setItems(), setLocalToSubDomain(), setOwn(), shrinkMemory(), size(), synchronizer(), timestamp(), unguardedItemsLocalId(), and ~ItemGroupImpl().
|
staticprivate |
Definition at line 101 of file ItemGroupImpl.h.