14#include "arcane/core/MeshVariableScalarRef.h"
16#include "arcane/core/ItemGroup.h"
17#include "arcane/core/VariableScalar.h"
18#include "arcane/core/VariableDataTypeTraits.h"
19#include "arcane/core/VariableTypeInfo.h"
20#include "arcane/core/VariableBuildInfo.h"
21#include "arcane/core/VariableInfo.h"
22#include "arcane/core/VariableFactoryRegisterer.h"
23#include "arcane/core/internal/IDataInternal.h"
38 eDataType dt = VariableDataTypeTraitsT<DataType>::type();
51 return VariableInfo(vbi.name(), vbi.itemFamilyName(), vbi.itemGroupName(), vbi.meshName(), vti, sti);
57template <
class DataTypeT>
63 this->_internalInit();
64 if (this->m_private_part->isPartial())
65 ARCANE_FATAL(
"Can not assign a partial variable to a full variable");
72template <
class DataTypeT>
77 this->_internalInit();
78 if (this->m_private_part->isPartial())
79 ARCANE_FATAL(
"Can not assign a partial variable to a full variable");
85template <
class DataTypeT>
95template <
class DataTypeT>
void
97fill(
const DataTypeT& v)
99 this->m_private_part->fill(v, this->m_private_part->itemGroup());
105template <
class DataTypeT>
void
117template <
typename DataTypeT>
void
129template <
typename DataTypeT>
void
137 impl::copyContiguousData(this->m_private_part->data(), v.m_private_part->
data(), *queue);
143template <
class DataTypeT>
void
151 impl::fillContiguousData<DataTypeT>(this->m_private_part->data(), v, *queue);
157template <
class DataTypeT>
void
161 BaseClass::operator=(rhs);
162 this->m_private_part = rhs.m_private_part;
179template <
typename ItemType,
typename DataType>
VariableInfo
189template <
typename ItemType,
typename DataType> VariableTypeInfo
190MeshVariableScalarRefT<ItemType, DataType>::
191_internalVariableTypeInfo()
199template <
class ItemType,
class DataType>
203 return new ThatClass(vb);
209template <
class ItemType,
class DataTypeT>
219template <
class ItemType,
class DataTypeT>
229template <
class ItemType,
class DataTypeT>
244template <
class ItemType,
class DataTypeT>
void
254template <
class ItemType,
class DataTypeT>
255typename Arcane::MeshVariableScalarRefT<ItemType, DataTypeT>::GroupType
259 return GroupType(BaseClass::itemGroup());
265template <
class ItemType,
class DataTypeT>
void
269 this->m_private_part->setIsSynchronized(group);
275template <
class ItemType,
class DataTypeT>
void
276MeshVariableScalarRefT<ItemType, DataTypeT>::
279 this->m_private_part->setIsSynchronized();
293template <
class ItemType,
class DataTypeT>
void
297 this->m_private_part->swapValues(*(rhs.m_private_part));
303#define ARCANE_INSTANTIATE_MESHVARIABLE_SCALAR(datatype) \
304 template class ARCANE_TEMPLATE_EXPORT ItemVariableScalarRefT<datatype>; \
305 template class ARCANE_TEMPLATE_EXPORT ItemPartialVariableScalarRefT<datatype>; \
306 template class ARCANE_TEMPLATE_EXPORT MeshVariableScalarRefT<Node, datatype>; \
307 template class ARCANE_TEMPLATE_EXPORT MeshVariableScalarRefT<Edge, datatype>; \
308 template class ARCANE_TEMPLATE_EXPORT MeshVariableScalarRefT<Face, datatype>; \
309 template class ARCANE_TEMPLATE_EXPORT MeshVariableScalarRefT<Cell, datatype>; \
310 template class ARCANE_TEMPLATE_EXPORT MeshVariableScalarRefT<Particle, datatype>; \
311 template class ARCANE_TEMPLATE_EXPORT MeshVariableScalarRefT<DoF, datatype>; \
312 template class ARCANE_TEMPLATE_EXPORT MeshPartialVariableScalarRefT<Node, datatype>; \
313 template class ARCANE_TEMPLATE_EXPORT MeshPartialVariableScalarRefT<Edge, datatype>; \
314 template class ARCANE_TEMPLATE_EXPORT MeshPartialVariableScalarRefT<Face, datatype>; \
315 template class ARCANE_TEMPLATE_EXPORT MeshPartialVariableScalarRefT<Cell, datatype>; \
316 template class ARCANE_TEMPLATE_EXPORT MeshPartialVariableScalarRefT<Particle, datatype>; \
317 template class ARCANE_TEMPLATE_EXPORT MeshPartialVariableScalarRefT<DoF, datatype>
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Execution queue for an accelerator.
Type information for a data container.
Characteristics of mesh elements.
static eItemKind kind()
Entity kind.
Scalar variable on a mesh entity type.
void operator=(const ItemVariableScalarRefT< DataTypeT > &rhs)
Positions the instance reference to the variable rhs.
ItemVariableScalarRefT()
Default constructor.
const DataType & operator[](ItemLocalId item) const
ItemVariableScalarRefT(const VariableBuildInfo &b, eItemKind ik)
Constructs a reference to the variable specified in vb.
Scalar variable on a mesh entity type.
MeshVariableScalarRefT()
Default constructor.
GroupType itemGroup() const
Group associated with the quantity.
MeshVariableScalarRefT(const VariableBuildInfo &vb)
Constructs a reference to the variable specified in vb.
void refersTo(const MeshVariableScalarRefT< ItemType, DataTypeT > &rhs)
Positions the instance reference to the variable rhs.
void swapValues(MeshVariableScalarRefT< ItemType, DataType > &rhs)
Swaps the values of the variable rhs with those of the instance.
void updateFromInternal()
PrivateVariableScalarT(const VariableBuildInfo &vb, const VariableInfo &vi)
IData * data() override
Data associated with the variable.
Parameters necessary for building a variable.
Variable factory registrar.
Information characterizing a variable.
Information characterizing the type of a variable.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
eItemKind
Mesh entity type.