This class calculate processor domains and neighborhood of each processor domain. More...
This class calculate processor domains and neighborhood of each processor domain.
dim | Dimensionality |
Definition at line 21 of file Domain_NN_calculator_cart.hpp.
#include <Domain_NN_calculator_cart.hpp>
Public Member Functions | |
void | setParameters (const Box< dim, long int > &proc_box) |
Set parameters to calculate the cell neighborhood. | |
void | setNNParameters (openfpm::vector<::Box< dim, size_t > > &loc_box, const grid_key_dx< dim > &shift, const grid_sm< dim, void > &gs) |
Set parameters to calculate the cell neighborhood. | |
openfpm::vector< size_t > & | getDomainCells () |
Get the domain Cells. | |
openfpm::vector< size_t > & | getCRSDomainCells () |
Get the domain Cells. | |
openfpm::vector< subsub_lin< dim > > & | getCRSAnomDomainCells () |
Get the domain anomalous cells. | |
void | reset () |
In case you have to recompute the indexes. | |
Private Member Functions | |
void | CalculateDomAndAnomCells (openfpm::vector< subsub< dim > > &sub_keys, openfpm::vector< grid_key_dx< dim > > &dom_subsub, openfpm::vector< grid_key_dx< dim > > &dom_cells, const ::Box< dim, long int > &proc_box, const openfpm::vector<::Box< dim, size_t > > &loc_box) |
Calculate the subdomain that are in the skin part of the domain. | |
void | linearize_subsub (const openfpm::vector< subsub< dim > > &anom, openfpm::vector< subsub_lin< dim > > &anom_lin, const grid_key_dx< dim > &shift, const grid_sm< dim, void > &gs) |
Linearize the sub-sub-domains ids. | |
Private Attributes | |
bool | are_domain_anom_computed |
True if domain and anomalous domain cells are computed. | |
openfpm::vector< subsub< dim > > | anom |
anomalous cell neighborhood for CRS | |
openfpm::vector< subsub_lin< dim > > | anom_lin |
Set of anomalous CRS domain cells linearized. | |
openfpm::vector< grid_key_dx< dim > > | dom |
Set of normal domain cells for CRS. | |
openfpm::vector< size_t > | dom_lin |
Set of normal CRS domain cells linearized. | |
openfpm::vector< grid_key_dx< dim > > | dom_cells |
Set of domain cells. | |
openfpm::vector< size_t > | dom_cells_lin |
Set of linearized domain cells. | |
Box< dim, long int > | proc_box |
Processor box. | |
grid_sm< dim, void > | gs |
Processor cells-grid. | |
grid_key_dx< dim > | one |
key with all coordinates set to one | |
|
inline |
Definition at line 250 of file Domain_NN_calculator_cart.hpp.
|
inlineprivate |
Calculate the subdomain that are in the skin part of the domain.
+---+---+---+---+---+---+ | 1 | 2 | 3 | 4 | 5 | 6 | +---+---+---+---+---+---+ |27 | | 7 | +---+ +---+ |26 | | 8 | +---+ +---+ |25 | | 9 | +---+ DOM1 +---+ |24 | |10 | +---+ +---+ |23 | |11 | +---+ +---+ |22 | |12 | +---+-----------+---+---+ |21 | |13 | +---+ +---+ |20 | DOM2 |14 | +---+---+---+---+---+ |19 |18 |17 | 16|15 | +---+---+---+---+---+ <----- Domain end here | ^ | |_____________|
In some cases like symmetric with CRS Scheme The cells indicated with numbers has a non straigh-forward neighborhood. This function calculate the list of the domain cells with normal symmetric neighborhood type and compute a list of cells with more complex neighboring cells.
sub_keys | array that contain the position of the sub-sub-domains indicated with numbers in grid coordinates + for each its neighboring cells |
dom_cells | list of all the domain cells |
dom_subsub | cells with normal neighborhood |
loc_box | array of local sub-sub-domain in grid coordinates |
proc_box | Processor bounding box in local coordinates |
Definition at line 108 of file Domain_NN_calculator_cart.hpp.
|
inline |
Get the domain anomalous cells.
Definition at line 328 of file Domain_NN_calculator_cart.hpp.
|
inline |
Get the domain Cells.
Definition at line 317 of file Domain_NN_calculator_cart.hpp.
|
inline |
Get the domain Cells.
Definition at line 306 of file Domain_NN_calculator_cart.hpp.
|
inlineprivate |
Linearize the sub-sub-domains ids.
A subsub domain can be identified by a set of number (i,j). The linearization transform it into a number
anom | set of grid keys to linearize |
anom_lin | linearized output |
shift | shifting to add for the linearizaton |
gs | information about the grid to linearize |
Definition at line 212 of file Domain_NN_calculator_cart.hpp.
|
inline |
In case you have to recompute the indexes.
Definition at line 338 of file Domain_NN_calculator_cart.hpp.
|
inline |
Set parameters to calculate the cell neighborhood.
loc_box | set of local sub-domains |
shift | to apply in the linearization |
gs | grid of cells (for the processor domain) |
Definition at line 272 of file Domain_NN_calculator_cart.hpp.
|
inline |
Set parameters to calculate the cell neighborhood.
proc_box | processor cells box |
Definition at line 260 of file Domain_NN_calculator_cart.hpp.
|
private |
anomalous cell neighborhood for CRS
Definition at line 29 of file Domain_NN_calculator_cart.hpp.
|
private |
Set of anomalous CRS domain cells linearized.
Definition at line 32 of file Domain_NN_calculator_cart.hpp.
|
private |
True if domain and anomalous domain cells are computed.
Definition at line 24 of file Domain_NN_calculator_cart.hpp.
|
private |
Set of normal domain cells for CRS.
Definition at line 35 of file Domain_NN_calculator_cart.hpp.
|
private |
Set of domain cells.
Definition at line 43 of file Domain_NN_calculator_cart.hpp.
|
private |
Set of linearized domain cells.
Definition at line 46 of file Domain_NN_calculator_cart.hpp.
|
private |
Set of normal CRS domain cells linearized.
Definition at line 38 of file Domain_NN_calculator_cart.hpp.
|
private |
Processor cells-grid.
Definition at line 54 of file Domain_NN_calculator_cart.hpp.
|
private |
key with all coordinates set to one
Definition at line 57 of file Domain_NN_calculator_cart.hpp.
|
private |
Processor box.
Definition at line 51 of file Domain_NN_calculator_cart.hpp.