Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ItemFlags.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/* ItemFlags.h (C) 2000-2024 */
9/* */
10/* Drapeaux contenant les caractéristiques d'une entité. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ITEMFLAGS_H
13#define ARCANE_CORE_ITEMFLAGS_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
30class ARCANE_CORE_EXPORT ItemFlags
31{
32 public:
33
34 using FlagType = Int32;
35
36 public:
37
38 // L'affichage 'lisible' des flags est implémenté dans ItemPrinter
39 // Il doit être updaté si des flags sont ici changés
40
41 enum : FlagType
42 {
43 II_Boundary = 1 << 1,
44 II_HasFrontCell = 1 << 2,
45 II_HasBackCell = 1 << 3,
46 II_FrontCellIsFirst = 1 << 4,
47 II_BackCellIsFirst = 1 << 5,
48 II_Own = 1 << 6,
49 II_Added = 1 << 7,
50 II_Suppressed = 1 << 8,
51 II_Shared = 1 << 9,
52 II_SubDomainBoundary = 1 << 10,
53 //II_JustRemoved = 1 << 11, //!< L'entité vient d'être supprimé
54 II_JustAdded = 1 << 12,
55 II_NeedRemove = 1 << 13,
56 II_SlaveFace = 1 << 14,
57 II_MasterFace = 1 << 15,
58 II_Detached = 1 << 16,
59 II_HasTrace = 1 << 17,
60
61 II_Coarsen = 1 << 18,
62 II_DoNothing = 1 << 19,
63 II_Refine = 1 << 20,
64 II_JustRefined = 1 << 21,
65 II_JustCoarsened = 1 << 22,
66 II_Inactive = 1 << 23,
67 II_CoarsenInactive = 1 << 24,
68
69 II_UserMark1 = 1 << 25,
70 II_UserMark2 = 1 << 26
71 };
72
73 static const int II_InterfaceFlags = II_Boundary + II_HasFrontCell + II_HasBackCell +
74 II_FrontCellIsFirst + II_BackCellIsFirst;
75
76 static constexpr bool isOwn(FlagType f) { return (f & II_Own) != 0; }
77 static constexpr bool isShared(FlagType f) { return (f & II_Shared) != 0; }
78 static constexpr bool isBoundary(FlagType f) { return (f & II_Boundary) != 0; }
79 static constexpr bool isSubDomainBoundary(FlagType f) { return (f & II_Boundary) != 0; }
80 static constexpr bool hasBackCell(FlagType f) { return (f & II_HasBackCell) != 0; }
81 static constexpr bool isSubDomainBoundaryOutside(FlagType f)
82 {
83 return isSubDomainBoundary(f) && hasBackCell(f);
84 }
94 static constexpr Int32 backCellIndex(FlagType f)
95 {
96 if (f & II_HasBackCell)
97 return (f & II_BackCellIsFirst) ? 0 : 1;
98 return -1;
99 }
109 static constexpr Int32 frontCellIndex(FlagType f)
110 {
111 if (f & II_HasFrontCell)
112 return (f & II_FrontCellIsFirst) ? 0 : 1;
113 return -1;
114 }
115};
116
117/*---------------------------------------------------------------------------*/
118/*---------------------------------------------------------------------------*/
119
120} // End namespace Arcane
121
122/*---------------------------------------------------------------------------*/
123/*---------------------------------------------------------------------------*/
124
125#endif
Fichier de configuration d'Arcane.
Flags pour les caractéristiques des entités.
Definition ItemFlags.h:31
static constexpr Int32 backCellIndex(FlagType f)
Index dans la face la maille derrière.
Definition ItemFlags.h:94
static constexpr Int32 frontCellIndex(FlagType f)
Index dans la face la maille devant.
Definition ItemFlags.h:109
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-