14#include "arcane/core/MeshVariableArrayRef.h"
16#include "arcane/utils/ValueConvert.h"
17#include "arcane/utils/FatalErrorException.h"
19#include "arcane/core/ItemGroup.h"
20#include "arcane/core/VariableDataTypeTraits.h"
21#include "arcane/core/VariableTypeInfo.h"
22#include "arcane/core/VariableBuildInfo.h"
23#include "arcane/core/VariableInfo.h"
24#include "arcane/core/VariableFactoryRegisterer.h"
25#include "arcane/core/internal/IDataInternal.h"
40 eDataType dt = VariableDataTypeTraitsT<DataType>::type();
53 return VariableInfo(vbi.name(),vbi.itemFamilyName(),vbi.itemGroupName(),vbi.meshName(),vti,sti);
59template<
class DataType>
62: PrivateVariableArrayT<DataType>(vb,_internalVariableInfo(vb,ik))
65 this->_internalInit();
66 if (this->m_private_part->isPartial())
67 ARCANE_FATAL(
"Can not assign a partial variable to a full variable");
76: PrivateVariableArrayT<DataType>(var)
78 this->_internalInit();
79 if (this->m_private_part->isPartial())
80 ARCANE_FATAL(
"Can not assign a partial variable to a full variable");
88: PrivateVariableArrayT<DataType>(rhs)
90 if (this->m_private_part)
102 BaseClass::operator=(rhs);
103 if (this->m_private_part) {
104 this->m_private_part = rhs.m_private_part;
129 eDataType dt = VariableDataTypeTraitsT<DataType>::type();
136template<
typename ItemType,
typename DataType> VariableInfo
137MeshVariableArrayRefT<ItemType,DataType>::
138_internalVariableInfo(
const VariableBuildInfo& vbi)
140 VariableTypeInfo vti = _internalVariableTypeInfo();
141 DataStorageTypeInfo sti = vti._internalDefaultDataStorage();
142 return VariableInfo(vbi.name(),vbi.itemFamilyName(),vbi.itemGroupName(),vbi.meshName(),vti,sti);
153 return new ThatClass(vb);
159template<
class ItemType,
class DataType>
174template<
class ItemType,
class DataType>
189template<
class ItemType,
class DataType>
204template<
class ItemType,
class DataType>
218template<
class ItemType,
class DataType>
219typename Arcane::MeshVariableArrayRefT<ItemType, DataType>::GroupType
223 return GroupType(this->m_private_part->itemGroup());
229template<
class DataType>
231fill(
const DataType& v)
233 this->
fill(v,this->itemGroup());
239template<
class DataType>
251template<
typename DataType>
255 this->
copy(v,this->itemGroup());
261template<
typename DataType>
273template<
typename DataTypeT>
void
281 impl::copyContiguousData(this->m_private_part->data(), v.m_private_part->
data(), *queue);
287template<
typename DataTypeT>
void
295 impl::fillContiguousData(this->m_private_part->data(), v, *queue);
308template<
class ItemType,
class DataTypeT>
void
312 this->m_private_part->swapValues(*(rhs.m_private_part));
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
File d'exécution pour un accélérateur.
IData * data() override
Données associées à la variable.
Informations de type pour un conteneur de données.
Groupe d'entités de maillage.
static eItemKind kind()
Genre de l'entité
Variable tableau sur un type d'entité du maillage.
void copy(const ItemVariableArrayRefT< DataType > &v)
Copie les valeurs de v dans cette variable.
ItemVariableArrayRefT(const VariableBuildInfo &b, eItemKind ik)
Construit une référence à la variable spécifiée dans vb.
ConstArrayType operator[](ItemLocalId item) const
Valeur non modifiable de l'entité item.
ItemVariableArrayRefT< DataType > & operator=(const ItemVariableArrayRefT< DataType > &rhs)
Positionne la référence de l'instance à la variable rhs.
void fill(const DataType &value)
Remplit la variable avec la valeur value.
Variable tableau sur un type d'entité du maillage.
GroupType itemGroup() const
Groupe associé à la grandeur.
void swapValues(MeshVariableArrayRefT< ItemType, DataType > &rhs)
Échange les valeurs de la variable rhs avec celles de l'instance.
void refersTo(const MeshVariableArrayRefT< ItemType, DataType > &rhs)
Positionne la référence de l'instance à la variable rhs.
MeshVariableArrayRefT(const VariableBuildInfo &b)
void updateFromInternal()
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.
eDataType
Type d'une donnée.