Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ItemFamilyCompactInfos.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* ItemFamilyCompactInfos.h (C) 2000-2025 */
9/* */
10/* Information to manage the compaction of entities of a family. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ITEMFAMILYCOMPACTINFOS_H
13#define ARCANE_CORE_ITEMFAMILYCOMPACTINFOS_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Array.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
31class ARCANE_CORE_EXPORT ItemFamilyCompactInfos
32{
33 public:
34
35 ItemFamilyCompactInfos(IMeshCompacter* acompacter, IItemFamily* afamily)
36 : m_compacter(acompacter)
37 , m_family(afamily)
38 {}
39 ~ItemFamilyCompactInfos() = default;
40
41 public:
42
43 IMeshCompacter* compacter() const { return m_compacter; }
44 IItemFamily* family() const { return m_family; }
47 {
48 return m_old_to_new_local_ids;
49 }
50
53 {
54 return m_new_to_old_local_ids;
55 }
56 void setOldToNewLocalIds(UniqueArray<Int32>&& ids)
57 {
58 m_old_to_new_local_ids = ids;
59 }
60 void setNewToOldLocalIds(UniqueArray<Int32>&& ids)
61 {
62 m_new_to_old_local_ids = ids;
63 }
64 void clear()
65 {
66 m_old_to_new_local_ids.clear();
67 m_new_to_old_local_ids.clear();
68 }
69
70 private:
71
72 IMeshCompacter* m_compacter = nullptr;
73 IItemFamily* m_family = nullptr;
74 UniqueArray<Int32> m_old_to_new_local_ids;
75 UniqueArray<Int32> m_new_to_old_local_ids;
76};
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81} // namespace Arcane
82
83/*---------------------------------------------------------------------------*/
84/*---------------------------------------------------------------------------*/
85
86#endif
Interface of an entity family.
Definition IItemFamily.h:83
Management of mesh family compaction.
Int32ConstArrayView newToOldLocalIds() const
Conversion between new and old local IDs.
Int32ConstArrayView oldToNewLocalIds() const
Conversion between old and new local IDs.
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482