Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IVariableSynchronizerMng.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/* IVariableSynchronizerMng.h (C) 2000-2023 */
9/* */
10/* Interface of the variable synchronization manager. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_IVARIABLESYNCHRONIZERMNG_H
14#define ARCANE_CORE_IVARIABLESYNCHRONIZERMNG_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25class IVariableSynchronizerMngInternal;
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*!
31 * \brief Interface of the variable synchronization manager.
32 */
33class ARCANE_CORE_EXPORT IVariableSynchronizerMng
34{
35 public:
36
37 virtual ~IVariableSynchronizerMng() = default;
38
39 public:
40
41 //! Associated parallelism manager
42 virtual IParallelMng* parallelMng() const = 0;
43
44 /*!
45 * \brief Event sent at the beginning and end of synchronization.
46 *
47 * This event is sent when calling the methods
48 * IVariableSynchronizer::synchronize(IVariable* var)
49 * and IVariableSynchronizer::synchronize(VariableCollection vars) for all
50 * instances of IVariableSynchronizer.
51 */
53
54 /*!
55 * \brief Sets the comparison level between values before and after synchronization.
56 *
57 * The level must be the same across all ranks of parallelMng().
58 */
60
61 //! Comparison level of values before and after synchronization
63
64 //! Indicates whether comparisons of values before and after synchronization are performed.
65 virtual bool isSynchronizationComparisonEnabled() const = 0;
66
67 /*!
68 * \brief Prints statistics to the stream \a ostr.
69 *
70 * Statistics must be processed via the call to flushPendingStats()
71 * before calling this method.
72 */
73 virtual void dumpStats(std::ostream& ostr) const = 0;
74
75 /*!
76 * \brief Processes pending statistics.
77 *
78 * This method does nothing if isComparisonEnabled() is \a false.
79 *
80 * This method is collective on parallelMng().
81 */
82 virtual void flushPendingStats() = 0;
83
84 public:
85
86 virtual IVariableSynchronizerMngInternal* _internalApi() = 0;
87};
88
89/*---------------------------------------------------------------------------*/
90/*---------------------------------------------------------------------------*/
91
92} // namespace Arcane
93
94/*---------------------------------------------------------------------------*/
95/*---------------------------------------------------------------------------*/
96
97#endif
Declarations of Arcane's general types.
Interface of the parallelism manager for a subdomain.
Interface of the variable synchronization manager.
virtual EventObservable< const VariableSynchronizerEventArgs & > & onSynchronized()=0
Event sent at the beginning and end of synchronization.
virtual Int32 synchronizationCompareLevel() const =0
Comparison level of values before and after synchronization.
virtual void setSynchronizationCompareLevel(Int32 v)=0
Sets the comparison level between values before and after synchronization.
virtual bool isSynchronizationComparisonEnabled() const =0
Indicates whether comparisons of values before and after synchronization are performed.
virtual void dumpStats(std::ostream &ostr) const =0
Prints statistics to the stream ostr.
virtual void flushPendingStats()=0
Processes pending statistics.
virtual IParallelMng * parallelMng() const =0
Associated parallelism manager.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.