Arcane
4.1.12.0
Developer 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
17
#include "
arcane/core/ArcaneTypes.h
"
18
19
#include "arcane/geometry/GeometricGlobal.h"
20
#include "arcane/geometry/GeomType.h"
21
22
/*---------------------------------------------------------------------------*/
23
/*---------------------------------------------------------------------------*/
24
25
namespace
Arcane::geometric
26
{
27
28
/*---------------------------------------------------------------------------*/
29
/*---------------------------------------------------------------------------*/
30
31
static
const
char
*
32
_geometricTypeToName(
GeomType
type)
33
{
34
switch
(type) {
35
case
GeomType::NullType
:
36
return
"Null"
;
37
case
GeomType::Vertex
:
38
return
"Vertex"
;
39
case
GeomType::Line2
:
40
return
"Line2"
;
41
case
GeomType::Triangle3
:
42
return
"Triangle3"
;
43
case
GeomType::Quad4
:
44
return
"Quad4"
;
45
case
GeomType::Pentagon5
:
46
return
"Pentagon5"
;
47
case
GeomType::Hexagon6
:
48
return
"Hexagon6"
;
49
case
GeomType::Tetraedron4
:
50
return
"Tetraedron4"
;
51
case
GeomType::Pyramid5
:
52
return
"Pyramid5"
;
53
case
GeomType::Pentaedron6
:
54
return
"Pentaedron6"
;
55
case
GeomType::Hexaedron8
:
56
return
"Hexaedron8"
;
57
case
GeomType::Heptaedron10
:
58
return
"Heptaedron10"
;
59
case
GeomType::Octaedron12
:
60
return
"Octaedron12"
;
61
}
62
return
"Unknown"
;
63
}
64
65
/*---------------------------------------------------------------------------*/
66
/*---------------------------------------------------------------------------*/
67
68
extern
"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
/*---------------------------------------------------------------------------*/
ArcaneTypes.h
Declarations of Arcane's general types.
Arcane::FatalErrorException
Exception when a fatal error has occurred.
Definition
arccore/src/base/arccore/base/FatalErrorException.h:33
Arcane::geometric::GeomType
Enumeration specifying the type of polygon or polyhedron associated with a geometric element or shape...
Definition
src/arcane/geometry/GeomType.h:42
Arcane::geometric::GeomType::Pyramid5
@ Pyramid5
Pyramid.
Definition
src/arcane/geometry/GeomType.h:64
Arcane::geometric::GeomType::Tetraedron4
@ Tetraedron4
Tetrahedron.
Definition
src/arcane/geometry/GeomType.h:62
Arcane::geometric::GeomType::Hexagon6
@ Hexagon6
Hexagon.
Definition
src/arcane/geometry/GeomType.h:60
Arcane::geometric::GeomType::Pentagon5
@ Pentagon5
Pentagon.
Definition
src/arcane/geometry/GeomType.h:58
Arcane::geometric::GeomType::NullType
@ NullType
Null element.
Definition
src/arcane/geometry/GeomType.h:48
Arcane::geometric::GeomType::Line2
@ Line2
Line.
Definition
src/arcane/geometry/GeomType.h:52
Arcane::geometric::GeomType::Pentaedron6
@ Pentaedron6
Prism.
Definition
src/arcane/geometry/GeomType.h:66
Arcane::geometric::GeomType::Hexaedron8
@ Hexaedron8
Hexahedron.
Definition
src/arcane/geometry/GeomType.h:68
Arcane::geometric::GeomType::Octaedron12
@ Octaedron12
Hexagonal prism.
Definition
src/arcane/geometry/GeomType.h:72
Arcane::geometric::GeomType::Heptaedron10
@ Heptaedron10
Pentagonal prism.
Definition
src/arcane/geometry/GeomType.h:70
Arcane::geometric::GeomType::Vertex
@ Vertex
Vertex.
Definition
src/arcane/geometry/GeomType.h:50
Arcane::geometric::GeomType::Triangle3
@ Triangle3
Triangle.
Definition
src/arcane/geometry/GeomType.h:54
Arcane::geometric::GeomType::Quad4
@ Quad4
Quadrangle.
Definition
src/arcane/geometry/GeomType.h:56
arcane
geometry
GeometricGlobal.cc
Generated on
for Arcane by
1.16.1