Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
ItemFamilyNetwork.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* ItemFamilyNetwork.h (C) 2000-2023 */
9/* */
10/* ItemFamily relations through their connectivities. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_ITEMFAMILYNETWORK_H
13#define ARCANE_MESH_ITEMFAMILYNETWORK_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include <map>
18#include <set>
19
21#include "arcane/utils/ITraceMng.h"
22#include "arcane/utils/DirectedGraphT.h"
23#include "arcane/utils/DirectedAcyclicGraphT.h"
24#include "arcane/utils/List.h"
25#include "arcane/IItemFamily.h"
26#include "arcane/IIncrementalItemConnectivity.h"
27#include "arcane/mesh/MeshGlobal.h"
28
29#include "arcane/IGraph2.h"
30#include "arcane/IGraphModifier2.h"
31#include "arcane/IItemFamilyNetwork.h"
32#include "arcane/utils/NotImplementedException.h" //tmp !
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37namespace Arcane::mesh
38{
39
40/*---------------------------------------------------------------------------*/
41/*---------------------------------------------------------------------------*/
42
43class ARCANE_MESH_EXPORT ItemFamilyNetwork
44: public IItemFamilyNetwork
45{
46 public:
47
50 : m_relation_graph(trace_mng)
51 , m_dependency_graph(trace_mng)
52{}
53
56 for (auto connectivity : m_connectivity_list)
57 {
58 delete connectivity;
59 }
60 }
61
62public:
63
64 bool isActivated() const override {
65 return m_is_activated ;
66 }
67
72
77
81
83 IIncrementalItemConnectivity* getStoredConnectivity(IItemFamily* source_family, IItemFamily* target_family, const String& name) override;
84 IIncrementalItemConnectivity* getStoredConnectivity(IItemFamily* source_family, IItemFamily* target_family, const String& name, bool& is_dependency) override;
85
86
88 List<IIncrementalItemConnectivity*> getConnectivities() override;
89
93
97
101
103 const std::set<IItemFamily*>& getFamilies() const override {return m_families;}
104
105 SharedArray<IItemFamily*> getFamilies(eSchedulingOrder order) const override;
106
108 void schedule(IItemFamilyNetworkTask task, eSchedulingOrder order = TopologicalOrder) override;
109
111 void setIsStored(IIncrementalItemConnectivity* connectivity) override;
112
114 bool isStored(IIncrementalItemConnectivity* connectivity) override;
115
116 bool isDeep(IIncrementalItemConnectivity* connectivity) override;
117
118
119 Integer registerConnectedGraph(IGraph2* graph) override;
120
121 void releaseConnectedGraph(Integer graph_id) override;
122
123 void removeConnectedDoFsFromCells(Int32ConstArrayView local_ids) override;
124 private:
125
126 bool m_is_activated = false ;
130
131 // NOTE GG: Il faudrait utiliser List<Ref<IIncrementalItemConnectivity>>
132 // mais cela change l'interface de cette classe à cause de la méthode
133 // getConnectivities(). A voir avec Stéphane pour la modification
134 List<IIncrementalItemConnectivity*> m_connectivity_list;
135
136 std::map<IIncrementalItemConnectivity*,std::pair<bool,bool>> m_connectivity_status; // bool = is_stored
137 std::set<IItemFamily*> m_families;
138
139 UniqueArray<IGraph2*> m_registred_graphs ;
140
141 private:
142
143 void _checkConnectivityName(IIncrementalItemConnectivity* connectivity, const String& name);
144 std::pair<IIncrementalItemConnectivity* const, std::pair<bool,bool>>& _getConnectivityStatus(IIncrementalItemConnectivity* connectivity);
145 SharedArray<IIncrementalItemConnectivity*> _getConnectivitiesFromGraph(const ConnectivityGraph::ConnectedEdgeSet& connectivity_edges);
146 SharedArray<IIncrementalItemConnectivity*> _getConnectivitiesFromGraph(const ConnectivityGraph::ConnectedEdgeSet& connectivity_edges1, const ConnectivityGraph::ConnectedEdgeSet& connectivity_edges2);
147};
148
149/*---------------------------------------------------------------------------*/
150/*---------------------------------------------------------------------------*/
151
152} // End namespace Arcane::mesh
153
154/*---------------------------------------------------------------------------*/
155/*---------------------------------------------------------------------------*/
156
157#endif /* ITEMFAMILYNETWORK_H_ */
Fichier de configuration d'Arcane.
Interface d'un graphe du maillage.
Definition IGraph2.h:90
Interface pour gérer une connectivité incrémentale.
Interface d'une famille d'entités.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
const std::set< IItemFamily * > & getFamilies() const override
Obtenir la liste de toutes les familles.
ItemFamilyNetwork(ITraceMng *trace_mng)
Vue constante d'un tableau de type T.
Interface du gestionnaire de traces.
Chaîne de caractères unicode.