Class OutflowCarrier

Class Documentation

class OutflowCarrier

GPU-side carrier for boundary-face outflow tally storage.

The carrier mirrors the OutflowBank’s contiguous host storage on the device and delegates boundary-face offset lookups to the bank.

Public Functions

OutflowCarrier(LBSProblem &lbs_problem)

Construct a device carrier for a problem’s outflow bank.

Note

The referenced outflow bank must outlive this carrier.

Parameters:

lbs_problemProblem that owns the host-side outflow bank.

void CopyToDevice()

Copy host outflow values to device storage.

void CopyFromDevice()

Copy device outflow values to host storage.

inline double *GetDevicePtr()

Return the base pointer to device outflow storage.

Returns:

Device pointer to the first outflow value, or null when no device storage exists.

std::uint64_t GetOffset(const std::uint32_t &cell_local_idx, const std::uint32_t &face_idx)

Return the first group offset for a boundary face.

Parameters:
  • cell_local_idxCell index local to the current process.

  • face_idxFace index local to the cell.

Throws:

std::out_of_range – If the cell-face pair does not identify a boundary face.

Returns:

Offset of the face’s first group value in device outflow storage.