12#ifndef ARCANE_CORE_MESHPARTIALVARIABLEARRAYREF_H
13#define ARCANE_CORE_MESHPARTIALVARIABLEARRAYREF_H
17#include "arcane/utils/FatalErrorException.h"
19#include "arcane/core/MeshVariableRef.h"
20#include "arcane/core/PrivateVariableArray.h"
22#include "arcane/core/ItemGroupRangeIterator.h"
23#include "arcane/core/ItemPairEnumerator.h"
24#include "arcane/core/GroupIndexTable.h"
38template<
typename DataTypeT>
40:
public PrivateVariableArrayT<DataTypeT>
44 typedef DataTypeT DataType;
51 typedef PrivateVariableArrayT<DataType> BaseClass;
52 typedef typename BaseClass::PrivatePartType PrivatePartType;
75 ARCANE_CORE_EXPORT
void fill(
const DataType& value);
77 ARCANE_CORE_EXPORT
void internalSetUsed(
bool v);
81 ConstArrayType operator[](
const Item& i)
const
83 ARCANE_CHECK_VALID_ITEM_AND_GROUP_KIND(i);
84 ARCANE_ASSERT((m_table.isUsed()),(
"GroupIndexTable expired"));
86 return this->m_view[table[i.
localId()]];
88 ArrayType operator[](
const Item& i)
90 ARCANE_CHECK_VALID_ITEM_AND_GROUP_KIND(i);
91 ARCANE_ASSERT((m_table.isUsed()),(
"GroupIndexTable expired"));
93 return this->m_view[table[i.
localId()]];
95 ConstArrayType operator[](
const ItemGroupRangeIterator& i)
const
97 ARCANE_CHECK_VALID_ITEM_AND_GROUP_KIND(i);
98 return this->m_view[i.index()];
100 ArrayType operator[](
const ItemGroupRangeIterator& i)
102 ARCANE_CHECK_VALID_ITEM_AND_GROUP_KIND(i);
103 return this->m_view[i.index()];
105 ConstArrayType operator[](
const ItemEnumerator& i)
const
107 ARCANE_CHECK_ENUMERATOR(i,this->itemGroup());
108 return this->m_view[i.index()];
110 ArrayType operator[](
const ItemEnumerator& i)
112 ARCANE_CHECK_ENUMERATOR(i,this->itemGroup());
113 return this->m_view[i.index()];
115 ConstArrayType operator[](ItemEnumeratorIndex i)
const
117 return this->m_view[i.index()];
119 ArrayType operator[](ItemEnumeratorIndex i)
121 return this->m_view[i.index()];
145template<
typename ItemTypeT,
typename DataTypeT>
151 typedef DataTypeT DataType;
152 typedef ItemTypeT ItemType;
179 ConstArrayType operator[](
const ItemType& i)
const
181 ARCANE_ASSERT((this->m_table.isUsed()),(
"GroupIndexTable expired"));
183 return this->m_view[table[i.localId()]];
185 ArrayType operator[](
const ItemType& i)
187 ARCANE_ASSERT((this->m_table.isUsed()),(
"GroupIndexTable expired"));
189 return this->m_view[table[i.localId()]];
191 ConstArrayType operator[](
const ItemGroupRangeIteratorT<ItemType>& i)
const
193 return this->m_view[i.index()];
195 ArrayType operator[](
const ItemGroupRangeIteratorT<ItemType>& i)
197 return this->m_view[i.index()];
199 ConstArrayType operator[](
const ItemPairEnumeratorSubT<ItemType>& i)
const
201 return this->m_view[i.index()];
203 ArrayType operator[](
const ItemPairEnumeratorSubT<ItemType>& i)
205 return this->m_view[i.index()];
207 ConstArrayType operator[](
const ItemEnumeratorT<ItemType>& i)
const
209 ARCANE_CHECK_ENUMERATOR(i,this->
itemGroup());
210 return this->m_view[i.index()];
212 ArrayType operator[](
const ItemEnumeratorT<ItemType>& i)
214 ARCANE_CHECK_ENUMERATOR(i,this->
itemGroup());
215 return this->m_view[i.index()];
217 ConstArrayType operator[](ItemEnumeratorIndexT<ItemType> i)
const
219 return this->m_view[i.index()];
221 ArrayType operator[](ItemEnumeratorIndexT<ItemType> i)
223 return this->m_view[i.index()];
Vue modifiable d'un tableau d'un type T.
Vue constante d'un tableau de type T.
ItemPartialVariableArrayRefT(const VariableBuildInfo &vb, eItemKind ik)
Construit une référence à la variable spécifiée dans vb.
GroupIndexTableView tableView() const
Vue sur table d'indirection du groupe.
void operator=(const ItemPartialVariableArrayRefT< DataType > &rhs)
Opérateur de recopie.
ItemPartialVariableArrayRefT(IVariable *var)
Construit une référence à partir de var.
ItemPartialVariableArrayRefT(const ItemPartialVariableArrayRefT< DataType > &rhs)
Construit une référence à partir de rhs.
Classe de base d'un élément de maillage.
constexpr Int32 localId() const
Identifiant local de l'entité dans le sous-domaine du processeur.
void refersTo(const MeshPartialVariableArrayRefT< ItemType, DataType > &rhs)
Positionne la référence de l'instance à la variable rhs.
MeshPartialVariableArrayRefT(const VariableBuildInfo &vb)
Construit une référence à la variable spécifiée dans vb.
MeshPartialVariableArrayRefT(const MeshPartialVariableArrayRefT< ItemType, DataType > &rhs)
Construit une référence à partir de rhs.
GroupType itemGroup() const
Groupe associé à la grandeur.
Vecteur de données 2D avec sémantique par valeur (style STL).
Paramètres nécessaires à la construction d'une variable.
Infos caractérisant une variable.
Référence à une variable.
Informations caractérisant le type d'une variable.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
eItemKind
Genre d'entité de maillage.