Decomposes a regular (discrete or continuous) domain into even blocks; creates Links with Bounds along the way.
More...
#include <diy/decomposition.hpp>
|
|
typedef Bounds_ | Bounds |
| |
|
typedef BoundsValue< Bounds >::type | Coordinate |
| |
typedef RegularLinkSelector
< Bounds >::type | Link |
| |
|
using | Creator = std::function< void(int, Bounds, Bounds, Bounds, Link)> |
| |
|
using | Updater = std::function< void(int, int, Bounds, Bounds, Bounds, Link)> |
| |
|
typedef std::vector< bool > | BoolVector |
| |
|
typedef std::vector< Coordinate > | CoordinateVector |
| |
|
typedef std::vector< int > | DivisionsVector |
| |
|
| | RegularDecomposer (int dim_, const Bounds &domain_, int nblocks_, BoolVector share_face_=BoolVector(), BoolVector wrap_=BoolVector(), CoordinateVector ghosts_=CoordinateVector(), DivisionsVector divisions_=DivisionsVector()) |
| |
|
void | decompose (int rank, const Assigner &assigner, const Creator &create) |
| |
|
void | decompose (int rank, const Assigner &assigner, Master &master, const Updater &update) |
| |
|
void | decompose (int rank, const Assigner &assigner, Master &master) |
| |
|
template<class Point > |
| int | lowest_gid (const Point &p) const |
| |
|
void | gid_to_coords (int gid, DivisionsVector &coords) const |
| |
|
int | coords_to_gid (const DivisionsVector &coords) const |
| |
|
void | fill_divisions (std::vector< int > &divisions) const |
| |
| void | fill_bounds (Bounds &bounds, const DivisionsVector &coords, bool add_ghosts=false) const |
| | Gets the bounds, with or without ghosts, for a block specified by its block coordinates. More...
|
| |
| void | fill_bounds (Bounds &bounds, int gid, bool add_ghosts=false) const |
| | Gets the bounds, with or without ghosts, for a block specified by its gid. More...
|
| |
|
template<class Point > |
| void | point_to_gids (std::vector< int > &gids, const Point &p) const |
| |
|
template<class Point > |
| int | point_to_gid (const Point &p) const |
| | returns gid of a block that contains the point; ignores ghosts
|
| |
|
template<class Point > |
| int | num_gids (const Point &p) const |
| |
|
template<class Point > |
| void | top_bottom (int &top, int &bottom, const Point &p, int axis) const |
| |
|
|
static bool | all (const std::vector< int > &v, int x) |
| |
|
static void | gid_to_coords (int gid, DivisionsVector &coords, const DivisionsVector &divisions) |
| |
|
static int | coords_to_gid (const DivisionsVector &coords, const DivisionsVector &divisions) |
| |
|
static void | factor (std::vector< unsigned > &factors, int n) |
| |
|
|
int | dim |
| |
|
Bounds | domain |
| |
|
int | nblocks |
| |
|
BoolVector | share_face |
| |
|
BoolVector | wrap |
| |
|
CoordinateVector | ghosts |
| |
|
DivisionsVector | divisions |
| |
template<class Bounds_>
struct diy::RegularDecomposer< Bounds_ >
Decomposes a regular (discrete or continuous) domain into even blocks; creates Links with Bounds along the way.
- Examples:
- decomposition/regular-decomposer-long.cpp, decomposition/regular-decomposer-short.cpp, reduce/all-to-all.cpp, reduce/merge-reduce.cpp, reduce/sort.cpp, and reduce/swap-reduce.cpp.
template<class Bounds_>
| diy::RegularDecomposer< Bounds_ >::RegularDecomposer |
( |
int |
dim_, |
|
|
const Bounds & |
domain_, |
|
|
int |
nblocks_, |
|
|
BoolVector |
share_face_ = BoolVector(), |
|
|
BoolVector |
wrap_ = BoolVector(), |
|
|
CoordinateVector |
ghosts_ = CoordinateVector(), |
|
|
DivisionsVector |
divisions_ = DivisionsVector() |
|
) |
| |
|
inline |
- Parameters
-
| dim | dimensionality of the decomposition |
| domain | bounds of global domain |
| nblocks | total number of global blocks |
| share_face | indicates dimensions on which to share block faces |
| wrap | indicates dimensions on which to wrap the boundary |
| ghosts | indicates how many ghosts to use in each dimension |
| divisions | indicates how many cuts to make along each dimension (0 means "no constraint," i.e., leave it up to the algorithm) |
The documentation for this struct was generated from the following file: