Arcane  v3.16.0.0
Documentation développeur
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/*---------------------------------------------------------------------------*/
32class ARCANE_CORE_EXPORT NodesOfItemReorderer
33{
34 public:
35
36 NodesOfItemReorderer() = default;
37 explicit NodesOfItemReorderer(ItemTypeMng* itm)
38 : m_item_type_mng(itm)
39 {}
40
41 public:
42
43 void setItemTypeMng(ItemTypeMng* itm) { m_item_type_mng = itm; }
44
45 public:
46
47 bool reorder(ItemTypeId type_id, ConstArrayView<Int64> nodes_uids);
48 bool reorder1D(Int32 face_index, Int64 node_uid)
49 {
50 m_work_sorted_nodes.resize(1);
51 m_work_sorted_nodes[0] = node_uid;
52 return (face_index == 1);
53 }
54 ConstArrayView<Int64> sortedNodes() const { return m_work_sorted_nodes; }
55
56 private:
57
58 ItemTypeMng* m_item_type_mng = nullptr;
59 SmallArray<Int64, 16> m_work_sorted_nodes;
60};
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65} // End namespace Arcane
66
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
69
70#endif
Déclarations de types sur les entités.
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.