Class CBC_FLUDS

Inheritance Relationships

Base Type

Class Documentation

class CBC_FLUDS : public opensn::FLUDS

Flux data structures (FLUDS) specific to the cell-by-cell (CBC) sweep algorithm.

This class manages the storage and access of angular flux data during a CBC sweep

It provides methods to access:

  • Upwind angular flux data from local neighbor cells

  • Storage locations for downwind angular flux data for the current cell

  • Upwind angular flux data received from remote MPI ranks

Public Types

using CellFaceKey = std::pair<uint64_t, unsigned int>

Public Functions

CBC_FLUDS(unsigned int num_groups, size_t num_angles, const CBC_FLUDSCommonData &common_data, const UnknownManager &psi_uk_man, const SpatialDiscretization &sdm)
virtual const FLUDSCommonData &GetCommonData() const
double *UpwindPsi(const Cell &face_neighbor, unsigned int adj_cell_node, size_t as_ss_idx)

Given a local upwind neighbor cell, a node index on this cell, and an angleset subset index, this function returns a pointer to the start of the group data for the specified node and angle.

double *OutgoingPsi(const Cell &cell, unsigned int cell_node, size_t as_ss_idx)

Given a local cell, a node index on this cell, and an angleset subset index, this function returns a pointer to the start of the group data for the specified node and angle for writing its just solved angular fluxes.

double *NLUpwindPsi(uint64_t cell_global_id, unsigned int face_id, unsigned int face_node_mapped, size_t as_ss_idx)

Given a remote upwind cell’s global ID, a face ID on this cell, a node index on this face, and an angleset subset index, this function returns a pointer to the start of the group data for the specified face node and angle.

double *NLOutgoingPsi(std::vector<double> *psi_nonlocal_outgoing, size_t face_node, size_t as_ss_idx)

Given a pointer to a vector holding the non-local outgoing psi data for a face, a node index on this face, and an angleset subset index, this function returns a pointer to the start of the group data for the specified face node and angle.

inline virtual void ClearLocalAndReceivePsi() override
inline virtual void ClearSendPsi() override
inline virtual void AllocateInternalLocalPsi() override
inline virtual void AllocateOutgoingPsi() override
inline virtual void AllocateDelayedLocalPsi() override
inline virtual void AllocatePrelocIOutgoingPsi() override
inline virtual void AllocateDelayedPrelocIOutgoingPsi() override
inline std::map<CellFaceKey, std::vector<double>> &GetDeplocsOutgoingMessages()

Protected Attributes

const CBC_FLUDSCommonData &common_data_
const UnknownManager &psi_uk_man_
const SpatialDiscretization &sdm_
size_t num_angles_in_gs_quadrature_
size_t num_quadrature_local_dofs_
size_t num_local_spatial_dofs_
size_t local_psi_data_size_
std::vector<double> local_psi_data_

Layout for storage for local angular fluxes: spatial DOF major -> angle in angleset major -> group in groupset major.

std::vector<std::vector<double>> boundryI_incoming_psi_
std::map<CellFaceKey, std::vector<double>> deplocs_outgoing_messages_