Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IMeshPartitionConstraint.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/* IMeshPartitionConstraint.h (C) 2000-2025 */
9/* */
10/* Interface of a mesh partitioning constraint. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IMESHPARTITIONCONSTRAINT_H
13#define ARCANE_CORE_IMESHPARTITIONCONSTRAINT_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Interface of a mesh partitioning constraint.
30 *
31 * Instances of this interface are managed by an
32 * IMeshPartitionConstraintMng.
33 */
35{
36 public:
37
38 virtual ~IMeshPartitionConstraint() = default; //!< Releases resources
39
40 public:
41
42 /*!
43 * \brief Adds a set of constraints on the cells.
44 *
45 * Adds to the \a linked_cells array a set of pairs of
46 * uniqueId() of cells that must remain in the same partition.
47 * For example, if cells 25 and 23 must remain connected, it
48 * is enough to call:
49 * \code
50 * linked_cells.add(23);
51 * linked_cells.add(25);
52 * \endcode
53 *
54 * You must always add pairs of uniqueId(), potentially repeating
55 * the cells. For example, if one wishes
56 * that cells 35, 37, and 39, one must do as follows:
57 * \code
58 * linked_cells.add(35);
59 * linked_cells.add(37);
60 * linked_cells.add(35);
61 * linked_cells.add(39);
62 * \endcode
63 * The \a linked_cells array must have a size that is a multiple of 2.
64 * The \a linked owners array indicates for each pair which subdomain
65 * it must belong to.
66 *
67 * TODO: Remove \a linked_owners
68 *
69 * \warning: each pair must start with the cell having the smallest uid.
70 * The "owner" indicates for every couple that corresponds to the first cell.
71 */
72 virtual void addLinkedCells(Int64Array& linked_cells, Int32Array& linked_owners) = 0;
73};
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78} // namespace Arcane
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
82
83#endif
Declarations of Arcane's general types.
Interface of a mesh partitioning constraint.
virtual ~IMeshPartitionConstraint()=default
Releases resources.
virtual void addLinkedCells(Int64Array &linked_cells, Int32Array &linked_owners)=0
Adds a set of constraints on the cells.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Array< Int64 > Int64Array
Dynamic one-dimensional array of 64-bit integers.
Definition UtilsTypes.h:125
Array< Int32 > Int32Array
Dynamic one-dimensional array of 32-bit integers.
Definition UtilsTypes.h:127