Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
PrivateVariableScalarT.H
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* PrivateVariableScalarT.H (C) 2000-2020 */
9/* */
10/* Factorisation de variable scalaire du maillage. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/PrivateVariableScalar.h"
15#include "arcane/IMesh.h"
16#include "arcane/ItemGroup.h"
17#include "arcane/Variable.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28template<class DataType>
31: MeshVariableRef(vbi)
32, m_private_part(PrivatePartType::getReference(vbi,vi))
33, m_memory_trace(nullptr)
34{
35}
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
40template<class DataType>
44, m_private_part(PrivatePartType::getReference(var))
45, m_memory_trace(nullptr)
46{
47}
48
49/*---------------------------------------------------------------------------*/
50/*---------------------------------------------------------------------------*/
51
52template<class DataType>
55: MeshVariableRef(rhs)
56, m_private_part(rhs.m_private_part)
57, m_memory_trace(rhs.m_memory_trace)
58{
59 if (m_private_part)
60 updateFromInternal();
61}
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
66template<class DataType>
69{
70}
71
72/*---------------------------------------------------------------------------*/
73/*---------------------------------------------------------------------------*/
74
75template<class DataType> void
76PrivateVariableScalarT<DataType>::
77operator=(const PrivateVariableScalarT& rhs)
78{
79 VariableRef::operator=(rhs);
80 m_private_part = rhs.m_private_part;
81 if (m_private_part)
82 updateFromInternal();
83}
84
85/*---------------------------------------------------------------------------*/
86/*---------------------------------------------------------------------------*/
87
88template<class DataType> void
91{
92 arcaneCheckNull(m_private_part);
93
94 m_view.setArray(m_private_part->valueView());
95 m_memory_trace = m_private_part->memoryAccessTrace();
96#ifdef ARCANE_TRACE
97 m_access_infos = m_private_part->memoryAccessInfos();
98 m_trace_infos = m_private_part->traceInfos();
99#endif
100 MeshVariableRef::updateFromInternal();
101
102 //cout << "** UPDATE FROM INTERNAL name=" << name()
103 // << " this=" << this
104 // << '\n';
105 //cout.flush();
106
107 _executeUpdateFunctors();
108}
109
110/*---------------------------------------------------------------------------*/
111/*---------------------------------------------------------------------------*/
112
113template<class DataType> ItemGroup
115itemGroup() const
116{
117 return m_private_part->itemGroup();
118}
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
123} // End namespace Arcane
124
125/*---------------------------------------------------------------------------*/
126/*---------------------------------------------------------------------------*/
Groupe d'entités de maillage.
Definition ItemGroup.h:49
Classe de base d'une variable sur des entités du maillage.
Classe de factorisation des variables scalaires sur des entités du maillage.
Paramètres nécessaires à la construction d'une variable.
Infos caractérisant une variable.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-