Arcane  v3.16.0.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
NodesOfItemReorderer.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* NodesOfItemReorderer.h (C) 2000-2025 */
9/* */
10/* Classe utilitaire pour réordonner les noeuds d'une entité. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_NODESOFITEMREORDERER_H
13#define ARCANE_CORE_NODESOFITEMREORDERER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/SmallArray.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25class ItemTypeMng;
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29/*!
30 * \brief Classe utilitaire pour réordonner les noeuds d'une entité.
31 */
32class ARCANE_CORE_EXPORT NodesOfItemReorderer
33{
34 friend class NodesOfItemReordererTester;
35
36 public:
37
38 NodesOfItemReorderer() = default;
39 explicit NodesOfItemReorderer(ItemTypeMng* itm)
40 : m_item_type_mng(itm)
41 {}
42
43 public:
44
45 void setItemTypeMng(ItemTypeMng* itm) { m_item_type_mng = itm; }
46
47 public:
48
49 bool reorder(ItemTypeId type_id, ConstArrayView<Int64> nodes_uids);
50 bool reorder1D(Int32 face_index, Int64 node_uid)
51 {
52 m_work_sorted_nodes.resize(1);
53 m_work_sorted_nodes[0] = node_uid;
54 return (face_index == 1);
55 }
56 ConstArrayView<Int64> sortedNodes() const { return m_work_sorted_nodes; }
57
58 private:
59
60 static bool _reorderOrder2(ConstArrayView<Int64> nodes_uids,
61 ArrayView<Int64> sorted_nodes_uids);
62
63 private:
64
65 ItemTypeMng* m_item_type_mng = nullptr;
66 SmallArray<Int64, 16> m_work_sorted_nodes;
67};
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72} // End namespace Arcane
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76
77#endif
Déclarations de types sur les entités.
Vue modifiable d'un tableau d'un type T.
Vue constante d'un tableau de type T.
Type d'une entité (Item).
Definition ItemTypeId.h:32
Gestionnaire des types d'entités de maillage.
Definition ItemTypeMng.h:66
Tableau 1D de données avec buffer pré-alloué sur la pile.
Definition SmallArray.h:89
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int64_t Int64
Type entier signé sur 64 bits.
std::int32_t Int32
Type entier signé sur 32 bits.