Class AAHCellSweepData
Defined in File aah_cell_sweep_data.h
Nested Relationships
Nested Types
Class Documentation
-
class AAHCellSweepData
Contiguous copies of the local cell data that the CPU AAH sweep kernels read.
On an unstructured mesh every angle set holds one direction, so a sweep visits each cell once per direction and reads its data from memory each time. Reading it from a few contiguous arrays instead of the cell, its mapping, and its unit matrices, which are separate heap objects, takes fewer memory accesses. The data depends only on the mesh and the discretization, so the problem builds it once and every groupset shares it. The values are copies of the unit cell matrices, so the kernels compute exactly what they computed from the originals.
Public Functions
-
AAHCellSweepData(const Mesh &grid, const SpatialDiscretization &discretization, const std::vector<UnitCellMatrices> &unit_cell_matrices, const std::vector<CellLBSView> &cell_transport_views, unsigned int num_moments, unsigned int num_groups)
Builds the data of every local cell.
The flux moments of a node are num_moments times num_groups values, so a cell’s first node is its phi address divided by that product.
-
inline const Face *GetFaces(const Cell &cell) const
The cell’s faces, in the order of the cell’s faces.
-
inline const Vector3 *GetGradientMatrix(const Cell &cell) const
Entry (i, j) of the cell’s integral of shape function i times the gradient of shape function j, at index i * num_nodes + j.
-
inline const double *GetMassMatrix(const Cell &cell) const
Entry (i, j) of the cell’s mass matrix, at index i * num_nodes + j.
-
struct Cell
A cell.
Public Members
-
std::size_t first_node = 0
Index of the cell’s first node in the scalar flux moments, the cell’s phi address divided by the number of moments and groups.
-
std::size_t face_offset = 0
Start of the cell’s faces in the face array.
-
std::size_t vector_offset = 0
Start of the cell’s gradient matrix in the vector array.
-
std::size_t scalar_offset = 0
Start of the cell’s mass matrix in the scalar array.
-
std::uint32_t num_nodes = 0
-
std::uint32_t num_faces = 0
-
std::size_t first_node = 0
-
struct Face
A face of a cell.
Public Members
-
std::uint64_t neighbor_id = 0
Global id of the neighbor cell, or the boundary id of a boundary face.
-
std::size_t scalar_offset = 0
Start of the face’s surface mass matrix and shape integrals in the scalar array.
-
std::size_t node_offset = 0
Start of the face’s node mapping in the face-node array.
-
std::uint32_t num_nodes = 0
Number of nodes of the face.
-
bool has_neighbor = false
Whether the face has a neighbor cell, that is, is not on a boundary.
-
bool is_local = false
Whether the neighbor cell is on this rank.
-
std::uint64_t neighbor_id = 0
-
AAHCellSweepData(const Mesh &grid, const SpatialDiscretization &discretization, const std::vector<UnitCellMatrices> &unit_cell_matrices, const std::vector<CellLBSView> &cell_transport_views, unsigned int num_moments, unsigned int num_groups)