Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
GetVariablesValuesParallelOperation.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* GetVariablesValuesParallelOperation.h (C) 2000-2025 */
9/* */
10/* Operations to access variable values from another subdomain. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_GETVARIABLESVALUESPARALLELOPERATION_H
13#define ARCANE_IMPL_GETVARIABLESVALUESPARALLELOPERATION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IGetVariablesValuesParallelOperation.h"
18
19#include "arcane/utils/Array.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
33class ARCANE_IMPL_EXPORT GetVariablesValuesParallelOperation
35{
36 private:
37
38 class Helper
39 {
40 public:
41
42 SharedArray<Int64> m_unique_ids;
43 SharedArray<Int32> m_indexes;
44 };
45
46 public:
47
48 explicit GetVariablesValuesParallelOperation(IParallelMng* pm);
49
50 public:
51
52 IParallelMng* parallelMng() override;
53
54 public:
55
57 Int64ConstArrayView unique_ids,
58 RealArrayView values) override;
59
61 Int64ConstArrayView unique_ids,
62 Int32ConstArrayView sub_domain_ids,
63 RealArrayView values) override;
64
65 private:
66
67 IParallelMng* m_parallel_mng = nullptr;
68
69 private:
70
71 template <class Type>
72 void _getVariableValues(ItemVariableScalarRefT<Type>& variable,
73 Int64ConstArrayView unique_ids,
74 ArrayView<Type> values);
75
76 template <class Type>
77 void _getVariableValuesSequential(ItemVariableScalarRefT<Type>& variable,
78 Int64ConstArrayView unique_ids,
79 ArrayView<Type> values);
80};
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85} // End namespace Arcane
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90#endif
Modifiable view of an array of type T.
void getVariableValues(VariableItemReal &variable, Int64ConstArrayView unique_ids, RealArrayView values) override
Retrieves the values of a variable on remote entities.
void getVariableValues(VariableItemReal &variable, Int64ConstArrayView unique_ids, Int32ConstArrayView sub_domain_ids, RealArrayView values) override
Retrieves the values of a variable on remote entities.
Operations to access variable values from another subdomain.
Interface of the parallelism manager for a subdomain.
Scalar variable on a mesh entity type.
1D vector of data with reference semantics.
ItemVariableScalarRefT< Real > VariableItemReal
Real type quantity.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:480
ArrayView< Real > RealArrayView
C equivalent of a 1D array of reals.
Definition UtilsTypes.h:459