Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ICriteriaLoadBalanceMng.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/* ICriteriaLoadBalanceMng.h (C) 2000-2024 */
9/* */
10/* Interface for a load balance criteria manager for meshes. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ICRITERIALOADBALANCEMNG_H
13#define ARCANE_CORE_ICRITERIALOADBALANCEMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arcane/core/VariableTypes.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29/*!
30 * \brief Class interface allowing criteria to be added to adjust
31 * the load balance.
32 */
34{
35 public:
36
37 virtual ~ICriteriaLoadBalanceMng() = default; //!< Frees resources.
38
39 public:
40
41 /*!
42 * \brief Method allowing a criterion to be added for each cell.
43 *
44 * \param count A cell variable with a weight per cell.
45 */
46 virtual void addCriterion(VariableCellInt32& count) = 0;
47
48 /*!
49 * \brief Method allowing a criterion to be added for each cell.
50 *
51 * \param count A cell variable with a weight per cell.
52 */
53 virtual void addCriterion(VariableCellReal& count) = 0;
54
55 // TODO Understand how PartitionerMemoryInfo works
56 /*!
57 * \brief Method allowing a criterion to be added for each cell.
58 *
59 * \param count A cell variable with a weight per cell.
60 * \param entity The entity type linked to this criterion.
61 */
62 virtual void addMass(VariableCellInt32& count, const String& entity) = 0;
63
64 /*!
65 * \brief Method allowing a criterion to be added for each face.
66 *
67 * \param count A face variable with a weight per face.
68 * \param entity The entity type linked to this criterion.
69 */
70 virtual void addCommCost(VariableFaceInt32& count, const String& entity) = 0;
71
72 /*!
73 * \brief Method allowing the criteria already added to be cleared.
74 */
75 virtual void reset() = 0;
76
77 /*!
78 * \brief Method allowing to specify if the data mass of each
79 * cell is a criterion for load balance.
80 *
81 * \param active true if the data mass must be a criterion.
82 */
83 virtual void setMassAsCriterion(bool active) = 0;
84
85 /*!
86 * \brief Method allowing to specify if the number of cells in a
87 * subdomain must be a criterion for load balance.
88 *
89 * \param active true if the number of cells must be a criterion.
90 */
91 virtual void setNbCellsAsCriterion(bool active) = 0;
92
93 /*!
94 * \brief Method allowing to specify if the mass of communications
95 * between cells must be a criterion for load balance.
96 *
97 * \param active true if the mass of communications must be a criterion.
98 */
99 virtual void setCellCommContrib(bool active) = 0;
100
101 /*!
102 * \brief
103 * \param active
104 */
105 virtual void setComputeComm(bool active) = 0;
106
107 /*!
108 * \brief Method allowing to retrieve the number of criteria already registered.
109 *
110 * \return The number of criteria.
111 */
112 virtual Integer nbCriteria() = 0;
113};
114
115/*---------------------------------------------------------------------------*/
116/*---------------------------------------------------------------------------*/
117
118} // End namespace Arcane
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
123#endif
Declarations of Arcane's general types.
Class interface allowing criteria to be added to adjust the load balance.
virtual void addCriterion(VariableCellReal &count)=0
Method allowing a criterion to be added for each cell.
virtual void addMass(VariableCellInt32 &count, const String &entity)=0
Method allowing a criterion to be added for each cell.
virtual void setNbCellsAsCriterion(bool active)=0
Method allowing to specify if the number of cells in a subdomain must be a criterion for load balance...
virtual ~ICriteriaLoadBalanceMng()=default
Frees resources.
virtual Integer nbCriteria()=0
Method allowing to retrieve the number of criteria already registered.
virtual void addCriterion(VariableCellInt32 &count)=0
Method allowing a criterion to be added for each cell.
virtual void setComputeComm(bool active)=0
virtual void addCommCost(VariableFaceInt32 &count, const String &entity)=0
Method allowing a criterion to be added for each face.
virtual void setMassAsCriterion(bool active)=0
Method allowing to specify if the data mass of each cell is a criterion for load balance.
virtual void setCellCommContrib(bool active)=0
Method allowing to specify if the mass of communications between cells must be a criterion for load b...
virtual void reset()=0
Method allowing the criteria already added to be cleared.
MeshVariableScalarRefT< Cell, Real > VariableCellReal
Real type quantity at cell center.
MeshVariableScalarRefT< Cell, Int32 > VariableCellInt32
Quantity at the cell center of 32-bit integer type.
MeshVariableScalarRefT< Face, Int32 > VariableFaceInt32
Quantity at the face of 32-bit integer type.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.