Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IGetVariablesValuesParallelOperation.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/* IGetVariablesValuesParallelOperation.h (C) 2000-2025 */
9/* */
10/* Operations to access variable values from another subdomain. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IGETVARIABLESVALUESPARALLELOPERATION_H
13#define ARCANE_CORE_IGETVARIABLESVALUESPARALLELOPERATION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29/*!
30 * \brief Operations to access variable values from another subdomain.
31 * \todo use serialization + templates to support all variable types.
32 */
34{
35 public:
36
37 virtual ~IGetVariablesValuesParallelOperation() = default;
38
39 public:
40
41 virtual IParallelMng* parallelMng() = 0;
42
43 public:
44
45 /*!
46 * \brief Retrieves the values of a variable on remote entities
47 *
48 * This operation allows retrieving the values of the variable
49 * \a variable on entities that are not located in this subdomain.
50 * The array \a unique_ids contains the <b>unique</b> number of the entities
51 * whose value we wish to retrieve. These values will be stored
52 * in \a values.
53 *
54 * This method generally requires a lot of communication
55 * because it is necessary to search which subdomain the entities
56 * belong to based on their uniqueId(). If the subdomain is known, it
57 * is better to use the overloaded method with this parameter.
58 *
59 * \a unique_ids and \a values must have the same number of elements.
60 *
61 * This operation is collective and blocking.
62 */
63 virtual void getVariableValues(VariableItemReal& variable,
64 Int64ConstArrayView unique_ids,
65 RealArrayView values) = 0;
66 /*!
67 * \brief Retrieves the values of a variable on remote entities
68 *
69 * This operation allows retrieving the values of the variable
70 * \a variable on entities that are not located in this subdomain.
71 * The array \a unique_ids contains the <b>unique</b> number of the entities
72 * whose value we wish to retrieve, and \a sub_domain_ids the subdomain
73 * in which the entities are located. These values will be stored in \a values.
74 *
75 * \a unique_ids, \a sub_domain_ids, and \a values must have
76 * the same number of elements.
77 *
78 * This operation is collective and blocking.
79 */
80 virtual void getVariableValues(VariableItemReal& variable,
81 Int64ConstArrayView unique_ids,
82 Int32ConstArrayView sub_domain_ids,
83 RealArrayView values) = 0;
84};
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88
89} // namespace Arcane
90
91/*---------------------------------------------------------------------------*/
92/*---------------------------------------------------------------------------*/
93
94#endif
Declarations of Arcane's general types.
Operations to access variable values from another subdomain.
virtual void getVariableValues(VariableItemReal &variable, Int64ConstArrayView unique_ids, Int32ConstArrayView sub_domain_ids, RealArrayView values)=0
Retrieves the values of a variable on remote entities.
virtual void getVariableValues(VariableItemReal &variable, Int64ConstArrayView unique_ids, RealArrayView values)=0
Retrieves the values of a variable on remote entities.
Interface of the parallelism manager for a subdomain.
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