14#include "arcane/core/VariableRefScalar.h"
15#include "arcane/core/VariableScalar.h"
16#include "arcane/core/VariableBuildInfo.h"
17#include "arcane/core/VariableInfo.h"
18#include "arcane/core/VariableDataTypeTraits.h"
19#include "arcane/core/VariableFactoryRegisterer.h"
20#include "arcane/core/IParallelMng.h"
21#include "arcane/core/IVariableMng.h"
55 return VariableInfo(vbi.name(), vbi.itemFamilyName(), vbi.itemGroupName(), vbi.meshName(), vti, sti);
65 return new ThatClass(vb);
71template <
typename DataType>
75, m_private_part(PrivatePartType::getReference(vb, _buildVariableInfo(vb)))
83template <
typename DataType>
87, m_private_part(PrivatePartType::getReference(var))
95template <
class DataType>
99, m_private_part(rhs.m_private_part)
107template <
class DataType>
void
112 m_private_part = rhs.m_private_part;
119template <
typename DataType>
void
123 m_private_part->value() = v;
124 m_private_part->syncReferences();
132 template <
typename T>
135 ARCANE_UNUSED(value);
140 template <
typename T>
141 void _reduce(T& value, IParallelMng* pm, IParallelMng::eReduceType t, TrueType)
144 value = pm->reduce(t, r);
148template <
typename DataType>
void
150reduce(IParallelMng::eReduceType type)
154 _reduce(v,
variableMng()->parallelMng(), type, HasReduce());
161template <
typename T>
void
174template <
typename DataType>
void
178 this->m_private_part->swapValues(*(rhs.m_private_part));
Type information for a data container.
Interface of the parallelism manager for a subdomain.
Parameters necessary for building a variable.
Information characterizing a variable.
Reference to a scalar variable.
VariableRefScalarT(const VariableBuildInfo &b)
Constructs a reference to a scalar variable specified in vb.
void refersTo(const VariableRefScalarT< DataType > &rhs)
Positions the instance's reference to the variable rhs.
void swapValues(VariableRefScalarT< DataType > &rhs)
Exchange the values of variable rhs with those of the instance.
VariableRefScalarT()
Default constructor.
void reduce(Parallel::eReduceType type)
Performs a type type reduction on the variable.
void assign(const DataType &v)
Assigns the value v to the variable.
virtual void updateFromInternal()
Updates from the internal part.
DataType ElementType
Type of the variable elements.
virtual void updateFromInternal()
Updates from the internal part.
VariableRef(const VariableBuildInfo &vbi)
Constructs a reference to a variable with the infos vbi.
VariableRef & operator=(const VariableRef &from)
Copy assignment operator.
void _internalInit(IVariable *)
Internal initialization of the variable.
IVariableMng * variableMng() const
Variable manager associated with the variable.
Information characterizing the type of a variable.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
@ IK_Unknown
Unknown or uninitialized mesh entity.