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;
180 ConstArrayType operator[](
const ItemLocalIdType& i)
const
182 ARCANE_ASSERT((this->m_table.isUsed()),(
"GroupIndexTable expired"));
184 return this->m_view[table[i.asInt32()]];
186 ArrayType operator[](
const ItemLocalIdType& i)
188 ARCANE_ASSERT((this->m_table.isUsed()),(
"GroupIndexTable expired"));
190 return this->m_view[table[i.asInt32()]];
192 ConstArrayType operator[](
const ItemGroupRangeIteratorT<ItemType>& i)
const
194 return this->m_view[i.index()];
196 ArrayType operator[](
const ItemGroupRangeIteratorT<ItemType>& i)
198 return this->m_view[i.index()];
200 ConstArrayType operator[](
const ItemPairEnumeratorSubT<ItemType>& i)
const
202 return this->m_view[i.index()];
204 ArrayType operator[](
const ItemPairEnumeratorSubT<ItemType>& i)
206 return this->m_view[i.index()];
208 ConstArrayType operator[](
const ItemEnumeratorT<ItemType>& i)
const
210 ARCANE_CHECK_ENUMERATOR(i,this->
itemGroup());
211 return this->m_view[i.index()];
213 ArrayType operator[](
const ItemEnumeratorT<ItemType>& i)
215 ARCANE_CHECK_ENUMERATOR(i,this->
itemGroup());
216 return this->m_view[i.index()];
218 ConstArrayType operator[](ItemEnumeratorIndexT<ItemType> i)
const
220 return this->m_view[i.index()];
222 ArrayType operator[](ItemEnumeratorIndexT<ItemType> i)
224 return this->m_view[i.index()];
Vue modifiable d'un tableau d'un type T.
Vue constante d'un tableau de type T.
Interface d'une variable.
Index d'une entité ItemType dans une variable.
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.