Class AAH_SPDS

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class AAH_SPDS : public opensn::SPDS

Public Functions

AAH_SPDS(int id, const Vector3 &omega, std::shared_ptr<MeshContinuum> grid, const SPDSFaceNeighborInfoVec &face_neighbor_info, bool allow_cycles, bool use_gpus = false)

Creates a sweep-plane data structure (SPDS) for the given direction and grid.

Parameters:
  • id – The unique identifier for this SPDS.

  • omega – The angular direction for the sweep operation.

  • grid – The grid on which the sweep is performed.

  • face_neighbor_info – Cached neighbor information for every local cell face.

  • allow_cycles – Whether cycles are allowed in the local and global sweep dependency graphs.

  • use_gpus – Whether to allocate device memory for GPU acceleration.

inline int GetId() const

Returns the id of this SPDS.

inline bool AllowCycles() const

Returns true if this SPDS is allowed to remove local and global sweep cycles.

inline int GetLocationDepth() const

Return this location’s depth in the global sweep graph for DOG scheduling.

GlobalSweepMetadata BuildGlobalSweepMetadata()

Builds the global sweep metadata on the graph-owning rank.

void SetGlobalSweepMetadata(int location_depth, std::vector<int> delayed_dependencies, std::vector<int> delayed_successors)

Installs the metadata needed by this rank.

void CopySPLSDataOnDevice()

Copies the levelized SPLS data on device.

void FreeDeviceData()

Free the memory on GPU.

inline std::uint32_t *GetDeviceLevelVector(std::size_t level) const

Get level vector on device.

std::vector<std::pair<int, double>> ComputeLocalLocationEdgeWeights() const

Returns non-zero outgoing edge weights as (destination, weight) pairs.

inline void SetGlobalEdges(std::vector<GlobalSweepEdge> edges)

Sets the sparse global sweep graph edges.

~AAH_SPDS() override

Destructor.

struct GlobalSweepEdge

Public Members

int dependency
int location
double weight
struct GlobalSweepMetadata

Public Members

std::vector<int> location_depths
std::vector<std::vector<int>> delayed_dependencies
std::vector<std::vector<int>> delayed_successors