BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
vtktools.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#ifndef BELFEM_VTKTOOLS_HPP
13
#define BELFEM_VTKTOOLS_HPP
14
15
#include "
typedefs.hpp
"
16
#include "
cl_Vector.hpp
"
17
#include "
cl_Element.hpp
"
18
19
namespace
belfem
20
{
21
namespace
vtk
22
{
23
//------------------------------------------------------------------------------
24
29
template
<
typename
T> T
swap_byte_endian
(T aValue)
30
{
31
T aOutValue;
32
auto
*tPointer = (
char
*) & aValue;
33
auto
*tOutPointer = (
char
*) & aOutValue;
34
int
size =
sizeof
(T);
35
for
(
int
i=0; i<size; i++ )
36
{
37
tOutPointer[size - 1 - i] = tPointer[i];
38
}
39
return
aOutValue;
40
}
41
42
//------------------------------------------------------------------------------
43
47
int
48
vtk_type
(
const
ElementType
& aElementType );
49
50
//------------------------------------------------------------------------------
51
55
void
56
get_node_ids
(
mesh::Element
* aElement,
Vector< id_t >
& aNodeIDs );
57
58
//-----------------------------------------------------------------------------
59
}
60
}
61
#endif
//BELFEM_VTKTOOLS_HPP
cl_Element.hpp
cl_Vector.hpp
belfem::Vector< id_t >
belfem::vtk
Definition
vtktools.cpp:21
belfem::vtk::swap_byte_endian
T swap_byte_endian(T aValue)
This function inverts little endian to big endian and vice versa.
Definition
vtktools.hpp:29
belfem::vtk::vtk_type
int vtk_type(const ElementType &aElementType)
returns the VTK type of an element
Definition
vtktools.cpp:25
belfem::vtk::get_node_ids
void get_node_ids(mesh::Element *aElement, Vector< id_t > &aNodeIDs)
get node IDs of this element in VTK order
Definition
vtktools.cpp:115
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::ElementType
ElementType
Element types.
Definition
Mesh_Enums.hpp:27
mesh.Element
Definition
Element.py:1
typedefs.hpp
src
mesh
vtktools.hpp
Generated by
1.18.0