Arcane  4.2.3.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
GhostLayerBuilder.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/* GhostLayerBuilder.h (C) 2000-2026 */
9/* */
10/* Construction des couches fantômes. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_GHOSTLAYERBUILDER_H
13#define ARCANE_MESH_GHOSTLAYERBUILDER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/mesh/DynamicMeshKindInfos.h"
18#include "arcane/utils/TraceAccessor.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25class SerializeBuffer;
26}
27
28namespace Arcane::mesh
29{
30class DynamicMesh;
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
38: public TraceAccessor
39{
40 public:
41
42 typedef DynamicMeshKindInfos::ItemInternalMap ItemInternalMap;
43
44 typedef HashTableMapT<Int32,SharedArray<Int64> > BoundaryInfosMap;
45 typedef HashTableMapEnumeratorT<Int32,SharedArray<Int64> > BoundaryInfosMapEnumerator;
46
47 public:
48
50 explicit GhostLayerBuilder(IMesh* mesh);
51 virtual ~GhostLayerBuilder();
52
53 public:
54
55 void addGhostLayers(bool is_allocate);
56
59 void addGhostChildFromParent2(Array<Int64>& ghost_cell_to_refine);
60
61 private:
62
63 IMesh* m_mesh = nullptr;
64 IMeshInternal* m_mesh_internal = nullptr;
65
66 private:
67
68 void _addOneGhostLayerV2();
69 void _exchangeData(IParallelExchanger* exchanger,BoundaryInfosMap& boundary_infos_to_send);
70 void _printItem(ItemInternal* ii,std::ostream& o);
71 void _exchangeCells(HashTableMapT<Int32,SharedArray<Int32>>& cells_to_send,bool with_flags);
72};
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76//TOTO A definir ailleurs
77class NodeUidToSubDomain
78{
79 public:
80 NodeUidToSubDomain(Int64 max_uid,Int32 nb_rank);
81
82 Int32 uidToRank(Int64 uid)
83 {
84 Int32 rank = (Int32)(uid / m_nb_by_rank);
85 if (rank>=m_nb_rank)
86 --rank;
87 Int32 nrank = rank % m_modulo;
88 return nrank;
89 }
90 Int32 modulo() const { return m_modulo; }
91
92 private:
93
94 Int32 m_nb_rank;
95 Int32 m_modulo;
96 Int64 m_nb_by_rank;
97};
98
99/*---------------------------------------------------------------------------*/
100/*---------------------------------------------------------------------------*/
101
102} // End namespace Arcane::mesh
103
104/*---------------------------------------------------------------------------*/
105/*---------------------------------------------------------------------------*/
106
107#endif
Tableau d'items de types quelconques.
Énumérateur pour un HashTableMap.
Table de hachage pour tableaux associatifs.
Partie interne de IMesh.
Échange d'informations entre processeurs.
Structure interne d'une entité de maillage.
Implémentation d'un tampon pour la sérialisation.
Vecteur 1D de données avec sémantique par référence.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
Implémentation d'un maillage.
Definition DynamicMesh.h:98
GhostLayerBuilder(IMesh *mesh)
Construit une instance pour le maillage mesh.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Type entier signé sur 64 bits.
std::int32_t Int32
Type entier signé sur 32 bits.