Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Item.cc
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/* Item.cc (C) 2000-2024 */
9/* */
10/* Classe de base d'un élément du maillage. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/core/Item.h"
15
16#include "arcane/utils/Iostream.h"
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/NotSupportedException.h"
19#include "arcane/utils/ITraceMng.h"
20
21#include "arcane/core/ItemCompare.h"
22#include "arcane/core/ItemPrinter.h"
23#include "arcane/core/MeshItemInternalList.h"
24#include "arcane/core/IndexedItemConnectivityView.h"
26
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
32namespace Arcane
33{
34
35std::atomic<int> Item::m_nb_created_from_internal = 0;
36std::atomic<int> Item::m_nb_created_from_internalptr = 0;
37std::atomic<int> Item::m_nb_set_from_internal = 0;
38
39/*---------------------------------------------------------------------------*/
40/*---------------------------------------------------------------------------*/
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48// Voir Item.h et ItemSharedInfo.h pour les #ifdef associés
49
51typeName(Integer t)
52{
53 return ItemTypeMng::_legacyTypeName(t);
54}
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64void Item::
65_badConversion() const
66{
67#ifdef ARCANE_DEBUG
68 ARCANE_FATAL("Bad conversion from {0}",kind());
69#else /* ARCANE_DEBUG */
70 ARCANE_FATAL("Bad conversion");
71#endif /* ARCANE_DEBUG */
72}
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80void IndexedItemConnectivityViewBase::
81_badConversion(eItemKind k1,eItemKind k2) const
82{
83 ARCANE_FATAL("Can not convert connectivity view ({0},{1}) to ({2},{3})",
84 m_source_kind,m_target_kind,k1,k2);
85}
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90void Item::
91dumpStats(ITraceMng* tm)
92{
93 tm->info() << "ItemStats: nb_created_from_internal = " << m_nb_created_from_internal;
94 tm->info() << "ItemStats: nb_created_from_internalptr = " << m_nb_created_from_internalptr;
95 tm->info() << "ItemStats: nb_set_from_internal = " << m_nb_set_from_internal;
96}
97
98/*---------------------------------------------------------------------------*/
99/*---------------------------------------------------------------------------*/
100
101void Item::
102resetStats()
103{
104 m_nb_created_from_internal = 0;
105 m_nb_created_from_internalptr = 0;
106 m_nb_set_from_internal = 0;
107}
108
109
110/*---------------------------------------------------------------------------*/
111/*---------------------------------------------------------------------------*/
112
113// Pour tester l'instantiation de ces classes
114template class ItemConnectedListViewT<Node>;
115template class ItemConnectedEnumeratorBaseT<Node>;
116template class ItemConnectedEnumeratorT<Node>;
117template class ItemConnectedEnumeratorT<Item>;
118
119/*---------------------------------------------------------------------------*/
120/*---------------------------------------------------------------------------*/
121
122} // End namesapce Arcane
123
124/*---------------------------------------------------------------------------*/
125/*---------------------------------------------------------------------------*/
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Types et macros pour itérer sur les entités du maillage connectées à une autre entité.
Types et macros pour itérer sur les entités du maillage.
Structure interne d'une entité de maillage.
static ItemInternal nullItemInternal
Entité nulle.
static String typeName(Int32 type)
Nom du type de maille cell_type.
Definition Item.cc:51
eItemKind kind() const
Genre de l'entité
Definition Item.h:241
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Chaîne de caractères unicode.
TraceMessage info() const
Flot pour un message d'information.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
eItemKind
Genre d'entité de maillage.