include/pops/runtime/config/runtime_params.hpp Source FileΒΆ

adc_cpp: include/pops/runtime/config/runtime_params.hpp Source File
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
runtime_params.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <pops/core/foundation/types.hpp> // Real, POPS_HD (device-callable)
4
5#include <cstddef>
6
26
27namespace pops {
28
32inline constexpr int kMaxRuntimeParams = 32;
33
39 int count = 0;
41
44 POPS_HD Real get(int k) const { return values[k]; }
45};
46
47} // namespace pops
48
49// (P7-b) DSL runtime params: see test_dsl_runtime_params.py
Definition amr_hierarchy.hpp:29
double Real
Definition types.hpp:30
constexpr int kMaxRuntimeParams
Maximum number of runtime parameters per DSL block.
Definition runtime_params.hpp:32
FLAT carrier (fixed size, by value) of the runtime parameter values of a block.
Definition runtime_params.hpp:38
Real values[kMaxRuntimeParams]
Definition runtime_params.hpp:40
int count
Definition runtime_params.hpp:39
POPS_HD Real get(int k) const
Value of the runtime parameter at index k.
Definition runtime_params.hpp:44
Base scalar types and the POPS_HD macro (host+device portability).
#define POPS_HD
Definition types.hpp:25