vtk_cell_type.cc
Go to the documentation of this file.
//
// helper for vtk file io
//
// author: Pierre.Saramito@imag.fr
//
// 29 january 2020
//
#include "rheolef/reference_element.h"
#include "vtk_cell_type.h"
namespace rheolef {
size_t vtk_cell_type2variant (size_t vtk_cell_type)
{
switch (vtk_cell_type) {
case VTK_VERTEX:
return reference_element::p;
case VTK_LINE:
case VTK_QUADRATIC_EDGE:
case VTK_CUBIC_LINE:
case VTK_LAGRANGE_CURVE:
return reference_element::e;
case VTK_TRIANGLE:
case VTK_QUADRATIC_TRIANGLE:
case VTK_LAGRANGE_TRIANGLE:
return reference_element::t;
case VTK_QUAD:
case VTK_BIQUADRATIC_QUAD:
case VTK_LAGRANGE_QUADRILATERAL:
return reference_element::t;
case VTK_TETRA:
case VTK_QUADRATIC_TETRA:
case VTK_LAGRANGE_TETRAHEDRON:
return reference_element::T;
case VTK_WEDGE:
case VTK_BIQUADRATIC_QUADRATIC_WEDGE:
case VTK_LAGRANGE_WEDGE:
return reference_element::P;
case VTK_HEXAHEDRON:
case VTK_TRIQUADRATIC_HEXAHEDRON:
case VTK_LAGRANGE_HEXAHEDRON:
return reference_element::H;
case VTK_QUADRATIC_QUAD: // incomplete order 2 variants
case VTK_QUADRATIC_WEDGE:
case VTK_QUADRATIC_HEXAHEDRON:
default:
error_macro ("unsupported vtk cell type = "<<vtk_cell_type);
}
}
}// namespace rheolef
rheolef::reference_element::e
static const variant_type e
Definition: reference_element.h:76
VTK_LAGRANGE_WEDGE
#define VTK_LAGRANGE_WEDGE
Definition: vtk_cell_type.h:79
vtk_cell_type.h
rheolef::reference_element::H
static const variant_type H
Definition: reference_element.h:81
VTK_QUADRATIC_TRIANGLE
#define VTK_QUADRATIC_TRIANGLE
Definition: vtk_cell_type.h:51
VTK_LINE
#define VTK_LINE
Definition: vtk_cell_type.h:36
rheolef::reference_element::T
static const variant_type T
Definition: reference_element.h:79
VTK_LAGRANGE_HEXAHEDRON
#define VTK_LAGRANGE_HEXAHEDRON
Definition: vtk_cell_type.h:78
rheolef::vtk_cell_type2variant
size_t vtk_cell_type2variant(size_t vtk_cell_type)
Definition: vtk_cell_type.cc:34
VTK_QUAD
#define VTK_QUAD
Definition: vtk_cell_type.h:42
VTK_LAGRANGE_QUADRILATERAL
#define VTK_LAGRANGE_QUADRILATERAL
Definition: vtk_cell_type.h:76
VTK_QUADRATIC_TETRA
#define VTK_QUADRATIC_TETRA
Definition: vtk_cell_type.h:54
VTK_HEXAHEDRON
#define VTK_HEXAHEDRON
Definition: vtk_cell_type.h:45
VTK_BIQUADRATIC_QUADRATIC_WEDGE
#define VTK_BIQUADRATIC_QUADRATIC_WEDGE
Definition: vtk_cell_type.h:62
VTK_TRIANGLE
#define VTK_TRIANGLE
Definition: vtk_cell_type.h:38
VTK_LAGRANGE_CURVE
#define VTK_LAGRANGE_CURVE
Definition: vtk_cell_type.h:74
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
error_macro
#define error_macro(message)
Definition: dis_macros.h:49
VTK_LAGRANGE_TETRAHEDRON
#define VTK_LAGRANGE_TETRAHEDRON
Definition: vtk_cell_type.h:77
VTK_BIQUADRATIC_QUAD
#define VTK_BIQUADRATIC_QUAD
Definition: vtk_cell_type.h:58
VTK_LAGRANGE_TRIANGLE
#define VTK_LAGRANGE_TRIANGLE
Definition: vtk_cell_type.h:75
rheolef::reference_element::p
static const variant_type p
Definition: reference_element.h:75
VTK_QUADRATIC_WEDGE
#define VTK_QUADRATIC_WEDGE
Definition: vtk_cell_type.h:56
rheolef::reference_element::P
static const variant_type P
Definition: reference_element.h:80
VTK_CUBIC_LINE
#define VTK_CUBIC_LINE
Definition: vtk_cell_type.h:67
VTK_VERTEX
#define VTK_VERTEX
Definition: vtk_cell_type.h:34
VTK_TRIQUADRATIC_HEXAHEDRON
#define VTK_TRIQUADRATIC_HEXAHEDRON
Definition: vtk_cell_type.h:59
rheolef::reference_element::t
static const variant_type t
Definition: reference_element.h:77
VTK_WEDGE
#define VTK_WEDGE
Definition: vtk_cell_type.h:46
VTK_QUADRATIC_QUAD
#define VTK_QUADRATIC_QUAD
Definition: vtk_cell_type.h:52
VTK_QUADRATIC_EDGE
#define VTK_QUADRATIC_EDGE
Definition: vtk_cell_type.h:50
VTK_QUADRATIC_HEXAHEDRON
#define VTK_QUADRATIC_HEXAHEDRON
Definition: vtk_cell_type.h:55
VTK_TETRA
#define VTK_TETRA
Definition: vtk_cell_type.h:43