14#include "arcane/core/ItemInternal.h"
16#include "arcane/utils/NotImplementedException.h"
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/Iostream.h"
19#include "arcane/utils/TraceInfo.h"
20#include "arcane/utils/CheckedConvert.h"
22#include "arcane/core/IItemFamily.h"
23#include "arcane/core/IItemFamilyTopologyModifier.h"
24#include "arcane/core/ItemPrinter.h"
40void impl::MutableItemBase::
41_checkUniqueId(
Int64 new_uid)
const
44 ARCANE_FATAL(
"Bad unique id - new_uid={0} local_id={1} current={2}",
67 if (m_unique_id>2147483647)
68 ARCANE_FATAL(
"Unique id is too big to be converted to a Int32");
69 return (
Int32)(m_unique_id);
92 return std::min(
nbNode(), nb_linear_node);
102operator<<(std::ostream& o,
const ItemUniqueId&
id)
117 top_it = top_it->_internalHParent(0);
118 ARCANE_ASSERT((!top_it->
null()),(
"topHParent Problem!"));
119 ARCANE_ASSERT((top_it->
level() == 0),(
"topHParent Problem"));
126impl::ItemBase impl::ItemBase::
127topHParentBase()
const
131 top_it = top_it.hParentBase(0);
132 ARCANE_ASSERT((!top_it.
null()),(
"topHParent Problem!"));
133 ARCANE_ASSERT((top_it.
level() == 0),(
"topHParent Problem"));
143 ItemInternal* top_it =
this;
144 while (top_it->nbHParent())
145 top_it = top_it->_internalHParent(0);
146 ARCANE_ASSERT((!top_it->null()),(
"topHParent Problem!"));
147 ARCANE_ASSERT((top_it->level() == 0),(
"topHParent Problem"));
157 ARCANE_ASSERT((this->
hasHChildren()), (
"item has non-child!"));
159 if (this->hChildId(c) == local_id)
170 ARCANE_ASSERT((this->
hasHChildren()), (
"item has non-child!"));
172 if (this->_internalHChild(c) == iitem)
181_internalActiveCells2(
Int32Array& local_ids)
const
184 for(
Integer icell = 0 ; icell < nbcell ; ++icell) {
185 ItemBase cell = this->cellBase(icell);
188 local_ids.
add(local_id);
191 return ItemInternalVectorView(
m_shared_info->m_items->m_cell_shared_info,local_ids,0);
197void impl::MutableItemBase::
198_setFaceInfos(
Int32 mod_flags)
201 face_flags &= ~II_InterfaceFlags;
202 face_flags |= mod_flags;
221 if (front_cell_lid==NULL_ITEM_LOCAL_ID){
224 _setFaceInfos(mod_flags);
226 else if (back_cell_lid==NULL_ITEM_LOCAL_ID){
251bool ItemInternalVectorView::
256 if (!m_local_ids.
empty()){
257 auto* items_data = _items().
data();
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
constexpr const_pointer data() const noexcept
Pointeur sur la mémoire allouée.
constexpr bool empty() const noexcept
true si le tableau est vide (size()==0)
Classe de base pour les entités du maillage.
ItemUniqueId uniqueId() const
Numéro unique de l'entité
Integer nbCell() const
Nombre de mailles connectées à l'entité (pour les noeuds, arêtes et faces)
Int32 m_local_id
Numéro local (au sous-domaine) de l'entité.
Int32 flags() const
Flags de l'entité
ItemTypeInfo * typeInfo() const
Type de l'entité.
Int32 nbHParent() const
Nombre de parents pour l'AMR.
bool hasHChildren() const
Int32 whichChildAmI(Int32 local_id) const
Int32 nbHChildren() const
Nombre d'enfants pour l'AMR.
Integer nbNode() const
Nombre de noeuds de l'entité
ItemSharedInfo * m_shared_info
Infos partagées entre toutes les entités ayant les mêmes caractéristiques.
bool null() const
Vrai si l'entité est l'entité nulle.
Int32 localId() const
Numéro local (au sous-domaine) de l'entité
@ II_FrontCellIsFirst
La première maille de l'entité est la maille devant.
@ II_HasBackCell
L'entité a une maille derrière.
@ II_Boundary
L'entité est sur la frontière.
@ II_HasFrontCell
L'entité a une maille devant.
@ II_BackCellIsFirst
La première maille de l'entité est la maille derrière.
Informations de connectivité, pour une famille d'entité, permettant la transition entre les anciennes...
Vue interne sur un tableau d'entités.
Structure interne d'une entité de maillage.
Int32 whichChildAmI(const ItemInternal *iitem) const
const ItemInternal * topHParent() const
AMR.
static ItemTypeId fromInteger(Int64 v)
Créé une instance à partir d'un entier.
Infos sur un type d'entité du maillage.
Integer nbLocalNode() const
Nombre de noeuds de l'entité
Int16 linearTypeId() const
Type de l'élément linéaire correspondant.
void _setFaceBackAndFrontCells(Int32 back_cell_lid, Int32 front_cell_lid)
Pour une face, positionne à la fois la back cell et la front cell.
void setFlags(Int32 f)
Positionne les flags de l'entité
void unsetUniqueId()
Annule l'uniqueId a la valeur NULL_ITEM_UNIQUE_ID.
std::ostream & operator<<(std::ostream &o, eExecutionPolicy exec_policy)
Affiche le nom de la politique d'exécution.
Int16 toInt16(Int64 v)
Converti un Int64 en un Int16.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
std::int16_t Int16
Type entier signé sur 16 bits.
Array< Int32 > Int32Array
Tableau dynamique à une dimension d'entiers 32 bits.
std::int32_t Int32
Type entier signé sur 32 bits.