Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IMeshPartitionConstraintMng.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/* IMeshPartitionConstraintMng.h (C) 2000-2025 */
9/* */
10/* Interface of a mesh partitioning constraint manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IMESHPARTITIONCONSTRAINTMNG_H
13#define ARCANE_CORE_IMESHPARTITIONCONSTRAINTMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Interface of a mesh partitioning constraint manager.
30 */
32{
33 public:
34
35 virtual ~IMeshPartitionConstraintMng() = default; //!< Releases resources
36
37 public:
38
39 //! Adds a constraint
40 virtual void addConstraint(IMeshPartitionConstraint* constraint) = 0;
41
42 /*!
43 * \brief Removes a constraint.
44 *
45 * The caller becomes the owner of \a constraint and must
46 * manage its destruction.
47 */
48 virtual void removeConstraint(IMeshPartitionConstraint* constraint) = 0;
49
50 /*!
51 * \brief Computes and applies constraints.
52 *
53 * It computes constraints on the mesh by applying
54 * the IMeshPartitionConstraint::addLinkedCell() method for each constraint
55 * and applies them by modifying the IItemFamily::itemsNewOwner() variable
56 * of the cells. All cells that must be linked in it are then placed
57 * in the same partition.
58 *
59 * This operation does not guarantee that the resulting partitions are
60 * balanced in terms of load. For this,
61 * a re-partitioning service (IMeshPartitioner) must be used
62 * that takes these constraints into account.
63 *
64 * This operation is collective.
65 */
66 virtual void computeAndApplyConstraints() = 0;
67
68 /*!
69 * \brief Computes constraints and returns a list of linked entities.
70 *
71 * It computes constraints like computeAndApplyConstraints()
72 * but does not modify the owner. Instead, it returns a
73 * list containing lists of the uniqueId() of the entities that must
74 * be linked.
75 *
76 * This operation is collective.
77 */
78 virtual void computeConstraintList(Int64MultiArray2& tied_uids) = 0;
79
80 //! Adds a weak constraint
81 virtual void addWeakConstraint(IMeshPartitionConstraint* constraint) = 0;
82
83 /*!
84 * \brief Removes a constraint.
85 *
86 * The caller becomes the owner of \a constraint and must
87 * manage its destruction.
88 */
89 virtual void removeWeakConstraint(IMeshPartitionConstraint* constraint) = 0;
90
91 /*!
92 * \brief Computes and applies constraints.
93 *
94 * It computes constraints on the mesh by applying
95 * the IMeshPartitionConstraint::addLinkedCell() method for each constraint
96 * and applies them by modifying the IItemFamily::itemsNewOwner() variable
97 * of the cells. All cells that must be linked in it are then placed
98 * in the same partition.
99 *
100 * This operation does not guarantee that the resulting partitions are
101 * balanced in terms of load. For this,
102 * a re-partitioning service (IMeshPartitioner) must be used
103 * that takes these constraints into account.
104 *
105 * This operation is collective.
106 */
108
109 /*!
110 * \brief Computes constraints and returns a list of linked entities.
111 *
112 * It computes constraints like computeAndApplyConstraints()
113 * but does not modify the owner. Instead, it returns a
114 * list containing lists of the uniqueId() of the entities that must
115 * be linked.
116 *
117 * This operation is collective.
118 */
119 virtual void computeWeakConstraintList(Int64MultiArray2& tied_uids) = 0;
120};
121
122/*---------------------------------------------------------------------------*/
123/*---------------------------------------------------------------------------*/
124
125} // namespace Arcane
126
127/*---------------------------------------------------------------------------*/
128/*---------------------------------------------------------------------------*/
129
130#endif
Declarations of types on entities.
Interface of a mesh partitioning constraint manager.
virtual void addConstraint(IMeshPartitionConstraint *constraint)=0
Adds a constraint.
virtual void computeWeakConstraintList(Int64MultiArray2 &tied_uids)=0
Computes constraints and returns a list of linked entities.
virtual void removeConstraint(IMeshPartitionConstraint *constraint)=0
Removes a constraint.
virtual ~IMeshPartitionConstraintMng()=default
Releases resources.
virtual void addWeakConstraint(IMeshPartitionConstraint *constraint)=0
Adds a weak constraint.
virtual void computeAndApplyConstraints()=0
Computes and applies constraints.
virtual void computeAndApplyWeakConstraints()=0
Computes and applies constraints.
virtual void computeConstraintList(Int64MultiArray2 &tied_uids)=0
Computes constraints and returns a list of linked entities.
virtual void removeWeakConstraint(IMeshPartitionConstraint *constraint)=0
Removes a constraint.
Interface of a mesh partitioning constraint.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
MultiArray2< Int64 > Int64MultiArray2
2D variable size array of 64-bit integers
Definition UtilsTypes.h:419