Arcane  v3.16.0.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ItemFamilyCompactPolicy.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* ItemFamilyCompactPolicy.h (C) 2000-2024 */
9/* */
10/* Politique de compactage des entités d'une famille. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_ITEMFAMILYCOMPACTPOLICY_H
13#define ARCANE_MESH_ITEMFAMILYCOMPACTPOLICY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18#include "arcane/utils/ArrayView.h"
19
20#include "arcane/core/IItemFamilyCompactPolicy.h"
21
22#include "arcane/mesh/ItemFamily.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane::mesh
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33class ItemFamily;
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
43class ARCANE_MESH_EXPORT ItemFamilyCompactPolicy
44: public TraceAccessor
46{
47 public:
48
49 explicit ItemFamilyCompactPolicy(ItemFamily* family);
50
51 public:
52
53 void beginCompact(ItemFamilyCompactInfos& compact_infos) override;
54 void compactVariablesAndGroups(const ItemFamilyCompactInfos& compact_infos) override;
55 void endCompact(ItemFamilyCompactInfos& compact_infos) override;
56 void finalizeCompact(IMeshCompacter* compacter) override
57 {
58 ARCANE_UNUSED(compacter);
59 }
60 IItemFamily* family() const override;
61 void compactConnectivityData() override;
62
63 protected:
64
65 void _changeItem(Int32* items, Integer nb_item, Int32ConstArrayView old_to_new)
66 {
67 for (Integer i = 0; i < nb_item; ++i) {
68 Integer item_local_id = items[i];
69 items[i] = old_to_new[item_local_id];
70 }
71 }
72
73 protected:
74
75 ItemFamily* _family() const { return m_family; }
76
77 private:
78
79 ItemFamily* m_family;
80};
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
87class StandardItemFamilyCompactPolicy
88: public ItemFamilyCompactPolicy
89{
90 public:
91
92 StandardItemFamilyCompactPolicy(ItemFamily* family);
93
94 public:
95
96 void updateInternalReferences(IMeshCompacter* compacter) override;
97
98 public:
99
100 IItemFamily* m_node_family;
101 IItemFamily* m_edge_family;
102 IItemFamily* m_face_family;
103 IItemFamily* m_cell_family;
104};
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
109} // namespace Arcane::mesh
110
111/*---------------------------------------------------------------------------*/
112/*---------------------------------------------------------------------------*/
113
114#endif
Politique de compactage des entités.
Interface d'une famille d'entités.
Definition IItemFamily.h:84
Gestion d'un compactage de familles du maillage.
Informations pour gérer le compactage des entités d'une famille.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
IItemFamily * family() const override
Famille associée.
void compactConnectivityData() override
Compacte les données sur les connectivités.
Famille d'entités.
Definition ItemFamily.h:76
Int32 Integer
Type représentant un entier.
ConstArrayView< Int32 > Int32ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
Definition UtilsTypes.h:569
std::int32_t Int32
Type entier signé sur 32 bits.