Class AngleSet

Inheritance Relationships

Derived Types

Class Documentation

class AngleSet

Subclassed by opensn::AAHD_AngleSet, opensn::AAH_AngleSet, opensn::CBCD_AngleSet, opensn::CBC_AngleSet

Public Functions

AngleSet(size_t id, const LBSGroupset &groupset, const SPDS &spds, std::shared_ptr<FLUDS> &fluds, const std::vector<size_t> &angle_indices, std::map<uint64_t, std::shared_ptr<SweepBoundary>> &boundaries)
inline size_t GetID() const

Returns the angleset’s unique id.

inline int GetGroupsetID() const

Returns the associated groupset id.

inline const SPDS &GetSPDS() const

Returns a reference to the associated spds.

inline FLUDS &GetFLUDS()

Returns a reference to the associated fluds_.

inline std::vector<std::uint32_t> &GetAngleIndices()

Returns the angle indices associated with this angleset.

inline const std::vector<std::uint32_t> &GetAngleIndices() const

Returns the angle indices associated with this angleset.

inline std::map<uint64_t, std::shared_ptr<SweepBoundary>> &GetBoundaries()

Returns the angle indices associated with this angleset.

inline unsigned int GetNumGroups() const
inline size_t GetNumAngles() const
bool HasAngleIndex(std::uint32_t angle_index) const
void UpdateSweepDependencies(std::set<AngleSet*> &following_angle_sets)

Update following angle sets.

inline virtual AsynchronousCommunicator *GetCommunicator()
virtual void InitializeDelayedUpstreamData() = 0

Initializes delayed upstream data.

This method gets called when a sweep scheduler is constructed.

virtual int GetMaxBufferMessages() const = 0

Returns the maximum buffer size from the sweepbuffer.

virtual void SetMaxBufferMessages(int new_max) = 0

Sets the maximum buffer size for the sweepbuffer.

virtual AngleSetStatus AngleSetAdvance(SweepChunk &sweep_chunk, AngleSetStatus permission) = 0

This function advances the work stages of an angleset.

virtual AngleSetStatus FlushSendBuffers() = 0
virtual void ResetSweepBuffers() = 0

Resets the sweep buffer.

void ResetNumDependencies()

Resets number of dependencies.

inline void ResetDependencyCounter()

Resets dependency counter.

inline bool IsDependencyResolved() const

Checks if dependency is resolved.

inline void DecrementCounter()
virtual bool ReceiveDelayedData() = 0

Instructs the sweep buffer to receive delayed data.

inline const double *PsiBoundary(uint64_t boundary_id, unsigned int angle_num, uint64_t cell_local_id, unsigned int face_num, unsigned int fi, unsigned int g, bool surface_source_active)

Returns a pointer to a boundary flux data.

inline double *PsiReflected(uint64_t boundary_id, unsigned int angle_num, uint64_t cell_local_id, unsigned int face_num, unsigned int fi)

Returns a pointer to outbound reflected flux data.

inline virtual void SyncDeviceAngleIndices()

Update the angle index data on the device to match the host.

virtual ~AngleSet() = default

Protected Attributes

const size_t id_
const int groupset_id_
const unsigned int num_groups_
const SPDS &spds_
std::shared_ptr<FLUDS> fluds_
std::vector<std::uint32_t> angles_
std::map<uint64_t, std::shared_ptr<SweepBoundary>> &boundaries_
bool executed_ = false
std::size_t num_dependencies_ = 0

Number of anglesets the current angle set depends on.

std::size_t dependency_counter_ = 0

Counter for un-resolved dependencies.

std::vector<AngleSet*> following_angle_sets_

List of angle sets waiting after this angle set.

After this angle set completes its sweep chunk, it decrements the counter of the angle sets waiting after it to allow them to proceed.