Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
TestHashUniqueId.cc
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#include <gtest/gtest.h>
9
10#include "arcane/utils/FixedArray.h"
11
13
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17using namespace Arcane;
18
19namespace
20{
21inline void _doCheckHash(const char* name,ConstArrayView<Int64> ids)
22{
23 Int64 hash_uid = MeshUtils::generateHashUniqueId(ids);
24 std::cout << name << " = " << hash_uid << "\n";
25 if (ids.size()>0) {
27 }
28}
29
30}
32{
35 FixedArray<Int64,2> nodes2( { 25, 37 });
36 FixedArray<Int64,3> nodes3 ({ 25, 37, 48 });
37 _doCheckHash("X0",nodes0.view());
38 _doCheckHash("X1",nodes1.view());
39 _doCheckHash("X2",nodes2.view());
40 _doCheckHash("X3",nodes3.view());
41}
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
#define ASSERT_TRUE(condition)
Vérifie que condition est vrai.
Definition Assertion.h:126
Fonctions utilitaires sur le maillage.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-