Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
MeshCriteriaLoadBalanceMng.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/* MeshCriteriaLoadBalanceMng.h (C) 2000-2024 */
9/* */
10/* Mesh load balance criteria manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MESHCRITERIALOADBALANCEMNG_H
13#define ARCANE_CORE_MESHCRITERIALOADBALANCEMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/ILoadBalanceMng.h"
18#include "arcane/core/ISubDomain.h"
19#include "arcane/core/ICriteriaLoadBalanceMng.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
34class ARCANE_CORE_EXPORT MeshCriteriaLoadBalanceMng
36{
37 public:
38
39 MeshCriteriaLoadBalanceMng(ISubDomain* sd, const MeshHandle& mesh_handle);
40
41 public:
42
43 void addCriterion(VariableCellInt32& count) override;
44 void addCriterion(VariableCellReal& count) override;
45 void addMass(VariableCellInt32& count, const String& entity) override;
46 void addCommCost(VariableFaceInt32& count, const String& entity) override;
47
48 void reset() override;
49
50 void setMassAsCriterion(bool active) override;
51 void setNbCellsAsCriterion(bool active) override;
52 void setCellCommContrib(bool active) override;
53 void setComputeComm(bool active) override;
54
55 Integer nbCriteria() override;
56
57 private:
58
59 ILoadBalanceMngInternal* m_internal;
60 MeshHandle m_mesh_handle;
61};
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
66} // End namespace Arcane
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70
71#endif
Class interface allowing criteria to be added to adjust the load balance.
Internal API of ILoadBalanceMng to Arcane.
Interface of the subdomain manager.
Definition ISubDomain.h:75
void setNbCellsAsCriterion(bool active) override
Method allowing to specify if the number of cells in a subdomain must be a criterion for load balance...
void addMass(VariableCellInt32 &count, const String &entity) override
Method allowing a criterion to be added for each cell.
Integer nbCriteria() override
Method allowing to retrieve the number of criteria already registered.
void addCommCost(VariableFaceInt32 &count, const String &entity) override
Method allowing a criterion to be added for each face.
MeshCriteriaLoadBalanceMng(ISubDomain *sd, const MeshHandle &mesh_handle)
Constructor.
void addCriterion(VariableCellInt32 &count) override
Method allowing a criterion to be added for each cell.
void setMassAsCriterion(bool active) override
Method allowing to specify if the data mass of each cell is a criterion for load balance.
void reset() override
Method allowing the criteria already added to be cleared.
void setCellCommContrib(bool active) override
Method allowing to specify if the mass of communications between cells must be a criterion for load b...
Handle on a mesh.
Definition MeshHandle.h:48
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.