Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
ItemConnectivityContainerView.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* ItemConnectivityContainerView.cc (C) 2000-2022 */
9/* */
10/* Vues sur les conteneurs contenant les connectivités. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/ItemConnectivityContainerView.h"
15
16#include "arcane/utils/FatalErrorException.h"
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21namespace Arcane
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
29{
30 auto current_list = m_list_data;
31 auto ref_list = rhs.m_list_data;
32 auto current_indexes = m_indexes;
33 auto ref_indexes = rhs.m_indexes;
34 auto* current_list_ptr = current_list;
35 auto* ref_list_ptr = ref_list;
36 Int32 current_list_size = m_list_data_size;
37 Int32 ref_list_size = rhs.m_list_data_size;
38 if (current_list_ptr!=ref_list_ptr)
39 ARCANE_FATAL("Bad list base pointer current={0} ref={1}",current_list_ptr,ref_list_ptr);
40 if (current_list_size!=ref_list_size)
41 ARCANE_FATAL("Bad list size current={0} ref={1}",current_list_size,ref_list_size);
42 auto* current_indexes_ptr = current_indexes;
43 auto* ref_indexes_ptr = ref_indexes;
44 Int32 current_indexes_size = m_nb_item;
45 Int32 ref_indexes_size = rhs.m_nb_item;
46 if (current_indexes_ptr!=ref_indexes_ptr)
47 ARCANE_FATAL("Bad indexes base pointer current={0} ref={1}",current_indexes_ptr,ref_indexes_ptr);
48 if (current_indexes_size!=ref_indexes_size)
49 ARCANE_FATAL("Bad indexes size current={0} ref={1}",current_indexes_size,ref_indexes_size);
50}
51
52/*---------------------------------------------------------------------------*/
53/*---------------------------------------------------------------------------*/
54
55void ItemConnectivityContainerView::
56_checkSize(Int32 indexes_size, Int32 nb_connected_item_size)
57{
58 // La valeur de 'nb_connected_item_size' doit être égale à 'indexes_size'
59 if (indexes_size!=nb_connected_item_size)
60 ARCANE_FATAL("Bad sizes indexes_size={0} nb_connected_item_size={1}",
61 indexes_size,nb_connected_item_size);
62}
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67} // End namespace Arcane
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
void checkSame(ItemConnectivityContainerView rhs) const
Vérifie que les deux instances this et rhs ont les mêmes valeurs.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-