Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::AlgPartition Class Reference

#include <AMReX_AlgPartition.H>

Public Member Functions

 AlgPartition ()
 Construct an empty partition that must be defined later.
 
 AlgPartition (Long global_size)
 Evenly partition global_size rows across all ranks.
 
 AlgPartition (Vector< Long > const &rows)
 Adopt an explicit prefix array rows describing local row extents.
 
 AlgPartition (Vector< Long > &&rows) noexcept
 Adopt an explicit prefix array rows, transferring ownership.
 
void define (Long global_size)
 Recompute an even partition spanning global_size rows.
 
void define (Vector< Long > const &rows)
 Replace the partition with the explicit prefix array rows.
 
void define (Vector< Long > &&rows)
 Replace the partition, taking ownership of rows.
 
bool empty () const
 True if the partition contains no rows.
 
Long operator[] (int i) const
 Starting global row index owned by rank i.
 
Long numGlobalRows () const
 Total number of rows covered by the partition.
 
int numActiveProcs () const
 Number of MPI ranks that own at least one row.
 
Vector< Long > const & dataVector () const
 Underlying prefix array describing row offsets (size nproc+1).
 
bool operator== (AlgPartition const &rhs) const noexcept
 Compare partitions for identical layouts.
 
bool operator!= (AlgPartition const &rhs) const noexcept
 Negation of operator==.
 

Constructor & Destructor Documentation

◆ AlgPartition() [1/4]

amrex::AlgPartition::AlgPartition ( )

Construct an empty partition that must be defined later.

◆ AlgPartition() [2/4]

amrex::AlgPartition::AlgPartition ( Long  global_size)
explicit

Evenly partition global_size rows across all ranks.

◆ AlgPartition() [3/4]

amrex::AlgPartition::AlgPartition ( Vector< Long > const &  rows)
explicit

Adopt an explicit prefix array rows describing local row extents.

◆ AlgPartition() [4/4]

amrex::AlgPartition::AlgPartition ( Vector< Long > &&  rows)
explicitnoexcept

Adopt an explicit prefix array rows, transferring ownership.

Member Function Documentation

◆ dataVector()

Vector< Long > const & amrex::AlgPartition::dataVector ( ) const
inline

Underlying prefix array describing row offsets (size nproc+1).

◆ define() [1/3]

void amrex::AlgPartition::define ( Long  global_size)

Recompute an even partition spanning global_size rows.

◆ define() [2/3]

void amrex::AlgPartition::define ( Vector< Long > &&  rows)

Replace the partition, taking ownership of rows.

◆ define() [3/3]

void amrex::AlgPartition::define ( Vector< Long > const &  rows)

Replace the partition with the explicit prefix array rows.

◆ empty()

bool amrex::AlgPartition::empty ( ) const
inline

True if the partition contains no rows.

◆ numActiveProcs()

int amrex::AlgPartition::numActiveProcs ( ) const
inline

Number of MPI ranks that own at least one row.

◆ numGlobalRows()

Long amrex::AlgPartition::numGlobalRows ( ) const
inline

Total number of rows covered by the partition.

◆ operator!=()

bool amrex::AlgPartition::operator!= ( AlgPartition const &  rhs) const
noexcept

Negation of operator==.

◆ operator==()

bool amrex::AlgPartition::operator== ( AlgPartition const &  rhs) const
noexcept

Compare partitions for identical layouts.

◆ operator[]()

Long amrex::AlgPartition::operator[] ( int  i) const
inline

Starting global row index owned by rank i.


The documentation for this class was generated from the following files: