CoupledSourceKernel Struct ReferenceΒΆ

adc_cpp: pops::CoupledSourceKernel Struct 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
pops::CoupledSourceKernel Struct Reference

Device functor applying ONE coupled source over a box: captures the PODs by VALUE (input/output Array4, programs, constants) -> device-clean. More...

#include <coupled_source_program.hpp>

+ Collaboration diagram for pops::CoupledSourceKernel:

Public Member Functions

POPS_HD void operator() (int i, int j) const
 

Public Attributes

Array4 in [kCsMaxReg]
 
int in_comp [kCsMaxReg]
 
int n_in = 0
 
Real consts [kCsMaxReg]
 
int n_const = 0
 
Array4 out [kCsMaxTerms]
 
int out_comp [kCsMaxTerms]
 
CsProgram prog [kCsMaxTerms]
 
int n_terms = 0
 
Real dt = Real(0)
 

Detailed Description

Device functor applying ONE coupled source over a box: captures the PODs by VALUE (input/output Array4, programs, constants) -> device-clean.

operator()(i, j) loads the registers, evaluates each term and WRITES additively out[t] += dt * S_t (forward-Euler split). All terms are evaluated on the state AT THE START of the step (frozen reg) before the writes.

Member Function Documentation

◆ operator()()

POPS_HD void pops::CoupledSourceKernel::operator() ( int  i,
int  j 
) const
inline

Member Data Documentation

◆ consts

Real pops::CoupledSourceKernel::consts[kCsMaxReg]

◆ dt

Real pops::CoupledSourceKernel::dt = Real(0)

◆ in

Array4 pops::CoupledSourceKernel::in[kCsMaxReg]

◆ in_comp

int pops::CoupledSourceKernel::in_comp[kCsMaxReg]

◆ n_const

int pops::CoupledSourceKernel::n_const = 0

◆ n_in

int pops::CoupledSourceKernel::n_in = 0

◆ n_terms

int pops::CoupledSourceKernel::n_terms = 0

◆ out

Array4 pops::CoupledSourceKernel::out[kCsMaxTerms]

◆ out_comp

int pops::CoupledSourceKernel::out_comp[kCsMaxTerms]

◆ prog

CsProgram pops::CoupledSourceKernel::prog[kCsMaxTerms]

The documentation for this struct was generated from the following file: