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
14namespace PACMAN {
15typedef double fp_t;
16typedef double coordinates_t;
17
18typedef int32_t int_t;
22
23// types optionnels pour expliciter le type sous jacent des enums
28
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
40 OUTSIDE,
41 NEAREST,
42 INTER,
43 EXTRAP,
44 CLAMP,
45};
46
48
49 NA,
50 POINT,
51 LINE,
53 QUAD,
54 TETRA,
56 WEDGE,
57 PYRAMID,
58};
59
60enum class CellType : cell_t {
61
62 // Isoparametric 0D
65 // Isoparametric 1D
68 // Isoparametric 2D
73 // Isoparametric 3D
82};
83
84namespace fp_consts {
86 return KokkosKernels::ArithTraits<fp_t>::min();
87}
88
90 return KokkosKernels::ArithTraits<fp_t>::max();
91}
93 return static_cast<fp_t>(0.0);
94}
96 return static_cast<fp_t>(1.0);
97}
98KOKKOS_INLINE_FUNCTION consteval fp_t epsilon(void) { return 1.0e-14; }
99// LCOV_EXCL_START
100constexpr unsigned int precision = std::numeric_limits<fp_t>::max_digits10;
101inline auto set_precision(void) {
102 return std::setprecision(fp_consts::precision);
103}
104// LCOV_EXCL_STOP
105}; // namespace fp_consts
106
107} // namespace PACMAN
KOKKOS_INLINE_FUNCTION consteval fp_t zero(void)
Definition types.hpp:92
constexpr unsigned int precision
Definition types.hpp:100
KOKKOS_INLINE_FUNCTION consteval fp_t epsilon(void)
Definition types.hpp:98
auto set_precision(void)
Definition types.hpp:101
KOKKOS_INLINE_FUNCTION fp_t max(void)
Definition types.hpp:89
KOKKOS_INLINE_FUNCTION consteval fp_t one(void)
Definition types.hpp:95
KOKKOS_INLINE_FUNCTION fp_t min(void)
Definition types.hpp:85
double fp_t
Definition types.hpp:15
double coordinates_t
Definition types.hpp:16
TransferStatus
Definition types.hpp:39
int32_t geosupport_t
Definition types.hpp:27
int32_t status_t
Definition types.hpp:26
int32_t cell_t
Definition types.hpp:25
uint32_t index_t
Definition types.hpp:20
int32_t offset_t
Definition types.hpp:21
GeoSupport
Definition types.hpp:47
int32_t shortint_t
Definition types.hpp:19
TransferMethods
Definition types.hpp:29
int32_t method_t
Definition types.hpp:24
int32_t int_t
Definition types.hpp:18
CellType
Definition types.hpp:60