Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ExtraGhostItemsManager.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/* ExtraGhostItemsManager.h (C) 2000-2015 */
9/* */
10/* Construction of extra ghost items. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_EXTRAGHOSTITEMSMANAGER_H_
13#define ARCANE_EXTRAGHOSTITEMSMANAGER_H_
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arcane/mesh/MeshGlobal.h"
19#include "arcane/core/ISubDomain.h"
20#include "arcane/utils/ITraceMng.h"
21#include "arcane/core/ISerializer.h"
22#include "arcane/utils/Array.h"
23#include "arcane/core/IItemFamily.h"
24
25#include "arcane/core/IExtraGhostItemsBuilder.h"
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30namespace Arcane::mesh
31{
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36class IExtraGhostItemsAdder
37{
38 public:
39
40 typedef Arcane::Int32ArrayView SubDomainItems;
41 IExtraGhostItemsAdder() {}
42 virtual ~IExtraGhostItemsAdder() {}
43
44 virtual void serializeGhostItems(ISerializer* buffer, Int32ConstArrayView ghost_item_lids) = 0;
45 virtual void addExtraGhostItems(ISerializer* buffer) = 0;
46 virtual void updateSynchronizationInfo() = 0;
47 virtual ISubDomain* subDomain() = 0;
48 virtual IItemFamily* itemFamily() = 0;
49};
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
53
55{
56 public:
57
60 : m_item_family(extra_ghost_adder->itemFamily())
61 , m_trace_mng(m_item_family->traceMng())
62 , m_extra_ghost_items_adder(extra_ghost_adder)
63 {}
64
66 : m_item_family(item_family)
67 , m_trace_mng(item_family->traceMng())
68 {}
69
72
73 public:
74
75 IExtraGhostItemsAdder* extraGhostItemsFamily() { return m_extra_ghost_items_adder; }
76
77 void addExtraGhostItemsBuilder(IExtraGhostItemsBuilder* builder)
78 {
79 m_builders.add(builder);
80 }
81
82 ArrayView<IExtraGhostItemsBuilder*> extraGhostItemsBuilders()
83 {
84 return m_builders;
85 }
86
87 void computeExtraGhostItems();
88 void computeExtraGhostItems2(); // REFACTORED ONE
89
90 private:
91
92 IItemFamily* m_item_family;
93 UniqueArray<IExtraGhostItemsBuilder*> m_builders;
94 ITraceMng* m_trace_mng;
95 IExtraGhostItemsAdder* m_extra_ghost_items_adder;
96};
97
98/*---------------------------------------------------------------------------*/
99/*---------------------------------------------------------------------------*/
100
101} // namespace Arcane::mesh
102
103/*---------------------------------------------------------------------------*/
104/*---------------------------------------------------------------------------*/
105
106#endif
Arcane configuration file.
Interface for an "extraordinary" ghost item builder.
Interface of an entity family.
Definition IItemFamily.h:83
Interface of the subdomain manager.
Definition ISubDomain.h:75
ExtraGhostItemsManager(IExtraGhostItemsAdder *extra_ghost_adder)
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:453