Arcane
v3.14.10.0
Documentation développeur
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
22
namespace
Arcane
23
{
24
25
/*---------------------------------------------------------------------------*/
26
/*---------------------------------------------------------------------------*/
27
28
template
<
class
DataType>
29
PrivateVariableScalarT<DataType>::
30
PrivateVariableScalarT
(
const
VariableBuildInfo
&
vbi
,
const
VariableInfo
&
vi
)
31
:
MeshVariableRef
(
vbi
)
32
, m_private_part(
PrivatePartType
::getReference(
vbi
,
vi
))
33
, m_memory_trace(
nullptr
)
34
{
35
}
36
37
/*---------------------------------------------------------------------------*/
38
/*---------------------------------------------------------------------------*/
39
40
template
<
class
DataType>
41
PrivateVariableScalarT<DataType>::
42
PrivateVariableScalarT
(
IVariable
*
var
)
43
:
MeshVariableRef
(
var
)
44
, m_private_part(
PrivatePartType
::getReference(
var
))
45
, m_memory_trace(
nullptr
)
46
{
47
}
48
49
/*---------------------------------------------------------------------------*/
50
/*---------------------------------------------------------------------------*/
51
52
template
<
class
DataType>
53
PrivateVariableScalarT<DataType>::
54
PrivateVariableScalarT
(
const
PrivateVariableScalarT
&
rhs
)
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
66
template
<
class
DataType>
67
PrivateVariableScalarT<DataType>::
68
PrivateVariableScalarT
()
69
{
70
}
71
72
/*---------------------------------------------------------------------------*/
73
/*---------------------------------------------------------------------------*/
74
75
template
<
class
DataType>
void
76
PrivateVariableScalarT<DataType>::
77
operator=(
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
88
template
<
class
DataType>
void
89
PrivateVariableScalarT<DataType>::
90
updateFromInternal
()
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
113
template
<
class
DataType>
ItemGroup
114
PrivateVariableScalarT<DataType>::
115
itemGroup
()
const
116
{
117
return
m_private_part->itemGroup();
118
}
119
120
/*---------------------------------------------------------------------------*/
121
/*---------------------------------------------------------------------------*/
122
123
}
// End namespace Arcane
124
125
/*---------------------------------------------------------------------------*/
126
/*---------------------------------------------------------------------------*/
Arcane::IVariable
Interface d'une variable.
Definition
IVariable.h:54
Arcane::ItemGroup
Groupe d'entités de maillage.
Definition
ItemGroup.h:49
Arcane::LimaWrapper
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition
Lima.cc:120
Arcane::MeshVariableRef
Classe de base d'une variable sur des entités du maillage.
Definition
MeshVariableRef.h:34
Arcane::PrivateVariableScalarT
Classe de factorisation des variables scalaires sur des entités du maillage.
Definition
PrivateVariableScalar.h:34
Arcane::VariableBuildInfo
Paramètres nécessaires à la construction d'une variable.
Definition
VariableBuildInfo.h:43
Arcane::VariableInfo
Infos caractérisant une variable.
Definition
VariableInfo.h:37
Arcane
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Definition
AcceleratorGlobal.h:36
arcane
core
PrivateVariableScalarT.H
Généré le Lundi 18 Novembre 2024 03:01:04 pour Arcane par
1.9.8