Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
GeometricGlobal.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/* GeometricGlobal.h (C) 2000-2026 */
9/* */
10/* Global declarations for the geometric component. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/FatalErrorException.h"
15#include "arcane/utils/TraceInfo.h"
16
18
19#include "arcane/geometry/GeometricGlobal.h"
20#include "arcane/geometry/GeomType.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane::geometric
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31static const char*
32_geometricTypeToName(GeomType type)
33{
34 switch (type) {
36 return "Null";
38 return "Vertex";
39 case GeomType::Line2:
40 return "Line2";
42 return "Triangle3";
43 case GeomType::Quad4:
44 return "Quad4";
46 return "Pentagon5";
48 return "Hexagon6";
50 return "Tetraedron4";
52 return "Pyramid5";
54 return "Pentaedron6";
56 return "Hexaedron8";
58 return "Heptaedron10";
60 return "Octaedron12";
61 }
62 return "Unknown";
63}
64
65/*---------------------------------------------------------------------------*/
66/*---------------------------------------------------------------------------*/
67
68extern "C++" void
69_arcaneBadType(GeomType type, GeomType wanted_type)
70{
71 const char* t1 = _geometricTypeToName(type);
72 const char* t2 = _geometricTypeToName(wanted_type);
73 throw FatalErrorException(A_FUNCINFO,
74 String::format("Bad geometric type type={0}, expected={1}",
75 t1, t2));
76}
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81} // namespace Arcane::geometric
82
83/*---------------------------------------------------------------------------*/
84/*---------------------------------------------------------------------------*/
Declarations of Arcane's general types.
Enumeration specifying the type of polygon or polyhedron associated with a geometric element or shape...
Definition GeomType.h:42
@ Tetraedron4
Tetrahedron.
Definition GeomType.h:62
@ NullType
Null element.
Definition GeomType.h:48
@ Octaedron12
Hexagonal prism.
Definition GeomType.h:72
@ Heptaedron10
Pentagonal prism.
Definition GeomType.h:70