Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IGridMeshPartitioner.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/* IGridMeshPartitioner.h (C) 2000-2025 */
9/* */
10/* Interface of a mesh partitioner on a grid. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IGRIDMESHPARTITIONER_H
13#define ARCANE_CORE_IGRIDMESHPARTITIONER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IMeshPartitionerBase.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Interface of a mesh partitioner on a grid.
30 *
31 * This partitioner redistributes the mesh in a 2D or 3D grid.
32 *
33 * The grid is composed of a set of parts, each part being
34 * defined by its bounding box (the coordinates of the two
35 * points at the ends of the grid) and an index (i,j,k). The
36 * dimensions of each part can be different but they
37 * must be consistent: all parts with the same index \a i
38 * must have the same bounding box \a x coordinate.
39 *
40 * ------------------------
41 * | 0,2 | 1,2 |2,2| 3,2 |
42 * ------------------------
43 * | 0,1 | 1,1 |2,1| 3,1 |
44 * ------------------------
45 * | 0,0 | 1,0 |2,0| 3,0 |
46 * ------------------------
47 *
48 * Instances of this class are single-use and must only be used
49 * for a single partitioning. The user must call setBoundingBox()
50 * and setPartIndex() and then perform the partitioning by calling
51 * applyMeshPartitioning().
52 */
53class ARCANE_CORE_EXPORT IGridMeshPartitioner
54// TODO: supprimer l'héritage de cette interface
56{
57 public:
58
59 /*!
60 * \brief Positions the bounding box of our subdomain.
61 *
62 * For the algorithm to work, there must be no overlap
63 * between the bounding boxes of the subdomains.
64 */
65 virtual void setBoundingBox(Real3 min_val, Real3 max_val) = 0;
66
67 /*!
68 * \brief Index (i,j,k) of the part.
69 *
70 * The indices start at zero. In 1D or 2D, the value of \a k is \a
71 * (-1). In 1D, the value of \a j is \a (-1)
72 */
73 virtual void setPartIndex(Int32 i, Int32 j, Int32 k) = 0;
74
75 /*!
76 * \brief Applies the repartitioning to the mesh \a mesh.
77 *
78 * The setPartIndex() and setBoundingBox() methods must have been
79 * called previously. This method can only be called once
80 * per instance.
81 *
82 * The partitioning uses a specific algorithm for
83 * calculating ghost cells to ensure that every cell in \a mesh
84 * that intersects the part specified in setBoundingBox() will be in
85 * this subdomain, possibly as a ghost cell.
86 */
87 virtual void applyMeshPartitioning(IMesh* mesh) = 0;
88};
89
90/*---------------------------------------------------------------------------*/
91/*---------------------------------------------------------------------------*/
92
93} // End namespace Arcane
94
95/*---------------------------------------------------------------------------*/
96/*---------------------------------------------------------------------------*/
97
98#endif
Interface of a mesh partitioner on a grid.
virtual void setBoundingBox(Real3 min_val, Real3 max_val)=0
Positions the bounding box of our subdomain.
virtual void applyMeshPartitioning(IMesh *mesh)=0
Applies the repartitioning to the mesh mesh.
virtual void setPartIndex(Int32 i, Int32 j, Int32 k)=0
Index (i,j,k) of the part.
Interface of a mesh partitioner.
Class managing a 3-dimensional real vector.
Definition Real3.h:132
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.