14#include "arcane/core/ItemGroup.h"
16#include "arcane/utils/String.h"
17#include "arcane/utils/ArgumentException.h"
19#include "arcane/core/IItemFamily.h"
20#include "arcane/core/IMesh.h"
21#include "arcane/core/ICaseMng.h"
22#include "arcane/core/CaseOptionBase.h"
23#include "arcane/core/ICaseOptionList.h"
24#include "arcane/core/MeshHandle.h"
25#include "arcane/core/internal/ItemGroupInternal.h"
131 std::cerr <<
"Creating group with null pointer is not allowed\n";
132 m_impl = ItemGroupImpl::checkSharedNull();
186 m_impl->checkNeedUpdate();
199 m_impl->checkNeedUpdate();
213 m_impl->checkNeedUpdate();
226 m_impl->checkNeedUpdate();
238 m_impl->checkNeedUpdate();
250 m_impl->checkNeedUpdate();
262 m_impl->checkNeedUpdate();
274 m_impl->checkNeedUpdate();
286 m_impl->checkNeedUpdate();
301 m_impl->checkNeedUpdate();
313 m_impl->checkNeedUpdate();
325 m_impl->checkNeedUpdate();
337 m_impl->checkNeedUpdate();
348 m_impl->checkNeedUpdate();
360 m_impl->checkNeedUpdate();
375 m_impl->checkNeedUpdate();
387 m_impl->checkNeedUpdate();
402 m_impl->checkNeedUpdate();
445 m_impl->_checkNeedUpdateNoPadding();
446 m_impl->addItems(items_local_id, check_if_present);
468 m_impl->_checkNeedUpdateNoPadding();
469 m_impl->removeItems(items_local_id, check_if_present);
488 m_impl->setItems(items_local_id);
509 m_impl->setItems(items_local_id, do_sort);
532 m_impl->checkNeedUpdate();
533 m_impl->applyOperation(operation);
544 m_impl->_checkNeedUpdateNoPadding();
556 m_impl->_checkNeedUpdateWithPadding();
564_view(
bool do_padding)
const
568 m_impl->_checkNeedUpdate(do_padding);
570 if (
m_impl->isContiguousLocalIds())
571 flags |= ItemIndexArrayView::F_Contigous;
609 return m_impl->isAllItems();
618 return m_impl->synchronizer();
627 return m_impl->hasComputeFunctor();
636 return m_impl->hasSynchronizer();
645 return m_impl->_internalApi();
654 m_impl->_checkNeedUpdate(
false);
655 return m_impl->checkIsSorted();
664 m_impl->m_p->updateTimestamp();
670extern ARCANE_CORE_EXPORT
bool
674 obj =
mesh->findGroup(name);
678extern ARCANE_CORE_EXPORT
bool
679_caseOptionConvert(
const CaseOptionBase& co,
const String& name,
NodeGroup& obj)
681 IMesh* mesh = co.parentOptionList()->meshHandle().mesh();
686extern ARCANE_CORE_EXPORT
bool
689 IMesh*
mesh = co.parentOptionList()->meshHandle().mesh();
690 obj =
mesh->edgeFamily()->findGroup(name);
694extern ARCANE_CORE_EXPORT
bool
697 IMesh*
mesh = co.parentOptionList()->meshHandle().mesh();
698 obj =
mesh->faceFamily()->findGroup(name);
702extern ARCANE_CORE_EXPORT
bool
705 IMesh*
mesh = co.parentOptionList()->meshHandle().mesh();
706 obj =
mesh->cellFamily()->findGroup(name);
Exception when an argument is invalid.
Base class for a data set option.
ICaseOptionList * parentOptionList() const
Parent OptionList.
virtual MeshHandle meshHandle() const =0
Handle of the associated mesh.
Interface of an entity family.
virtual ItemGroup findGroup(const String &name) const =0
Searches for a group.
Interface of an operator on entities sorted by type.
virtual IItemFamily * nodeFamily()=0
Returns the node family.
Interface of a variable synchronization service.
Functor for calculating elements of a group.
Internal API of ItemGroupImpl in Arcane.
Brief: Implementation of a mesh entity group.
ItemEnumerator enumerator() const
Enumerator over the group entities.
bool checkIsSorted() const
Checks and returns whether the group is sorted by increasing uniqueId().
void clear()
Clears the entities of the group.
ItemGroup findSubGroup(const String &suffix) const
Access to a subgroup.
ItemGroup createSubGroup(const String &suffix, IItemFamily *family, ItemGroupComputeFunctor *functor) const
Creates a computed subgroup.
IVariableSynchronizer * synchronizer() const
Group synchronizer.
NodeGroup nodeGroup() const
Group of nodes of the elements of this group.
bool isAutoComputed() const
True if it is an automatically computed group.
FaceGroup faceGroup() const
Group of faces of the elements of this group.
void incrementTimestamp() const
Increments the last modification time of the group.
bool isOwn() const
Returns whether the group contains only elements belonging to the subdomain.
void removeItems(Int32ConstArrayView items_local_id, bool check_if_present=true)
Removes entities.
FaceGroup activeFaceGroup() const
Group of active faces.
FaceGroup innerActiveFaceGroup() const
Group of internal faces of the elements of this group.
ItemVectorView view() const
View of the group entities.
void setItems(Int32ConstArrayView items_local_id)
Sets the entities of the group.
FaceGroup ownActiveFaceGroup() const
Group of active faces belonging to the domain of the elements of this group.
CellGroup cellGroup() const
Group of cells of the elements of this group.
void applyOperation(IItemOperationByBasicType *operation) const
Applies the operation operation to the entities of the group.
AutoRefT< ItemGroupImpl > m_impl
Internal representation of the group.
CellGroup levelCellGroup(const Integer &level) const
Group of level l cells of the elements of this group.
void addItems(Int32ConstArrayView items_local_id, bool check_if_present=true)
Adds entities.
FaceGroup innerFaceGroup() const
Group of internal faces of the elements of this group.
ItemGroupImplInternal * _internalApi() const
Internal Arcane API.
ItemEnumerator _simdEnumerator() const
Enumerator over the group entities for vectorization.
ItemVectorView _paddedView() const
View of the group entities with padding for vectorization.
bool hasSynchronizer() const
Indicates if the group has an active synchronizer.
bool isAllItems() const
Indicates if the group is that of all entities.
ItemVectorView _unpaddedView() const
View of the group entities without padding for vectorization.
EdgeGroup edgeGroup() const
Group of edges of the elements of this group.
CellGroup ownActiveCellGroup() const
Group of own active cells of the elements of this group.
void checkValid()
Internal check of group validity.
bool null() const
true means the group is the null group
void setOwn(bool v)
Sets whether the group property is local or not.
CellGroup ownLevelCellGroup(const Integer &level) const
Group of own level l cells of the elements of this group.
ItemGroup()
Constructs a null group.
FaceGroup outerActiveFaceGroup() const
Group of active external faces of the elements of this group.
ItemGroup own() const
Group equivalent to this one but containing only the local elements of the subdomain.
CellGroup activeCellGroup() const
AMR.
FaceGroup outerFaceGroup() const
Group of external faces of the elements of this group.
View over an index array (localIds()) of entities.
View on a vector of entities.
IMesh * mesh() const
Associated mesh.
Unicode character string.
ItemGroupT< Cell > CellGroup
Group of cells.
ItemGroupT< Face > FaceGroup
Group of faces.
ItemGroupT< Edge > EdgeGroup
Group of edges.
ItemGroupT< Node > NodeGroup
Group of nodes.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
std::int32_t Int32
Signed integer type of 32 bits.