Revision 761945b7d3d5aeab1ac49a9479535badea5a4ac4 authored by Lars Bilke on 18 February 2021, 12:58:39 UTC, committed by Lars Bilke on 19 February 2021, 07:13:01 UTC
1 parent 323688f
VtkOGSEnum.cpp
/**
* \file
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "VtkOGSEnum.h"
#include "BaseLib/Error.h"
#include <vtkCellType.h>
int OGSToVtkCellType(MeshLib::CellType ogs)
{
switch (ogs)
{
case MeshLib::CellType::POINT1:
return VTK_VERTEX;
case MeshLib::CellType::LINE2:
return VTK_LINE;
case MeshLib::CellType::LINE3:
return VTK_QUADRATIC_EDGE;
case MeshLib::CellType::TRI3:
return VTK_TRIANGLE;
case MeshLib::CellType::TRI6:
return VTK_QUADRATIC_TRIANGLE;
case MeshLib::CellType::QUAD4:
return VTK_QUAD;
case MeshLib::CellType::QUAD8:
return VTK_QUADRATIC_QUAD;
case MeshLib::CellType::QUAD9:
return VTK_BIQUADRATIC_QUAD;
case MeshLib::CellType::HEX8:
return VTK_HEXAHEDRON;
case MeshLib::CellType::HEX20:
return VTK_QUADRATIC_HEXAHEDRON;
case MeshLib::CellType::HEX27:
return VTK_TRIQUADRATIC_HEXAHEDRON;
case MeshLib::CellType::TET4:
return VTK_TETRA;
case MeshLib::CellType::TET10:
return VTK_QUADRATIC_TETRA;
case MeshLib::CellType::PRISM6:
return VTK_WEDGE;
case MeshLib::CellType::PRISM15:
return VTK_QUADRATIC_WEDGE;
case MeshLib::CellType::PRISM18:
return VTK_BIQUADRATIC_QUADRATIC_WEDGE;
case MeshLib::CellType::PYRAMID5:
return VTK_PYRAMID;
case MeshLib::CellType::PYRAMID13:
return VTK_QUADRATIC_PYRAMID;
case MeshLib::CellType::INVALID:
return -1;
default:
OGS_FATAL(
"Unknown cell type in conversion from OGS to VTK. Given cell "
"type value is {:d}.",
ogs);
}
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...