PACMAN
0.1.0
Portable Algorithms for Coupling, Mapping, and Adaptive iNterpolation
Loading...
Searching...
No Matches
types.hpp
Go to the documentation of this file.
1
//
2
// This file is subject to the terms and conditions defined in
3
// file 'LICENSE', which is part of this source code package.
4
//
5
6
#pragma once
7
8
#include <KokkosKernels_ArithTraits.hpp>
9
#include <Kokkos_Core.hpp>
10
#include <cstdint>
11
#include <iomanip>
12
#include <limits>
13
14
namespace
PACMAN
{
15
typedef
double
fp_t
;
16
typedef
double
coordinates_t
;
17
18
typedef
int32_t
int_t
;
19
typedef
int32_t
shortint_t
;
20
typedef
uint32_t
index_t
;
21
typedef
int32_t
offset_t
;
22
23
// types optionnels pour expliciter le type sous jacent des enums
24
typedef
int32_t
method_t
;
25
typedef
int32_t
cell_t
;
26
typedef
int32_t
status_t
;
27
typedef
int32_t
geosupport_t
;
28
29
enum class
TransferMethods
:
method_t
{
30
NEAREST_NEAREST
= 0xF0,
31
INTERP_CLAMP
= 0xF1,
32
INTERP_NEAREST
= 0xF2,
33
INTERP_ZEROFILL
= 0xF3,
34
INTERP_EXTRAP
= 0xF4,
35
RBF_PUM
= 0xF5,
36
MLS
= 0xF6,
37
};
38
39
enum class
TransferStatus
:
status_t
{
40
OUTSIDE
,
41
NEAREST
,
42
INTER
,
43
EXTRAP
,
44
CLAMP
,
45
};
46
47
enum class
GeoSupport
:
geosupport_t
{
48
49
NA
,
50
POINT
,
51
LINE
,
52
TRIANGLE
,
53
QUAD
,
54
TETRA
,
55
HEXAHEDRON
,
56
WEDGE
,
57
PYRAMID
,
58
};
59
60
enum class
CellType
:
cell_t
{
61
62
// Isoparametric 0D
63
VTK_EMPTY_CELL
,
64
VTK_VERTEX
,
65
// Isoparametric 1D
66
VTK_LINE
,
67
VTK_QUADRATIC_EDGE
,
68
// Isoparametric 2D
69
VTK_TRIANGLE
,
70
VTK_QUAD
,
71
VTK_QUADRATIC_TRIANGLE
,
72
VTK_QUADRATIC_QUAD
,
73
// Isoparametric 3D
74
VTK_TETRA
,
75
VTK_HEXAHEDRON
,
76
VTK_WEDGE
,
77
VTK_PYRAMID
,
78
VTK_QUADRATIC_TETRA
,
79
VTK_QUADRATIC_HEXAHEDRON
,
80
VTK_QUADRATIC_WEDGE
,
81
VTK_QUADRATIC_PYRAMID
,
82
};
83
84
namespace
fp_consts {
85
KOKKOS_INLINE_FUNCTION
fp_t
min
(
void
) {
86
return
KokkosKernels::ArithTraits<fp_t>::min();
87
}
88
89
KOKKOS_INLINE_FUNCTION
fp_t
max
(
void
) {
90
return
KokkosKernels::ArithTraits<fp_t>::max();
91
}
92
KOKKOS_INLINE_FUNCTION
consteval
fp_t
zero
(
void
) {
93
return
static_cast<
fp_t
>
(0.0);
94
}
95
KOKKOS_INLINE_FUNCTION
consteval
fp_t
one
(
void
) {
96
return
static_cast<
fp_t
>
(1.0);
97
}
98
KOKKOS_INLINE_FUNCTION
consteval
fp_t
epsilon
(
void
) {
return
1.0e-14; }
99
// LCOV_EXCL_START
100
constexpr
unsigned
int
precision
= std::numeric_limits<fp_t>::max_digits10;
101
inline
auto
set_precision
(
void
) {
102
return
std::setprecision(
fp_consts::precision
);
103
}
104
// LCOV_EXCL_STOP
105
};
// namespace fp_consts
106
107
}
// namespace PACMAN
PACMAN::fp_consts::zero
KOKKOS_INLINE_FUNCTION consteval fp_t zero(void)
Definition
types.hpp:92
PACMAN::fp_consts::precision
constexpr unsigned int precision
Definition
types.hpp:100
PACMAN::fp_consts::epsilon
KOKKOS_INLINE_FUNCTION consteval fp_t epsilon(void)
Definition
types.hpp:98
PACMAN::fp_consts::set_precision
auto set_precision(void)
Definition
types.hpp:101
PACMAN::fp_consts::max
KOKKOS_INLINE_FUNCTION fp_t max(void)
Definition
types.hpp:89
PACMAN::fp_consts::one
KOKKOS_INLINE_FUNCTION consteval fp_t one(void)
Definition
types.hpp:95
PACMAN::fp_consts::min
KOKKOS_INLINE_FUNCTION fp_t min(void)
Definition
types.hpp:85
PACMAN
Definition
concepts.hpp:14
PACMAN::fp_t
double fp_t
Definition
types.hpp:15
PACMAN::coordinates_t
double coordinates_t
Definition
types.hpp:16
PACMAN::TransferStatus
TransferStatus
Definition
types.hpp:39
PACMAN::TransferStatus::EXTRAP
@ EXTRAP
PACMAN::TransferStatus::OUTSIDE
@ OUTSIDE
PACMAN::TransferStatus::NEAREST
@ NEAREST
PACMAN::TransferStatus::INTER
@ INTER
PACMAN::TransferStatus::CLAMP
@ CLAMP
PACMAN::geosupport_t
int32_t geosupport_t
Definition
types.hpp:27
PACMAN::status_t
int32_t status_t
Definition
types.hpp:26
PACMAN::cell_t
int32_t cell_t
Definition
types.hpp:25
PACMAN::index_t
uint32_t index_t
Definition
types.hpp:20
PACMAN::offset_t
int32_t offset_t
Definition
types.hpp:21
PACMAN::GeoSupport
GeoSupport
Definition
types.hpp:47
PACMAN::GeoSupport::LINE
@ LINE
PACMAN::GeoSupport::WEDGE
@ WEDGE
PACMAN::GeoSupport::HEXAHEDRON
@ HEXAHEDRON
PACMAN::GeoSupport::TRIANGLE
@ TRIANGLE
PACMAN::GeoSupport::POINT
@ POINT
PACMAN::GeoSupport::QUAD
@ QUAD
PACMAN::GeoSupport::PYRAMID
@ PYRAMID
PACMAN::GeoSupport::TETRA
@ TETRA
PACMAN::GeoSupport::NA
@ NA
PACMAN::shortint_t
int32_t shortint_t
Definition
types.hpp:19
PACMAN::TransferMethods
TransferMethods
Definition
types.hpp:29
PACMAN::TransferMethods::MLS
@ MLS
PACMAN::TransferMethods::INTERP_CLAMP
@ INTERP_CLAMP
PACMAN::TransferMethods::INTERP_EXTRAP
@ INTERP_EXTRAP
PACMAN::TransferMethods::INTERP_NEAREST
@ INTERP_NEAREST
PACMAN::TransferMethods::INTERP_ZEROFILL
@ INTERP_ZEROFILL
PACMAN::TransferMethods::NEAREST_NEAREST
@ NEAREST_NEAREST
PACMAN::TransferMethods::RBF_PUM
@ RBF_PUM
PACMAN::method_t
int32_t method_t
Definition
types.hpp:24
PACMAN::int_t
int32_t int_t
Definition
types.hpp:18
PACMAN::CellType
CellType
Definition
types.hpp:60
PACMAN::CellType::VTK_QUADRATIC_HEXAHEDRON
@ VTK_QUADRATIC_HEXAHEDRON
PACMAN::CellType::VTK_PYRAMID
@ VTK_PYRAMID
PACMAN::CellType::VTK_VERTEX
@ VTK_VERTEX
PACMAN::CellType::VTK_EMPTY_CELL
@ VTK_EMPTY_CELL
PACMAN::CellType::VTK_QUADRATIC_TETRA
@ VTK_QUADRATIC_TETRA
PACMAN::CellType::VTK_QUADRATIC_EDGE
@ VTK_QUADRATIC_EDGE
PACMAN::CellType::VTK_QUADRATIC_QUAD
@ VTK_QUADRATIC_QUAD
PACMAN::CellType::VTK_HEXAHEDRON
@ VTK_HEXAHEDRON
PACMAN::CellType::VTK_WEDGE
@ VTK_WEDGE
PACMAN::CellType::VTK_QUAD
@ VTK_QUAD
PACMAN::CellType::VTK_QUADRATIC_PYRAMID
@ VTK_QUADRATIC_PYRAMID
PACMAN::CellType::VTK_QUADRATIC_TRIANGLE
@ VTK_QUADRATIC_TRIANGLE
PACMAN::CellType::VTK_QUADRATIC_WEDGE
@ VTK_QUADRATIC_WEDGE
PACMAN::CellType::VTK_LINE
@ VTK_LINE
PACMAN::CellType::VTK_TETRA
@ VTK_TETRA
PACMAN::CellType::VTK_TRIANGLE
@ VTK_TRIANGLE
PACMAN::is_kokkos_view
Definition
concepts.hpp:17
src
common
types.hpp
Generated on Sat Jul 18 2026 00:03:16 for PACMAN by
1.9.8