Class FLUDS

Inheritance Relationships

Derived Types

Class Documentation

class FLUDS

Subclassed by opensn::AAHD_FLUDS, opensn::AAH_FLUDS, opensn::CBCD_FLUDS, opensn::CBC_FLUDS

Public Types

using DelayedFluxCorrection = std::function<double(std::uint32_t, unsigned int, unsigned int, unsigned int)>

Isotropic nodal correction: (cell local id, face, face node, group index within the groupset) -> value added to the angular flux in every direction.

using DelayedCurrentTally = std::function<void(std::uint32_t, unsigned int, unsigned int, unsigned int, double)>

Receives a nodal inward partial current, indexed by (cell local id, face, face node, group index within the groupset).

Public Functions

inline FLUDS(unsigned int num_groups, size_t num_angles, const SPDS &spds)
inline const SPDS &GetSPDS() const
inline virtual void ClearLocalAndReceivePsi()
inline virtual void ClearSendPsi()
inline virtual void AllocateInternalLocalPsi()
inline virtual void AllocateOutgoingPsi()
inline virtual void AllocateDelayedLocalPsi()
inline virtual void AllocatePrelocIOutgoingPsi()
inline virtual void AllocateDelayedPrelocIOutgoingPsi()
inline std::span<double> &DelayedLocalPsi()
inline std::span<double> &DelayedLocalPsiOld()
inline std::span<double> &DelayedLocalPsiE()
inline std::span<double> &DelayedLocalPsiEOld()
inline virtual void SetDelayedLocalPsiOldToNew()
inline virtual void SetDelayedLocalPsiNewToOld()
inline std::vector<std::span<double>> &DeplocIOutgoingPsi()
inline std::vector<std::span<double>> &DeplocIOutgoingPsiE()
inline std::vector<std::span<double>> &PrelocIOutgoingPsi()
inline std::vector<std::span<double>> &PrelocIOutgoingPsiE()
inline std::vector<std::span<double>> &DelayedPrelocIOutgoingPsi()
inline std::vector<std::span<double>> &DelayedPrelocIOutgoingPsiE()
inline std::vector<std::span<double>> &DelayedPrelocIOutgoingPsiOld()
inline std::vector<std::span<double>> &DelayedPrelocIOutgoingPsiEOld()
inline virtual void SetDelayedOutgoingPsiOldToNew()
inline virtual void SetDelayedOutgoingPsiNewToOld()
inline bool HasDelayedAngularFlux() const

Whether this FLUDS stores delayed (lagged) angular fluxes, within or between locations.

inline virtual void CorrectNewDelayedAngularFlux(const DelayedFluxCorrection&)

Adds an isotropic nodal correction to every new (latest-iterate) delayed angular flux, that is, to the lagged values the next sweep reads where a cyclic dependency was broken, within this location or between locations.

The correction is evaluated at the face node of the downwind cell that reads the value.

A FLUDS type that stores delayed angular fluxes must override this. The default accepts only a FLUDS without them and otherwise throws, so that lagged fluxes of a type that does not implement the correction fail loudly instead of keeping an error that re-enters on the next sweep.

inline virtual void AddToNewDelayedAngularSlope(const DelayedFluxCorrection &correction)

Adds a nodal value, as CorrectNewDelayedAngularFlux does, to every new delayed CSDA energy-slope value.

The default has no delayed energy slopes.

inline virtual void TallyDelayedIncomingCurrent(const AngularQuadrature&, const std::vector<std::uint32_t>&, bool, const DelayedCurrentTally&) const

Passes to tally, for every incoming face node of a cell that reads delayed angular fluxes (a cyclic dependency broken within this location or between locations) and every groupset group, the inward partial current \( -\sum_n w_n (\Omega_n \cdot \hat{n}) \delta\psi_n \) of those fluxes over the directions of this FLUDS, with \(\hat{n}\) the outward normal of the face of the reading cell.

angle_indices are the directions of quadrature held by this FLUDS, in its storage order. \(\delta\psi_n\) is the new delayed value minus the old one when subtract_old is true (after a sweep: the change of the upwind flux that the sweep did not see) and the new delayed value otherwise.

A FLUDS type that stores delayed angular fluxes must override this. The default accepts only a FLUDS without them and otherwise throws.

virtual ~FLUDS() = default

Protected Attributes

const unsigned int num_groups_
const size_t num_angles_
const size_t num_groups_and_angles_
const SPDS &spds_
std::span<double> delayed_local_psi_view_
std::span<double> delayed_local_psi_old_view_
std::span<double> delayed_local_psiE_view_
std::span<double> delayed_local_psiE_old_view_
std::vector<std::span<double>> deplocI_outgoing_psi_view_
std::vector<std::span<double>> deplocI_outgoing_psiE_view_
std::vector<std::span<double>> prelocI_outgoing_psi_view_
std::vector<std::span<double>> prelocI_outgoing_psiE_view_
std::vector<std::span<double>> delayed_prelocI_outgoing_psi_view_
std::vector<std::span<double>> delayed_prelocI_outgoing_psi_old_view_
std::vector<std::span<double>> delayed_prelocI_outgoing_psiE_view_
std::vector<std::span<double>> delayed_prelocI_outgoing_psiE_old_view_