Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
GeometricGlobal.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/* GeometricGlobal.h (C) 2000-2014 */
9/* */
10/* Déclarations globales pour la composante géométrique. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/FatalErrorException.h"
15#include "arcane/utils/TraceInfo.h"
16
17#include "arcane/ArcaneTypes.h"
18
19#include "arcane/geometric/GeometricGlobal.h"
20#include "arcane/geometric/GeomType.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25ARCANE_BEGIN_NAMESPACE
26GEOMETRIC_BEGIN_NAMESPACE
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31static const char*
32_geometricTypeToName(GeomType type)
33{
34 switch(type){
35 case GeomType::NullType: return "Null";
36 case GeomType::Vertex: return "Vertex";
37 case GeomType::Line2: return "Line2";
38 case GeomType::Triangle3: return "Triangle3";
39 case GeomType::Quad4: return "Quad4";
40 case GeomType::Pentagon5: return "Pentagon5";
41 case GeomType::Hexagon6: return "Hexagon6";
42 case GeomType::Tetraedron4: return "Tetraedron4";
43 case GeomType::Pyramid5: return "Pyramid5";
44 case GeomType::Pentaedron6: return "Pentaedron6";
45 case GeomType::Hexaedron8: return "Hexaedron8";
46 case GeomType::Heptaedron10: return "Heptaedron10";
47 case GeomType::Octaedron12: return "Octaedron12";
48 }
49 return "Unknown";
50}
51
52/*---------------------------------------------------------------------------*/
53/*---------------------------------------------------------------------------*/
54
55extern "C++" void
56_arcaneBadType(GeomType type,GeomType wanted_type)
57{
58 const char* t1 = _geometricTypeToName(type);
59 const char* t2 = _geometricTypeToName(wanted_type);
60 throw FatalErrorException(A_FUNCINFO,
61 String::format("Bad geometric type type={0}, expected={1}",
62 t1,t2));
63}
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
67
68GEOMETRIC_END_NAMESPACE
69ARCANE_END_NAMESPACE
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73