Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IItemFamilyNetwork.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/* IItemFamilyNetwork.h (C) 2000-2025 */
9/* */
10/* Interface to handle ItemFamily relations through their connectivities. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IITEMFAMILYNETWORK_H_
13#define ARCANE_IITEMFAMILYNETWORK_H_
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IItemFamily.h"
18#include "arcane/core/IIncrementalItemConnectivity.h"
19#include "arcane/core/IGraph2.h"
20
21#include <functional>
22#include <set>
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
34{
35 public:
36
37 virtual ~IItemFamilyNetwork() = default;
38
39 public:
40
41 typedef std::function<void(IItemFamily*)> IItemFamilyNetworkTask;
42
43 public:
44
45 enum eSchedulingOrder
46 {
47 TopologicalOrder,
48 InverseTopologicalOrder,
49 Unknown
50 };
51
52 // TMP for debug
53 public:
54
55 static constexpr bool plug_serializer = true;
56
57 public:
58
59 virtual bool isActivated() const = 0;
60
67 virtual void addDependency(IItemFamily* master_family, IItemFamily* slave_family,
68 IIncrementalItemConnectivity* slave_to_master_connectivity,
69 bool is_deep_connectivity = true) = 0;
70
77 virtual void addRelation(IItemFamily* source_family,
78 IItemFamily* target_family,
79 IIncrementalItemConnectivity* source_to_target_connectivity) = 0;
80
82 //and \a target_family
83 virtual IIncrementalItemConnectivity* getDependency(IItemFamily* source_family, IItemFamily* target_family) = 0;
84 virtual IIncrementalItemConnectivity* getRelation(IItemFamily* source_family, IItemFamily* target_family) = 0;
85
87 //\a target_family named \a name, whether it is a relation or a dependency
89 IItemFamily* target_family,
90 const String& name) = 0;
92 IItemFamily* target_family,
93 const String& name,
94 bool& is_dependency) = 0;
95
102 IItemFamily* target_family,
103 const String& name) = 0;
105 IItemFamily* target_family,
106 const String& name,
107 bool& is_dependency) = 0;
108
111
113 //family \a source_family or parents of a family \a target_family
115 virtual SharedArray<IIncrementalItemConnectivity*> getParentConnectivities(IItemFamily* target_family) = 0;
116
118 //parents of a family \a target_family
120 virtual SharedArray<IIncrementalItemConnectivity*> getParentDependencies(IItemFamily* target_family) = 0;
121
123 //of a family \a target_family
125 virtual SharedArray<IIncrementalItemConnectivity*> getParentRelations(IItemFamily* source_family) = 0;
126
128 virtual const std::set<IItemFamily*>& getFamilies() const = 0;
129
130 virtual SharedArray<IItemFamily*> getFamilies(eSchedulingOrder order) const = 0;
131
133 //of the family dependency graph
134 virtual void schedule(IItemFamilyNetworkTask task, eSchedulingOrder order = TopologicalOrder) = 0;
135
137 virtual void setIsStored(IIncrementalItemConnectivity* connectivity) = 0;
138
140 virtual bool isStored(IIncrementalItemConnectivity* connectivity) = 0;
141
143 virtual bool isDeep(IIncrementalItemConnectivity* connectivity) = 0;
144
147
149 virtual void releaseConnectedGraph(Integer graph_id) = 0;
150
153};
154
155/*---------------------------------------------------------------------------*/
156/*---------------------------------------------------------------------------*/
157
158} // namespace Arcane
159
160/*---------------------------------------------------------------------------*/
161/*---------------------------------------------------------------------------*/
162
163#endif
Mesh graph interface.
Definition IGraph2.h:106
Interface for managing an incremental connectivity.
virtual IIncrementalItemConnectivity * getStoredConnectivity(IItemFamily *source_family, IItemFamily *target_family, const String &name)=0
Returns, if associated with storage, the connectivity between the families source_family and target_f...
virtual bool isStored(IIncrementalItemConnectivity *connectivity)=0
Retrieves information regarding the storage of the connectivity.
virtual void addDependency(IItemFamily *master_family, IItemFamily *slave_family, IIncrementalItemConnectivity *slave_to_master_connectivity, bool is_deep_connectivity=true)=0
Adds a dependency between two families; an element of master_family is composed of elements of slave_...
virtual const std::set< IItemFamily * > & getFamilies() const =0
Get the list of all families.
virtual List< IIncrementalItemConnectivity * > getConnectivities()=0
Get the list of all connectivities, whether they are relations or dependencies.
virtual SharedArray< IIncrementalItemConnectivity * > getChildConnectivities(IItemFamily *source_family)=0
Get the list of all connectivities (dependencies or relations), children of a.
virtual bool isDeep(IIncrementalItemConnectivity *connectivity)=0
Retrieves information regarding the storage of the connectivity.
virtual void removeConnectedDoFsFromCells(Int32ConstArrayView local_ids)=0
Removes DOFs and links between DOFs connected to deleted cells.
virtual IIncrementalItemConnectivity * getDependency(IItemFamily *source_family, IItemFamily *target_family)=0
Returns the dependency connectivity between the families source_family.
virtual void setIsStored(IIncrementalItemConnectivity *connectivity)=0
Marks a connectivity as stored.
virtual void schedule(IItemFamilyNetworkTask task, eSchedulingOrder order=TopologicalOrder)=0
Schedules the execution of a task, in topological or inverse topological order.
virtual IIncrementalItemConnectivity * getConnectivity(IItemFamily *source_family, IItemFamily *target_family, const String &name)=0
Returns the connectivity between the families source_family and.
virtual SharedArray< IIncrementalItemConnectivity * > getChildDependencies(IItemFamily *source_family)=0
Get the list of all dependencies, children of a family source_family or.
virtual SharedArray< IIncrementalItemConnectivity * > getChildRelations(IItemFamily *source_family)=0
Get the list of all relations, children of a family source_family or parents.
virtual Integer registerConnectedGraph(IGraph2 *graph)=0
Registers a graph managing DOFs connected to the mesh.
virtual void addRelation(IItemFamily *source_family, IItemFamily *target_family, IIncrementalItemConnectivity *source_to_target_connectivity)=0
Adds a relation between two families; an element of source_family is connected to one or more element...
virtual void releaseConnectedGraph(Integer graph_id)=0
Deregisters a graph managing DOFs connected to the mesh.
Interface of an entity family.
Definition IItemFamily.h:83
Implementation of a collection of elements in vector form.
1D vector of data with reference semantics.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482