14#include "arcane/mesh/ItemInternalMap.h"
16#include "arcane/utils/Iterator.h"
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/NotSupportedException.h"
20#include "arcane/core/Item.h"
22#include <unordered_set>
46 std::unordered_set<Int64> uids;
49 if (uids.find(uid) != uids.end())
55 Int64 nb_item = m_new_impl.size();
58 for (
auto& x : m_new_impl) {
59 items[index] = x.second;
63 for (index = 0; index < nb_item; ++index) {
65 m_new_impl.insert(std::make_pair(item->
uniqueId(), item));
80 for (
auto& iter : m_new_impl) {
83 ItemInternal* new_ii = items_internal[old_to_new_local_ids[current_local_id]];
97 for (
auto& x : m_new_impl) {
98 if (x.first != x.second->uniqueId())
99 ARCANE_FATAL(
"Incoherent uid key={0} item_internal={1}", x.first, x.second->uniqueId());
106void ItemInternalMap::
107_throwNotFound(Int64 key)
const
115void ItemInternalMap::
116_throwNotSupported(
const char* func_name)
const
124void ItemInternalMap::
125_checkValid(
Int64 uid, ItemInternal* v)
const
127 if (v->uniqueId() != uid)
128 ARCANE_FATAL(
"Bad found uniqueId found={0} expected={1}", v->uniqueId(), uid);
#define ARCANE_THROW(exception_class,...)
Macro for throwing an exception with formatting.
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Modifiable view of an array of type T.
Constant view of an array of type T.
ItemUniqueId uniqueId() const
Unique number of the entity.
Int32 localId() const
Local number (in the subdomain) of the entity.
Internal structure of a mesh entity.
Base class for a mesh element.
ItemUniqueId uniqueId() const
Unique identifier across all domains.
1D data vector with value semantics (STL style).
void notifyUniqueIdsChanged()
Notifies that the unique IDs of the entities have changed.
void eachItem(const Lambda &lambda)
Template function to iterate over the instance's entities.
void _changeLocalIds(ArrayView< ItemInternal * > items_internal, ConstArrayView< Int32 > old_to_new_local_ids)
Changes the values of localId().
bool arcaneIsCheck()
True if running in check mode.
std::int64_t Int64
Signed integer type of 64 bits.
std::int32_t Int32
Signed integer type of 32 bits.