Provides regular decomposition of the domain.
void create(int gid,
const Bounds& core,
const Bounds& bounds,
const Bounds& domain,
diy::RegularDecomposer<Bounds>::BoolVector share_face;
diy::RegularDecomposer<Bounds>::BoolVector wrap;
diy::RegularDecomposer<Bounds>::CoordinateVector ghosts;
domain,
nblocks,
share_face,
wrap,
ghosts);
decomposer.decompose(world.rank(),
assigner,
create);
decomposer.decompose(world.rank(),
assigner,
[&](int gid,
const Bounds& core,
const Bounds& bounds,
const Bounds& domain,
const RCLink& link)
{
Block* b = new Block;
RGLink* l = new RGLink(link);
int lid = master.add(gid, b, l);
});
decomposer.decompose(world.rank(),
assigner,
master);
|
| template<class Bounds > |
| void | diy::decompose (int dim, int rank, const Bounds &domain, const Assigner &assigner, const typename RegularDecomposer< Bounds >::Creator &create, typename RegularDecomposer< Bounds >::BoolVector share_face=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::BoolVector wrap=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::CoordinateVector ghosts=typename RegularDecomposer< Bounds >::CoordinateVector(), typename RegularDecomposer< Bounds >::DivisionsVector divs=typename RegularDecomposer< Bounds >::DivisionsVector()) |
| | Decomposes the domain into a prescribed pattern of blocks. More...
|
| |
| template<class Bounds > |
| void | diy::decompose (int dim, int rank, const Bounds &domain, const Assigner &assigner, Master &master, typename RegularDecomposer< Bounds >::BoolVector share_face=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::BoolVector wrap=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::CoordinateVector ghosts=typename RegularDecomposer< Bounds >::CoordinateVector(), typename RegularDecomposer< Bounds >::DivisionsVector divs=typename RegularDecomposer< Bounds >::DivisionsVector()) |
| | Decomposes the domain into a prescribed pattern of blocks. More...
|
| |
| void | diy::decompose (int rank, const Assigner &assigner, Master &master) |
| | A "null" decompositon that simply creates the blocks and adds them to the master. More...
|
| |
| template<class Bounds > |
| void | diy::decompose (int dim, int rank, const Bounds &domain, const Assigner &assigner, Master &master, const typename RegularDecomposer< Bounds >::Updater &update, typename RegularDecomposer< Bounds >::BoolVector share_face=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::BoolVector wrap=typename RegularDecomposer< Bounds >::BoolVector(), typename RegularDecomposer< Bounds >::CoordinateVector ghosts=typename RegularDecomposer< Bounds >::CoordinateVector(), typename RegularDecomposer< Bounds >::DivisionsVector divs=typename RegularDecomposer< Bounds >::DivisionsVector()) |
| | Add a decomposition (modify links) of an existing set of blocks that were added to the master previously. More...
|
| |
| void | diy::RegularDecomposer< Bounds_ >::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 | diy::RegularDecomposer< Bounds_ >::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 Bounds >
| void diy::decompose |
( |
int |
dim, |
|
|
int |
rank, |
|
|
const Bounds & |
domain, |
|
|
const Assigner & |
assigner, |
|
|
const typename RegularDecomposer< Bounds >::Creator & |
create, |
|
|
typename RegularDecomposer< Bounds >::BoolVector |
share_face = typename RegularDecomposer<Bounds>::BoolVector(), |
|
|
typename RegularDecomposer< Bounds >::BoolVector |
wrap = typename RegularDecomposer<Bounds>::BoolVector(), |
|
|
typename RegularDecomposer< Bounds >::CoordinateVector |
ghosts = typename RegularDecomposer<Bounds>::CoordinateVector(), |
|
|
typename RegularDecomposer< Bounds >::DivisionsVector |
divs = typename RegularDecomposer<Bounds>::DivisionsVector() |
|
) |
| |
Decomposes the domain into a prescribed pattern of blocks.
- Parameters
-
| dim | dimension of the domain |
| rank | local rank |
| assigner | decides how processors are assigned to blocks (maps a gid to a rank) also communicates the total number of blocks |
| create | the callback functor |
| wrap | indicates dimensions on which to wrap the boundary |
| ghosts | indicates how many ghosts to use in each dimension |
| divs | indicates how many cuts to make along each dimension (0 means "no constraint," i.e., leave it up to the algorithm) |
create(...) is called with each block assigned to the local domain. See decomposition example.
- Examples:
- decomposition/test-decomposition.cpp, decomposition/test-direct-master.cpp, and reduce/all-done.cpp.
template<class Bounds >
| void diy::decompose |
( |
int |
dim, |
|
|
int |
rank, |
|
|
const Bounds & |
domain, |
|
|
const Assigner & |
assigner, |
|
|
Master & |
master, |
|
|
typename RegularDecomposer< Bounds >::BoolVector |
share_face = typename RegularDecomposer<Bounds>::BoolVector(), |
|
|
typename RegularDecomposer< Bounds >::BoolVector |
wrap = typename RegularDecomposer<Bounds>::BoolVector(), |
|
|
typename RegularDecomposer< Bounds >::CoordinateVector |
ghosts = typename RegularDecomposer<Bounds>::CoordinateVector(), |
|
|
typename RegularDecomposer< Bounds >::DivisionsVector |
divs = typename RegularDecomposer<Bounds>::DivisionsVector() |
|
) |
| |
Decomposes the domain into a prescribed pattern of blocks.
- Parameters
-
| dim | dimension of the domain |
| rank | local rank |
| assigner | decides how processors are assigned to blocks (maps a gid to a rank) also communicates the total number of blocks |
| master | gets the blocks once this function returns |
| wrap | indicates dimensions on which to wrap the boundary |
| ghosts | indicates how many ghosts to use in each dimension |
| divs | indicates how many cuts to make along each dimension (0 means "no constraint," i.e., leave it up to the algorithm) |
master must have been supplied a create function in order for this function to work.
| void diy::decompose |
( |
int |
rank, |
|
|
const Assigner & |
assigner, |
|
|
Master & |
master |
|
) |
| |
|
inline |
A "null" decompositon that simply creates the blocks and adds them to the master.
- Parameters
-
| rank | local rank |
| assigner | decides how processors are assigned to blocks (maps a gid to a rank) also communicates the total number of blocks |
| master | gets the blocks once this function returns |
template<class Bounds >
| void diy::decompose |
( |
int |
dim, |
|
|
int |
rank, |
|
|
const Bounds & |
domain, |
|
|
const Assigner & |
assigner, |
|
|
Master & |
master, |
|
|
const typename RegularDecomposer< Bounds >::Updater & |
update, |
|
|
typename RegularDecomposer< Bounds >::BoolVector |
share_face = typename RegularDecomposer<Bounds>::BoolVector(), |
|
|
typename RegularDecomposer< Bounds >::BoolVector |
wrap = typename RegularDecomposer<Bounds>::BoolVector(), |
|
|
typename RegularDecomposer< Bounds >::CoordinateVector |
ghosts = typename RegularDecomposer<Bounds>::CoordinateVector(), |
|
|
typename RegularDecomposer< Bounds >::DivisionsVector |
divs = typename RegularDecomposer<Bounds>::DivisionsVector() |
|
) |
| |
Add a decomposition (modify links) of an existing set of blocks that were added to the master previously.
- Parameters
-
| rank | local rank |
| assigner | decides how processors are assigned to blocks (maps a gid to a rank) also communicates the total number of blocks |
template<class Bounds >
| void diy::RegularDecomposer< Bounds >::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.
- Parameters
-
| bounds | (output) bounds |
| coords | coordinates of the block in the decomposition |
| add_ghosts | whether to include ghosts in the output bounds |
template<class Bounds >
| void diy::RegularDecomposer< Bounds >::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.
- Parameters
-
| bounds | (output) bounds |
| gid | global id of the block |
| add_ghosts | whether to include ghosts in the output bounds |