Class TotalXSCarrier
Defined in File total_xs_carrier.h
Inheritance Relationships
Base Type
public opensn::Carrier
(Class Carrier)
Class Documentation
-
class TotalXSCarrier : public opensn::Carrier
Object managing the total cross section map on GPU.
For each block ID, group-wise total cross sections are stored side-by-side in device memory. The constructor initializes a map to record the stride associated with each block ID.
Public Functions
-
TotalXSCarrier(LBSProblem &lbs_problem)
Constructor from a fully initialized LBS problem.
-
double *GetXSGPUData(int block_id)
Retrive the pointer to the total cross section data on GPU for a given block ID.
Public Members
-
std::uint32_t num_groups = UINT32_MAX
Number of groups.
-
std::uint32_t num_block_ids
Number of block IDs.
-
std::map<int, std::uint32_t> block_id_to_index
Map from block ID to flatten index.
Protected Functions
-
std::uint64_t ComputeSize(LBSProblem &lbs_problem)
Compute the memory size (in bytes) to allocate on the GPU to copy the cross section data over.
-
void Assemble(LBSProblem &lbs_problem)
Gather the total cross sections into a contiguous chunk of memory on the host before copying the data to the device.
-
TotalXSCarrier(LBSProblem &lbs_problem)