14#include "arcane/utils/NotSupportedException.h"
15#include "arcane/utils/FatalErrorException.h"
17#include "arcane/core/IItemFamily.h"
18#include "arcane/core/Item.h"
19#include "arcane/core/ItemInfoListView.h"
21#include "arcane/mesh/AbstractItemFamilyTopologyModifier.h"
32AbstractItemFamilyTopologyModifier::
33AbstractItemFamilyTopologyModifier(IItemFamily* afamily)
34: TraceAccessor(afamily->traceMng())
54inline Integer AbstractItemFamilyTopologyModifier::
57 for (
Integer i = 0; i < nb_item; ++i)
58 if (items[i] == local_id)
60 ARCANE_FATAL(
"Can not find item to replace local_id={0}", local_id);
66inline Integer AbstractItemFamilyTopologyModifier::
75void AbstractItemFamilyTopologyModifier::
85void AbstractItemFamilyTopologyModifier::
88 ARCANE_UNUSED(item_lid);
90 ARCANE_UNUSED(new_node_lid);
97void AbstractItemFamilyTopologyModifier::
100 ARCANE_UNUSED(item_lid);
101 ARCANE_UNUSED(index);
102 ARCANE_UNUSED(new_edge_lid);
103 _throwNotSupported();
109void AbstractItemFamilyTopologyModifier::
112 ARCANE_UNUSED(item_lid);
113 ARCANE_UNUSED(index);
114 ARCANE_UNUSED(new_face_lid);
115 _throwNotSupported();
121void AbstractItemFamilyTopologyModifier::
124 ARCANE_UNUSED(item_lid);
125 ARCANE_UNUSED(index);
126 ARCANE_UNUSED(new_cell_lid);
127 _throwNotSupported();
133void AbstractItemFamilyTopologyModifier::
136 ARCANE_UNUSED(item_lid);
137 ARCANE_UNUSED(index);
138 ARCANE_UNUSED(new_hparent_lid);
139 _throwNotSupported();
145void AbstractItemFamilyTopologyModifier::
148 ARCANE_UNUSED(item_lid);
149 ARCANE_UNUSED(index);
150 ARCANE_UNUSED(new_hchild_lid);
151 _throwNotSupported();
157void AbstractItemFamilyTopologyModifier::
161 impl::ItemBase ii = m_family->itemInfoListView()[item_lid].itemBase();
169void AbstractItemFamilyTopologyModifier::
173 impl::ItemBase ii = m_family->itemInfoListView()[item_lid].itemBase();
181void AbstractItemFamilyTopologyModifier::
185 impl::ItemBase ii = m_family->itemInfoListView()[item_lid].itemBase();
193void AbstractItemFamilyTopologyModifier::
197 impl::ItemBase ii = m_family->itemInfoListView()[item_lid].itemBase();
#define ARCANE_THROW(exception_class,...)
Macro for throwing an exception with formatting.
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
constexpr const_pointer data() const noexcept
Pointer to the allocated memory.
const String & name() const
Name of the exception.
Interface of an entity family.
ItemLocalId itemLocalId() const
Local number (in the subdomain) of the entity.
impl::ItemIndexedListView< DynExtent > nodeList() const
Methods using the new connectivities to access connectivity information. Should not be used outside o...
Index of an Item in a variable.
View on a vector of entities.
Int32 size() const
Number of elements in the vector.
Int32ConstArrayView localIds() const
Array of local IDs of entities.
Exception when an operation is not supported.
void replaceNode(ItemLocalId item_lid, Integer index, ItemLocalId new_node_lid) override
Replaces a node of an entity.
Int32 _getItemIndex(const Int32 *items, Integer nb_item, Int32 local_id)
Searches for the index of the entity with localid() local_id in the list items.
void replaceEdge(ItemLocalId item_lid, Integer index, ItemLocalId new_edge_lid) override
Replaces an edge of an entity.
void replaceCell(ItemLocalId item_lid, Integer index, ItemLocalId new_cell_lid) override
Replaces a cell of an entity.
void replaceFace(ItemLocalId item_lid, Integer index, ItemLocalId new_face_lid) override
Replaces a face of an entity.
Int32 Integer
Type representing an integer.
std::int32_t Int32
Signed integer type of 32 bits.