14#include "arcane/core/internal/VtkCellTypes.h"
16#include "ItemTypeInfo.h"
17#include "arcane/utils/IOException.h"
18#include "arcane/utils/FatalErrorException.h"
30 unsigned char arcaneToVtkCellTypeNoThrow(
Int16 arcane_type);
37vtkToArcaneCellType(
int vtk_type,
Int32 nb_node)
46 case VTK_QUADRATIC_EDGE:
52 case VTK_QUADRATIC_QUAD:
54 case VTK_BIQUADRATIC_QUAD:
63 return IT_Tetraedron4;
64 case VTK_QUADRATIC_TETRA:
65 return IT_Tetraedron10;
69 return IT_Pentaedron6;
72 case VTK_QUADRATIC_HEXAHEDRON:
73 return IT_Hexaedron20;
74 case VTK_PENTAGONAL_PRISM:
75 return IT_Heptaedron10;
76 case VTK_HEXAGONAL_PRISM:
77 return IT_Octaedron12;
78 case VTK_TRIQUADRATIC_HEXAHEDRON:
79 return IT_Hexaedron27;
93unsigned char VtkUtils::
94arcaneToVtkCellTypeNoThrow(
Int16 arcane_type)
96 switch (arcane_type) {
98 return VTK_EMPTY_CELL;
104 case IT_Cell3D_Line2:
108 case IT_Cell3D_Line3:
109 return VTK_QUADRATIC_EDGE;
111 case IT_Cell3D_Triangle3:
114 case IT_Cell3D_Triangle6:
115 return VTK_QUADRATIC_TRIANGLE;
117 case IT_Cell3D_Quad4:
120 case IT_Cell3D_Quad8:
121 return VTK_QUADRATIC_QUAD;
123 case IT_Cell3D_Quad9:
124 return VTK_BIQUADRATIC_QUAD;
133 case IT_Tetraedron10:
134 return VTK_QUADRATIC_TETRA;
138 return VTK_QUADRATIC_PYRAMID;
141 case IT_Pentaedron15:
142 return VTK_QUADRATIC_WEDGE;
144 return VTK_HEXAHEDRON;
146 return VTK_QUADRATIC_HEXAHEDRON;
148 return VTK_TRIQUADRATIC_HEXAHEDRON;
149 case IT_Heptaedron10:
150 return VTK_PENTAGONAL_PRISM;
152 return VTK_HEXAGONAL_PRISM;
154 return VTK_BAD_ARCANE_TYPE;
161unsigned char VtkUtils::
162arcaneToVtkCellType(
Int16 arcane_type)
164 unsigned char t = arcaneToVtkCellTypeNoThrow(arcane_type);
165 if (t == VTK_BAD_ARCANE_TYPE)
166 ARCANE_FATAL(
"Unsupported item type for VtkWriter arcane_type={0}", arcane_type);
173unsigned char VtkUtils::
176 unsigned char t = arcaneToVtkCellTypeNoThrow(arcane_type->typeId());
177 if (t == VTK_BAD_ARCANE_TYPE)
178 ARCANE_FATAL(
"Unsupported item type for VtkWriter arcane_type={0}", arcane_type->typeName());
#define ARCANE_THROW(exception_class,...)
Macro pour envoyer une exception avec formattage.
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Déclarations des types généraux de Arcane.
Exception lorsqu'une erreur d'entrée/sortie est détectée.
Infos sur un type d'entité du maillage.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int16_t Int16
Type entier signé sur 16 bits.
std::int32_t Int32
Type entier signé sur 32 bits.