Class AngleAggregation

Class Documentation

class AngleAggregation

Angle aggregation partitions the directions of a quadrature into angle sets.

All directions in an angle set share one SPDS (sweep ordering), so the set is swept together. The AngleAggregationType determines the partition:

  • SINGLE: one direction per angle set.

  • POLAR: directions with the same azimuthal angle in the same polar hemisphere.

  • AZIMUTHAL: the inward or outward directions of a curvilinear direction set, in angular order.

  • QUADRANT: directions in the same quadrant (same signs of Omega_x and Omega_y), on a 2D orthogonal mesh.

  • OCTANT: directions in the same octant (same signs of Omega_x, Omega_y, and Omega_z), on a 3D orthogonal mesh.

On an orthogonal mesh, directions in the same quadrant/octant have the same orientation (incoming or outgoing) on every face.

The angle sets of a groupset are stored in a flat list (GetAngleSetGroups()) that the sweep scheduler iterates over.

Public Types

using iterator = std::vector<std::shared_ptr<AngleSet>>::iterator
using const_iterator = std::vector<std::shared_ptr<AngleSet>>::const_iterator

Public Functions

AngleAggregation(const LBSGroupset &groupset, std::map<uint64_t, std::shared_ptr<SweepBoundary>> &boundaries, std::shared_ptr<AngularQuadrature> &quadrature, std::shared_ptr<Mesh> &grid, bool csda_enabled)
inline iterator begin()
inline iterator end()
inline const_iterator begin() const
inline const_iterator end() const
inline std::shared_ptr<AngleSet> operator[](std::size_t idx) const
inline std::vector<std::shared_ptr<AngleSet>> &GetAngleSetGroups()
inline const std::vector<std::shared_ptr<AngleSet>> &GetAngleSetGroups() const
inline std::size_t GetNumAngleSets() const
inline const std::map<uint64_t, std::shared_ptr<SweepBoundary>> &GetSimBoundaries() const
inline std::shared_ptr<AngularQuadrature> GetQuadrature() const
inline CoordinateSystemType GetCoordinateSystem() const
inline int GetGroupsetID() const
void ZeroOutgoingDelayedPsi()

Resets all the outgoing intra-location and inter-location cyclic interfaces.

void ZeroIncomingDelayedPsi()

Resets all the incoming intra-location and inter-location cyclic interfaces.

void ResetAngleSetDependencies()

Resets dependencies between anglesets.

void SetupAngleSetDependencies()

Establishes dependencies between anglesets for reflecting boundaries and cylindrical geometry.

inline const std::map<AngleSet*, std::set<AngleSet*>> &GetFollowingAngleSetsMap() const

Returns a map of following angle sets per angle set.

void BuildDirnumToAnglesetMap()

Builds the map from direction number to angleset pointer.

inline AngleSet *GetAngleSetForAngleIndex(std::uint32_t angle_idx) const

Gets the angle set for a given angle index.

std::pair<size_t, size_t> GetNumDelayedAngularDOFs()

Returns a pair of numbers containing the number of delayed angular unknowns both locally and globally, respectively.

void AppendNewDelayedAngularDOFsToArray(int64_t &index, double *x_ref)

Assembles angular unknowns into the reference vector.

void AppendOldDelayedAngularDOFsToArray(int64_t &index, double *x_ref)

Assembles angular unknowns into the reference vector.

void SetOldDelayedAngularDOFsFromArray(int64_t &index, const double *x_ref)

Assembles angular unknowns into the reference vector.

void SetNewDelayedAngularDOFsFromArray(int64_t &index, const double *x_ref)

Assembles angular unknowns into the reference vector.

std::vector<double> GetNewDelayedAngularDOFsAsSTLVector()

Gets the current values of the angular unknowns as an STL vector.

void SetNewDelayedAngularDOFsFromSTLVector(const std::vector<double> &stl_vector)

Gets the current values of the angular unknowns as an STL vector.

std::vector<double> GetOldDelayedAngularDOFsAsSTLVector()

Gets the current values of the angular unknowns as an STL vector.

void SetOldDelayedAngularDOFsFromSTLVector(const std::vector<double> &stl_vector)

Gets the current values of the angular unknowns as an STL vector.

std::uint64_t GetDelayedAngularDOFLayoutFingerprint() const

Returns a 64-bit fingerprint of the rank-local layout of the delayed angular unknowns, the order of the values that GetOldDelayedAngularDOFsAsSTLVector returns.

It covers the local cells in order, each boundary’s delayed unknown count and direction-to-slot map, and for each angle set that has delayed unknowns its directions, group count, local feedback arc set, delayed location dependencies and delayed buffer sizes. Two aggregations with equal fingerprints store their delayed unknowns in the same order. The value is the same on every platform and build (FNV-1a over 64-bit integers).

void SetDelayedPsiOld2New()

Copies the old delayed angular fluxes to the new.

void SetDelayedPsiNew2Old()

Copies the new delayed angular fluxes to the old.

void CorrectNewDelayedAngularFlux(const FLUDS::DelayedFluxCorrection &correction)

Adds an isotropic nodal correction to every new delayed angular flux of this groupset: the lagged incoming fluxes of opposing reflecting boundaries and of broken cyclic dependencies within and between locations.

std::vector<double> MapNodalValuesToDelayedAngularDOFs(const FLUDS::DelayedFluxCorrection &nodal_value)

Returns a vector laid out like GetNewDelayedAngularDOFsAsSTLVector() that holds, for every delayed angular flux and CSDA energy slope, the nodal value at the face node of the cell that reads it, for its group.

Not collective. The delayed angular fluxes are unchanged on return.