Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ILoadBalanceMng.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/* ILoadBalanceMng.h (C) 2000-2024 */
9/* */
10/* Interface describing the problem characteristics for the module */
11/* for load balancing. */
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_ILOADBALANCEMNG_H
14#define ARCANE_CORE_ILOADBALANCEMNG_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19#include "arcane/core/VariableTypes.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27class ILoadBalanceMngInternal;
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
32/*!
33 * \brief Interface for registering variables for load balancing.
34 */
36{
37 public:
38
39 virtual ~ILoadBalanceMng() {} //!< Releases resources.
40
41 public:
42
43 // TODO : Deprecated
44 virtual void addMass(VariableCellInt32& count, const String& entity = "") = 0;
45 virtual void addCriterion(VariableCellInt32& count) = 0;
46 virtual void addCriterion(VariableCellReal& count) = 0;
47 virtual void addCommCost(VariableFaceInt32& count, const String& entity = "") = 0;
48 virtual void reset() = 0;
49 virtual void setMassAsCriterion(bool active = true) = 0;
50 virtual void setNbCellsAsCriterion(bool active = true) = 0;
51 virtual Integer nbCriteria() = 0;
52 virtual void setCellCommContrib(bool active = true) = 0;
53 virtual bool cellCommContrib() const = 0;
54 virtual void setComputeComm(bool active = true) = 0;
55 virtual const VariableFaceReal& commCost() const = 0;
56 virtual const VariableCellReal& massWeight() const = 0;
57 virtual const VariableCellReal& massResWeight() const = 0;
58 virtual const VariableCellArrayReal& mCriteriaWeight() const = 0;
59
60 virtual void initAccess(IMesh* mesh) = 0;
61 virtual void endAccess() = 0;
62 virtual void notifyEndPartition() = 0;
63
64 public:
65
66 //! Internal API for Arcane
67 virtual ILoadBalanceMngInternal* _internalApi() { ARCANE_FATAL("Invalid usage"); };
68};
69
70/*---------------------------------------------------------------------------*/
71/*---------------------------------------------------------------------------*/
72
73} // End namespace Arcane
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78#endif
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Declarations of Arcane's general types.
Interface for registering variables for load balancing.
virtual ILoadBalanceMngInternal * _internalApi()
Internal API for Arcane.
virtual ~ILoadBalanceMng()
Releases resources.
MeshVariableScalarRefT< Face, Real > VariableFaceReal
Real type quantity at face.
MeshVariableScalarRefT< Cell, Real > VariableCellReal
Real type quantity at cell center.
MeshVariableArrayRefT< Cell, Real > VariableCellArrayReal
Quantity at the cell center of real array type.
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.