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:
67 return IT_Tetraedron4;
68 case VTK_QUADRATIC_TETRA:
69 return IT_Tetraedron10;
73 return IT_Pentaedron6;
76 case VTK_QUADRATIC_HEXAHEDRON:
77 return IT_Hexaedron20;
78 case VTK_PENTAGONAL_PRISM:
79 return IT_Heptaedron10;
80 case VTK_HEXAGONAL_PRISM:
81 return IT_Octaedron12;
82 case VTK_TRIQUADRATIC_HEXAHEDRON:
83 return IT_Hexaedron27;
97unsigned char VtkUtils::
98arcaneToVtkCellTypeNoThrow(
Int16 arcane_type)
100 switch (arcane_type) {
102 return VTK_EMPTY_CELL;
108 case IT_Cell3D_Line2:
112 case IT_Cell3D_Line3:
113 return VTK_QUADRATIC_EDGE;
115 case IT_Cell3D_Triangle3:
118 case IT_Cell3D_Triangle6:
119 return VTK_QUADRATIC_TRIANGLE;
121 case IT_Cell3D_Quad4:
124 case IT_Cell3D_Quad8:
125 return VTK_QUADRATIC_QUAD;
127 case IT_Cell3D_Quad9:
128 return VTK_BIQUADRATIC_QUAD;
136 case IT_Tetraedron10:
137 return VTK_QUADRATIC_TETRA;
141 return VTK_QUADRATIC_PYRAMID;
144 case IT_Pentaedron15:
145 return VTK_QUADRATIC_WEDGE;
147 return VTK_HEXAHEDRON;
149 return VTK_QUADRATIC_HEXAHEDRON;
151 return VTK_TRIQUADRATIC_HEXAHEDRON;
152 case IT_Heptaedron10:
153 return VTK_PENTAGONAL_PRISM;
155 return VTK_HEXAGONAL_PRISM;
157 return VTK_BAD_ARCANE_TYPE;
164unsigned char VtkUtils::
165arcaneToVtkCellType(
Int16 arcane_type)
167 unsigned char t = arcaneToVtkCellTypeNoThrow(arcane_type);
168 if (t == VTK_BAD_ARCANE_TYPE)
169 ARCANE_FATAL(
"Unsupported item type for VtkWriter arcane_type={0}", arcane_type);
176unsigned char VtkUtils::
179 unsigned char t = arcaneToVtkCellTypeNoThrow(arcane_type->typeId());
180 if (t == VTK_BAD_ARCANE_TYPE)
181 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.