Class SweepChunk

Inheritance Relationships

Derived Types

Class Documentation

class SweepChunk

Sweep work function.

Subclassed by opensn::AAHSweepChunk, opensn::AAHSweepChunkRZ, opensn::CBCSweepChunk

Public Types

using MomentCallbackFunc = std::function<void(SweepChunk *sweeper, AngleSet *angle_set)>

Convenient typdef for the moment call back function. See moment_callbacks.

Public Functions

inline SweepChunk(std::vector<double> &destination_phi, std::vector<double> &destination_psi, const std::shared_ptr<MeshContinuum> &grid, const SpatialDiscretization &discretization, const std::vector<UnitCellMatrices> &unit_cell_matrices, std::vector<CellLBSView> &cell_transport_views, const std::vector<double> &densities, const std::vector<double> &source_moments, const LBSGroupset &groupset, const std::map<int, std::shared_ptr<MultiGroupXS>> &xs, int num_moments, int max_num_cell_dofs)
inline virtual void Sweep(AngleSet &angle_set)

Sweep chunks should override this.

inline virtual void SetAngleSet(AngleSet &angle_set)

Sets the currently active angleset.

inline virtual void SetCell(Cell const *cell_ptr, AngleSet &angle_set)

For cell-by-cell methods or computing the residual on a single cell.

virtual ~SweepChunk() = default
void ZeroDestinationPhi()

Zero the portion of the output flux moments vector corresponding to the groupset for this sweep chunk.

inline void ZeroDestinationPsi()

Sets all elements of the output angular flux vector to zero.

inline void SetBoundarySourceActiveFlag(bool flag_value)

Activates or deactives the surface src flag.

inline bool IsSurfaceSourceActive() const

Returns the surface src-active flag.

Public Members

std::vector<MomentCallbackFunc> moment_callbacks

Functions of type MomentCallbackFunc can be added to the moment_callbacks vector and these can be called from within functions taking a LBSGroupset instance. The intention is that this function can be used as a general interface to retrieve angular flux values

Protected Attributes

const std::shared_ptr<MeshContinuum> grid_
const SpatialDiscretization &discretization_
const std::vector<UnitCellMatrices> &unit_cell_matrices_
std::vector<CellLBSView> &cell_transport_views_
const std::vector<double> &densities_
const std::vector<double> &source_moments_
const LBSGroupset &groupset_
const std::map<int, std::shared_ptr<MultiGroupXS>> &xs_
const int num_moments_
const int max_num_cell_dofs_
const bool save_angular_flux_
const size_t groupset_angle_group_stride_
const size_t groupset_group_stride_
std::vector<double> &destination_phi_
std::vector<double> &destination_psi_
bool surface_source_active_ = false