Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IGraph2.h
1
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/* IGraph2.h (C) 2000-2025 */
9/* */
10/* Mesh graph interface. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IGRAPH2_H
13#define ARCANE_CORE_IGRAPH2_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
21#include "arcane/core/IItemConnectivity.h"
22#include "arcane/core/IndexedItemConnectivityView.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
34static const Integer NB_DUAL_ITEM_TYPE = 5;
35
36extern "C++" ARCANE_CORE_EXPORT eItemKind
37dualItemKind(Integer type);
38
39class IGraphModifier2;
40class IGraph2;
41
42/*---------------------------------------------------------------------------*/
43/*---------------------------------------------------------------------------*/
44
48
49/*---------------------------------------------------------------------------*/
50/*---------------------------------------------------------------------------*/
51
55class ARCANE_CORE_EXPORT IGraphConnectivity
56{
57 public:
58
59 virtual ~IGraphConnectivity() = default;
60
61 public:
62
64 virtual Item dualItem(const DoF& dualNode) const = 0;
65
67 virtual DoFVectorView links(const DoF& dualNode) const = 0;
68
70 virtual DoFVectorView dualNodes(const DoF& link) const = 0;
71};
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76class ARCANE_CORE_EXPORT IGraphConnectivityObserver
77{
78 public:
79
80 virtual ~IGraphConnectivityObserver() = default;
81
82 public:
83
84 virtual void notifyUpdateConnectivity() = 0;
85};
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90class ARCANE_CORE_EXPORT IGraphObserver
91{
92 public:
93
94 virtual ~IGraphObserver() {}
95
96 virtual void notifyUpdate() = 0;
97};
98
99/*---------------------------------------------------------------------------*/
100/*---------------------------------------------------------------------------*/
101
105class ARCANE_CORE_EXPORT IGraph2
106{
107 public:
108
109 virtual ~IGraph2() = default;
110
111 public:
112
113 virtual IGraphModifier2* modifier() = 0;
114
115 virtual const IGraphConnectivity* connectivity() const = 0;
116
117 virtual Integer registerNewGraphConnectivityObserver(IGraphConnectivityObserver* observer) = 0;
118
119 virtual void releaseGraphConnectivityObserver(Integer observer_id) = 0;
120
121 virtual Integer registerNewGraphObserver(IGraphObserver* observer) = 0;
122
123 virtual void releaseGraphObserver(Integer observer_id) = 0;
124
125 virtual bool isUpdated() = 0;
126
128 virtual Integer nbDualNode() const = 0;
129
131 virtual Integer nbLink() const = 0;
132
133 public:
134
136 virtual const IItemFamily* dualNodeFamily() const = 0;
137 virtual IItemFamily* dualNodeFamily() = 0;
138
140 virtual const IItemFamily* linkFamily() const = 0;
141 virtual IItemFamily* linkFamily() = 0;
142
143 virtual void printDualNodes() const = 0;
144 virtual void printLinks() const = 0;
145};
146
147/*---------------------------------------------------------------------------*/
148/*---------------------------------------------------------------------------*/
149
150} // namespace Arcane
151
152/*---------------------------------------------------------------------------*/
153/*---------------------------------------------------------------------------*/
154
155#endif
Arcane configuration file.
Declarations of Arcane's general types.
Declarations of types on entities.
degree of freedom class.
Definition Item.h:1649
Mesh graph interface.
Definition IGraph2.h:106
virtual Integer nbLink() const =0
Number of links of the graph.
virtual Integer nbDualNode() const =0
Number of dual nodes of the graph.
virtual ~IGraph2()=default
Frees resources.
virtual const IItemFamily * dualNodeFamily() const =0
Returns the family of dual nodes.
virtual const IItemFamily * linkFamily() const =0
Returns the family of links.
Graph connectivity tooling.
Definition IGraph2.h:56
virtual DoFVectorView links(const DoF &dualNode) const =0
Access to the view of links composed of the dualNode of type(DoF).
virtual Item dualItem(const DoF &dualNode) const =0
Access to the dual Item of a DualNode (detype DoF).
virtual ~IGraphConnectivity()=default
Frees resources.
virtual DoFVectorView dualNodes(const DoF &link) const =0
Access to the view of DualNodes constituting a Link of type(DoF).
Interface for a mesh graph.
Interface of an entity family.
Definition IItemFamily.h:83
Base class for a mesh element.
Definition Item.h:84
ItemVectorViewT< DoF > DoFVectorView
View over a vector of degrees of freedom.
Definition ItemTypes.h:316
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
eItemKind
Mesh entity type.