14#include "arcane/std/internal/VtkCellTypes.h"
15#include "arcane/utils/IOException.h"
16#include "arcane/utils/FatalErrorException.h"
17#include "arcane/ArcaneTypes.h"
22namespace Arcane::VtkUtils
29vtkToArcaneCellType(
int vtk_type,
Int32 nb_node)
38 case VTK_QUADRATIC_EDGE:
44 case VTK_QUADRATIC_QUAD:
51 ARCANE_THROW(IOException,
"Unsupported VtkCellType VTK_POLYGON with nb_node={0}", nb_node);
53 return IT_Tetraedron4;
54 case VTK_QUADRATIC_TETRA:
55 return IT_Tetraedron10;
59 return IT_Pentaedron6;
62 case VTK_QUADRATIC_HEXAHEDRON:
63 return IT_Hexaedron20;
64 case VTK_PENTAGONAL_PRISM:
65 return IT_Heptaedron10;
66 case VTK_HEXAGONAL_PRISM:
67 return IT_Octaedron12;
74 ARCANE_THROW(IOException,
"Unsupported VtkCellType '{0}'", vtk_type);
81extern "C++" unsigned char
82arcaneToVtkCellType(
Int16 arcane_type)
84 switch (arcane_type) {
86 return VTK_EMPTY_CELL;
92 return VTK_QUADRATIC_EDGE;
98 return VTK_QUADRATIC_TRIANGLE;
102 return VTK_QUADRATIC_QUAD;
111 case IT_Tetraedron10:
112 return VTK_QUADRATIC_TETRA;
118 return VTK_HEXAHEDRON;
120 return VTK_QUADRATIC_HEXAHEDRON;
121 case IT_Heptaedron10:
122 return VTK_PENTAGONAL_PRISM;
124 return VTK_HEXAGONAL_PRISM;
126 ARCANE_FATAL(
"Unsuported item type for VtkWriter type={0}", arcane_type);
#define ARCANE_THROW(exception_class,...)
Macro pour envoyer une exception avec formattage.
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Lecteur des fichiers de maillage via la bibliothèque LIMA.