include/pops/core/foundation/types.hpp File ReferenceΒΆ

adc_cpp: include/pops/core/foundation/types.hpp File Reference
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
types.hpp File Reference

Base scalar types and the POPS_HD macro (host+device portability). More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pops
 

Macros

#define POPS_HD
 

Typedefs

using pops::Real = double
 

Variables

constexpr Real pops::kCflSpeedFloor = Real(1e-30)
 Speed FLOOR for the CFL step policies (audit 2026-06, explicit constant instead of the scattered literal 1e-30): w = max(reduced_speed, kCflSpeedFloor) avoids the division by zero when a block has no wave (frozen transport / null field).
 

Detailed Description

Base scalar types and the POPS_HD macro (host+device portability).

Minimal foundation with no external dependency; the switch to pde_core::Real waits for the distributed mesh.

Real: centralized double alias. All numerical computation uses it; do not write double directly in the physics layer or the kernels.

POPS_HD: annotation for functions called inside Kokkos kernels on host AND device.

  • Kokkos: KOKKOS_FUNCTION (portable Cuda/HIP/SYCL/CPU, without manual CUDA syntax). KOKKOS_FUNCTION is preferred over KOKKOS_INLINE_FUNCTION so as not to add an implicit inline on sites already marked POPS_HD inline ....
  • Direct CUDA/HIP (without Kokkos): host device.
  • Pure CPU: empty expansion. INVARIANT: POPS_HD can only wrap device-clean code (no host object, no std::vector, no vtable).

Macro Definition Documentation

◆ POPS_HD

#define POPS_HD