Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ItemConnectivityInfo.cc
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/* ItemConnectivityInfo.cc (C) 2000-2022 */
9/* */
10/* Connectivity information by entity type. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/mesh/ItemConnectivityInfo.h"
15#include "arcane/mesh/ItemSharedInfoList.h"
16
17#include "arcane/core/IParallelMng.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane::mesh
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28ItemConnectivityInfo::
29ItemConnectivityInfo()
30{
31 for (Integer i = 0; i < NB_ICI; ++i)
32 m_infos[i] = 0;
33}
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
38void ItemConnectivityInfo::
39fill(ItemInternalConnectivityList* clist)
40{
41 m_infos[ICI_Node] = clist->maxNbConnectedItem(ItemInternalConnectivityList::NODE_IDX);
42 m_infos[ICI_Edge] = clist->maxNbConnectedItem(ItemInternalConnectivityList::EDGE_IDX);
43 m_infos[ICI_Face] = clist->maxNbConnectedItem(ItemInternalConnectivityList::FACE_IDX);
44 m_infos[ICI_Cell] = clist->maxNbConnectedItem(ItemInternalConnectivityList::CELL_IDX);
45}
46
47/*---------------------------------------------------------------------------*/
48/*---------------------------------------------------------------------------*/
49
50void ItemConnectivityInfo::
51reduce(IParallelMng* pm)
52{
53 pm->reduce(Parallel::ReduceMax, IntegerArrayView(NB_ICI, m_infos));
54}
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59} // End namespace Arcane::mesh
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
@ ReduceMax
Maximum of values.
Int32 Integer
Type representing an integer.
ArrayView< Integer > IntegerArrayView
C equivalent of a 1D array of integers.
Definition UtilsTypes.h:457