Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IMeshPartitioner.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/* IMeshPartitioner.h (C) 2000-2025 */
9/* */
10/* Interface of a mesh partitioner. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMESHPARTITIONER_H
13#define ARCANE_IMESHPARTITIONER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IMeshPartitionerBase.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
36class ARCANE_CORE_EXPORT IMeshPartitioner
38{
39 public:
40
41 virtual void build() = 0;
42
43 public:
44
46
47 virtual void partitionMesh(bool initial_partition, Int32 nb_part) = 0;
48
50 ARCCORE_DEPRECATED_2021("Use primaryMesh() instead")
51 virtual IMesh* mesh() const = 0;
52
54 virtual IPrimaryMesh* primaryMesh() override;
55
56 public:
57
64 //virtual void setTimeRatio(Real v) =0;
66 //virtual Real timeRatio() const =0;
68
70 virtual ARCANE_DEPRECATED_116 void setMaximumComputationTime(Real v) = 0;
71 virtual ARCANE_DEPRECATED_116 Real maximumComputationTime() const = 0;
72
78 virtual ARCANE_DEPRECATED_116 void setComputationTimes(RealConstArrayView v) = 0;
79 virtual ARCANE_DEPRECATED_116 RealConstArrayView computationTimes() const = 0;
80
87 virtual void setImbalance(Real v) = 0;
89 virtual Real imbalance() const = 0;
91
93 virtual void setMaxImbalance(Real v) = 0;
95 virtual Real maxImbalance() const = 0;
96
98 virtual ARCANE_DEPRECATED_116 void setCellsWeight(ArrayView<float> weights, Integer nb_weight) = 0;
99 virtual ARCANE_DEPRECATED_116 ArrayView<float> cellsWeight() const = 0;
100
102 virtual void setILoadBalanceMng(ILoadBalanceMng* mng) = 0;
103 virtual ILoadBalanceMng* loadBalanceMng() const = 0;
104};
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
109} // namespace Arcane
110
111/*---------------------------------------------------------------------------*/
112/*---------------------------------------------------------------------------*/
113
114#endif
Modifiable view of an array of type T.
Interface for registering variables for load balancing.
Interface of a mesh partitioner.
virtual void partitionMesh(bool initial_partition)=0
Interface of a mesh partitioner.
virtual ARCANE_DEPRECATED_116 void setComputationTimes(RealConstArrayView v)=0
Computation time of this subdomain. The first element indicates the computation time of the subdomain...
virtual void setImbalance(Real v)=0
Sets the computation time imbalance.
virtual IMesh * mesh() const =0
Mesh associated with the partitioner.
virtual Real imbalance() const =0
Computation time imbalance.
virtual void setILoadBalanceMng(ILoadBalanceMng *mng)=0
Changes the ILoadBalanceMng to use.
virtual IPrimaryMesh * primaryMesh() override
Associated mesh.
virtual Real maxImbalance() const =0
Maximum allowed imbalance.
virtual ARCANE_DEPRECATED_116 void setCellsWeight(ArrayView< float > weights, Integer nb_weight)=0
Allows defining the weights of objects to be partitioned: ILoadBalanceMng must now be used.
virtual ARCANE_DEPRECATED_116 void setMaximumComputationTime(Real v)=0
Sets the proportion of computation time.
virtual void setMaxImbalance(Real v)=0
Sets the maximum allowed imbalance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.
std::int32_t Int32
Signed integer type of 32 bits.
ConstArrayView< Real > RealConstArrayView
C equivalent of a 1D array of reals.
Definition UtilsTypes.h:488