template<unsigned int dim, typename T, template< typename > class layout_base, typename Memory>
class ie_loc_ghost< dim, T, layout_base, Memory >
structure that store and compute the internal and external local ghost box
- Template Parameters
-
dim | is the dimensionality of the physical domain we are going to decompose. |
T | type of the space we decompose, Real, Integer, Complex ... |
- See also
- CartDecomposition
Definition at line 27 of file ie_loc_ghost.hpp.
|
void | create (openfpm::vector< SpaceBox< dim, T >, Memory, layout_base > &sub_domains, Box< dim, T > &domain, Ghost< dim, T > &ghost, const size_t(&bc)[dim]) |
| Create external and internal local ghosts.
|
|
| ie_loc_ghost () |
| Default constructor.
|
|
| ie_loc_ghost (const ie_loc_ghost< dim, T, layout_base, Memory > &ilg) |
| Constructor from another ie_loc_ghost.
|
|
| ie_loc_ghost (ie_loc_ghost< dim, T, layout_base, Memory > &&ilg) |
| Constructor from temporal ie_loc_ghost.
|
|
ie_loc_ghost< dim, T, layout_base, Memory > & | operator= (const ie_loc_ghost< dim, T, layout_base, Memory > &ilg) |
| copy the ie_loc_ghost
|
|
ie_loc_ghost< dim, T, layout_base, Memory > & | operator= (ie_loc_ghost< dim, T, layout_base, Memory > &&ilg) |
| copy the ie_loc_ghost
|
|
template<template< typename > class layout_base2, typename Memory2 > |
ie_loc_ghost< dim, T, layout_base, Memory > & | operator= (const ie_loc_ghost< dim, T, layout_base2, Memory2 > &ilg) |
| copy the ie_loc_ghost
|
|
template<template< typename > class layout_base2, typename Memory2 > |
ie_loc_ghost< dim, T, layout_base, Memory > & | operator= (ie_loc_ghost< dim, T, layout_base2, Memory2 > &&ilg) |
| copy the ie_loc_ghost
|
|
openfpm::vector< lBox_dom< dim, T > > & | private_get_loc_ghost_box () |
| Get the internal loc_ghost_box.
|
|
size_t | getNLocalSub () |
| Get the number of local ghost boxes.
|
|
size_t | getLocalNEGhost (size_t id) |
| Get the number of external local ghost box for each sub-domain.
|
|
size_t | getLocalNIGhost (size_t id) |
| Get the number of internal local ghost box for each sub-domain.
|
|
size_t | getLocalIGhostE (size_t i, size_t j) |
| For the sub-domain i intersected with a surrounding sub-domain enlarged j. Produce a internal ghost box from the prospecive of i and an associated external ghost box from the prospective of j. In order to retrieve the information about the external ghost box we have to use getLocalEGhostBox(x,k). where k is the value returned by getLocalIGhostE(i,j) and x is the value returned by getLocalIGhostSub(i,j)
|
|
const ::Box< dim, T > & | getLocalIGhostBox (size_t i, size_t j) const |
| Get the j internal local ghost box for the i sub-domain.
|
|
const comb< dim > & | getLocalIGhostPos (size_t i, size_t j) const |
| Get the j internal local ghost box boundary position for the i sub-domain of the local processor.
|
|
const ::Box< dim, T > & | getLocalEGhostBox (size_t i, size_t j) const |
| Get the j external local ghost box for the local processor.
|
|
const comb< dim > & | getLocalEGhostPos (size_t i, size_t j) const |
| Get the j external local ghost box for the local processor.
|
|
size_t | getLocalIGhostSub (size_t i, size_t k) const |
| Considering that sub-domains has N internal local ghost box identified with the 0 <= k < N that come from the intersection of 2 sub-domains i and j where j is enlarged, given the sub-domain i and the id k of the internal box, it return the id j of the other sub-domain that produced the intersection.
|
|
size_t | getLocalEGhostSub (size_t i, size_t k) const |
| Considering that sub-domains has N external local ghost box identified with the 0 <= k < N that come from the intersection of 2 sub-domains i and j where i is enlarged, given the sub-domain i and the id k of the external box, it return the id of the other sub-domain j that produced the intersection.
|
|
bool | write (std::string output, size_t p_id) const |
| Write the decomposition as VTK file.
|
|
bool | check_consistency (size_t n_sub) |
| function to check the consistency of the information of the decomposition
|
|
bool | is_equal (ie_loc_ghost< dim, T, layout_base, Memory > &ilg) |
| Check if the ie_loc_ghosts contain the same information.
|
|
bool | is_equal_ng (ie_loc_ghost< dim, T, layout_base, Memory > &ilg) |
| Check if the ie_loc_ghosts contain the same information with the exception of the ghost part.
|
|
void | reset () |
| Reset the ie_loc_ghost.
|
|
|
void | create_loc_ghost_ebox (Ghost< dim, T > &ghost, openfpm::vector< SpaceBox< dim, T >, Memory, layout_base > &sub_domains, openfpm::vector< Box_loc_sub< dim, T > > &sub_domains_prc) |
| Create the external local ghost boxes.
|
|
void | create_loc_ghost_ibox (Ghost< dim, T > &ghost, openfpm::vector< SpaceBox< dim, T >, Memory, layout_base > &sub_domains, openfpm::vector< Box_loc_sub< dim, T > > &sub_domains_prc) |
| Create the internal local ghost boxes.
|
|
void | applyBC (openfpm::vector< Box_loc_sub< dim, T > > &sub_domains, const Box< dim, T > &domain, const Ghost< dim, T > &ghost, const size_t(&bc)[dim]) |
| In case of periodic boundary conditions we replicate the sub-domains at the border.
|
|
void | add_subdomain (const Box_loc_sub< dim, T > &bx) |
| add sub-domains to a temporal list
|
|
void | flush (openfpm::vector< Box_loc_sub< dim, T > > &sub_domains) |
| Flush the temporal added sub-domain to the sub-domain list.
|
|
template<unsigned int dim, typename T , template< typename > class layout_base, typename Memory >
const comb< dim > & ie_loc_ghost< dim, T, layout_base, Memory >::getLocalIGhostPos |
( |
size_t |
i, |
|
|
size_t |
j |
|
) |
| const |
|
inline |
Get the j internal local ghost box boundary position for the i sub-domain of the local processor.
- Note
- For the sub-domain i intersected with the sub-domain j enlarged, the associated external ghost box is located in getLocalIGhostBox(j,k) with getLocalIGhostSub(j,k) == i
To get k use getLocalIGhostE
- See also
- getLocalIGhostE
Some of the intersection boxes has special position, because they are at the boundary, this function return their position at the border
[1,1]
+---------+------------------------+---------+
| (1,-1) | | (1,1) |
| | | (1,0) --> 7 | | |
| v | | v |
| 6 | | 8 |
+--------------------------------------------+
| | | |
| | | |
| | | |
| (-1,0) | | (1,0) |
| | | | | |
| v | (0,0) --> 4 | v |
| 3 | | 5 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+--------------------------------------------+
| (-1,-1) | | (-1,1) |
| | | (-1,0) --> 1 | | |
| v | | v |
| 0 | | 2 |
+---------+------------------------+---------+
- Parameters
-
- Returns
- the box
Definition at line 475 of file ie_loc_ghost.hpp.
template<unsigned int dim, typename T , template< typename > class layout_base, typename Memory >
bool ie_loc_ghost< dim, T, layout_base, Memory >::write |
( |
std::string |
output, |
|
|
size_t |
p_id |
|
) |
| const |
|
inline |
Write the decomposition as VTK file.
The function generate several files
5) local_internal_ghost_X.vtk internal local ghost boxes for the local processor (X) 6) local_external_ghost_X.vtk external local ghost boxes for the local processor (X)
where X is the local processor rank
- Parameters
-
output | directory where to write the files |
p_id | id of the local processor |
- Returns
- true if the file is written correctly
local_internal_ghost_X.vtk internal local ghost boxes for the local processor (X)
local_external_ghost_X.vtk external local ghost boxes for the local processor (X)
Definition at line 549 of file ie_loc_ghost.hpp.