OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
ie_ghost< dim, T > Class Template Reference

structure that store and compute the internal and external local ghost box More...

Detailed Description

template<unsigned int dim, typename T>
class ie_ghost< dim, T >

structure that store and compute the internal and external local ghost box

Template Parameters
dimis the dimensionality of the physical domain we are going to decompose.
Ttype of the space we decompose, Real, Integer, Complex ...
See Also
CartDecomposition

Definition at line 25 of file ie_ghost.hpp.

#include <ie_ghost.hpp>

+ Inheritance diagram for ie_ghost< dim, T >:

Public Member Functions

 ie_ghost ()
 Default constructor.
 
 ie_ghost (const ie_ghost< dim, T > &ie)
 Copy constructor.
 
 ie_ghost (ie_ghost< dim, T > &&ie)
 Copy constructor.
 
ie_ghost< dim, T > & operator= (ie_ghost< dim, T > &&ie)
 Copy operator.
 
ie_ghost< dim, T > & operator= (const ie_ghost< dim, T > &ie)
 Copy operator.
 
const openfpm::vector< Point
< dim, T > > & 
getShiftVectors ()
 
size_t convertShift (const comb< dim > &cmb)
 
size_t getProcessorNIGhost (size_t id) const
 Get the number of Internal ghost boxes for one processor. More...
 
size_t getProcessorNEGhost (size_t id) const
 Get the number of External ghost boxes for one processor id. More...
 
const ::Box< dim, T > & getProcessorIGhostBox (size_t id, size_t j) const
 Get the j Internal ghost box for one processor. More...
 
const ::Box< dim, T > & getProcessorEGhostBox (size_t id, size_t j) const
 Get the j External ghost box. More...
 
const comb< dim > & getProcessorEGhostPos (size_t id, size_t j) const
 Get the j External ghost box sector. More...
 
const comb< dim > & getProcessorIGhostPos (size_t id, size_t j) const
 Get the ghost box sector of the external ghost box linked with the j internal ghost box. More...
 
size_t getProcessorIGhostId (size_t id, size_t j) const
 Get the j Internal ghost box id. More...
 
size_t getProcessorEGhostId (size_t id, size_t j) const
 Get the j External ghost box id. More...
 
size_t getProcessorIGhostSSub (size_t id, size_t j) const
 Get the sub-domain send-id at witch belong the internal ghost box. More...
 
size_t getProcessorIGhostSub (size_t id, size_t j) const
 Get the local sub-domain at witch belong the internal ghost box. More...
 
size_t getProcessorEGhostSub (size_t id, size_t j) const
 Get the local sub-domain at witch belong the external ghost box. More...
 
size_t getNIGhostBox () const
 Return the total number of the calculated internal ghost boxes. More...
 
const ::Box< dim, T > & getIGhostBox (size_t b_id) const
 Given the internal ghost box id, it return the internal ghost box. More...
 
size_t getIGhostBoxProcessor (size_t b_id) const
 Given the internal ghost box id, it return the near processor at witch belong or the near processor that produced this internal ghost box. More...
 
size_t getNEGhostBox () const
 Get the number of the calculated external ghost boxes. More...
 
inline::Box< dim, T > getEGhostBox (size_t b_id) const
 Given the external ghost box id, it return the external ghost box. More...
 
size_t getEGhostBoxProcessor (size_t b_id) const
 Given the external ghost box id, it return the near processor at witch belong or the near processor that produced this external ghost box. More...
 
auto getInternalIDBoxes (Point< dim, T > &p) -> decltype(geo_cell.getCellIterator(geo_cell.getCell(p)))
 
auto labelPoint (Point< dim, T > &p) -> decltype(geo_cell.getCellIterator(geo_cell.getCell(p)))
 if the point fall into the ghost of some near processor it return the processors id's in which it fall More...
 
template<typename id1 , typename id2 >
const openfpm::vector
< std::pair< size_t, size_t > > 
ghost_processorID_pair (Point< dim, T > &p, const int opt=MULTIPLE)
 Given a position it return if the position belong to any neighborhood processor ghost (Internal ghost) More...
 
template<typename id >
const openfpm::vector< size_t > ghost_processorID (const Point< dim, T > &p, const int opt=MULTIPLE)
 Given a position it return if the position belong to any neighborhood processor ghost (Internal ghost) More...
 
template<typename id1 , typename id2 , typename Mem >
const openfpm::vector
< std::pair< size_t, size_t > > & 
ghost_processorID_pair (const encapc< 1, Point< dim, T >, Mem > &p, const int opt=MULTIPLE)
 Given a position it return if the position belong to any neighborhood processor ghost (Internal ghost) More...
 
template<typename id , typename Mem >
const openfpm::vector< size_t > & ghost_processorID (const encapc< 1, Point< dim, T >, Mem > &p, const int opt=MULTIPLE)
 Given a position it return if the position belong to any neighborhood processor ghost (Internal ghost) More...
 
bool write (std::string output, size_t p_id) const
 write the information about the ghost in vtk format More...
 
bool is_equal (ie_ghost< dim, T > &ig)
 Check if the ie_ghosts contain the same information. More...
 
bool is_equal_ng (ie_ghost< dim, T > &ig)
 Check if the ie_loc_ghosts contain the same information with the exception of the ghost part It is anyway required that the ghost come from the same sub-domains decomposition. More...
 
void reset ()
 Reset the nn_prcs structure. More...
 

Protected Member Functions

void generateShiftVectors (const Box< dim, T > &domain, size_t(&bc)[dim])
 Here we generare the shift vectors. More...
 
void Initialize_geo_cell (const Box< dim, T > &domain, const size_t(&div)[dim])
 Initialize the geo cell list structure. More...
 
void create_box_nn_processor_ext (Vcluster &v_cl, Ghost< dim, T > &ghost, openfpm::vector< SpaceBox< dim, T >> &sub_domains, const openfpm::vector< openfpm::vector< long unsigned int > > &box_nn_processor, const nn_prcs< dim, T > &nn_p)
 Create the box_nn_processor_int (bx part) structure. More...
 
void create_box_nn_processor_int (Vcluster &v_cl, Ghost< dim, T > &ghost, openfpm::vector< SpaceBox< dim, T >> &sub_domains, const openfpm::vector< openfpm::vector< long unsigned int > > &box_nn_processor, const nn_prcs< dim, T > &nn_p)
 Create the box_nn_processor_int (nbx part) structure, the geo_cell list and proc_int_box. More...
 

Private Member Functions

size_t link_ebx_ibx (const nn_prcs< dim, T > &nn_p, size_t p_id, size_t i)
 Given a local sub-domain i, it give the id of such sub-domain in the sent list for the processor p_id. More...
 
size_t ebx_ibx_form (size_t k, size_t b, size_t p_id, const comb< dim > &c, size_t N_b, Vcluster &v_cl, const bool ei)
 This is the external and internal ghost box link formula. More...
 

Private Attributes

openfpm::vector
< openfpm::vector< Box_proc
< dim, T > > > 
box_nn_processor_int
 
openfpm::vector< Box_dom< dim,
T > > 
proc_int_box
 It store the same information of box_nn_processor_int organized by processor id.
 
openfpm::vector< p_box< dim, T > > vb_ext
 External ghost boxes for this processor.
 
openfpm::vector< p_box< dim, T > > vb_int
 Internal ghost boxes for this processor domain.
 
CellList< dim, T, Mem_fast
<>, shift< dim, T > > 
geo_cell
 Cell-list that store the geometrical information of the internal ghost boxes.
 
openfpm::vector< Point< dim, T > > shifts
 shift vectors
 
openfpm::vector< std::pair
< size_t, size_t > > 
ids_p
 Temporal buffers to return temporal information for ghost_processorID.
 
openfpm::vector< size_t > ids
 Temporal buffers to return temporal information.
 
shift_vect_converter< dim, T > sc_convert
 shift converter
 

Member Function Documentation

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::convertShift ( const comb< dim > &  cmb)
inline

It return the converted shift vector

In high dimensions the number of shifts vectors explode exponentially, so we are expecting that some of the boundary is non periodic to reduce the numbers of shift vectors

Returns
the shift vectors

Definition at line 521 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
void ie_ghost< dim, T >::create_box_nn_processor_ext ( Vcluster v_cl,
Ghost< dim, T > &  ghost,
openfpm::vector< SpaceBox< dim, T >> &  sub_domains,
const openfpm::vector< openfpm::vector< long unsigned int > > &  box_nn_processor,
const nn_prcs< dim, T > &  nn_p 
)
inlineprotected

Create the box_nn_processor_int (bx part) structure.

For each sub-domain of the local processor it store the intersection between the enlarged sub-domain of the calling processor with the adjacent processors sub-domains (External ghost box)

Parameters
v_clVirtual cluster
ghostmargins
sub_domainsvector of local sub-domains
box_nn_processorit will store for each sub-domain the near processors
nn_pcontain the sub-domains of the near processors
Note
Are the G8_0 G9_0 G9_1 G5_0 boxes in calculateGhostBoxes
See Also
calculateGhostBoxes

Definition at line 195 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
void ie_ghost< dim, T >::create_box_nn_processor_int ( Vcluster v_cl,
Ghost< dim, T > &  ghost,
openfpm::vector< SpaceBox< dim, T >> &  sub_domains,
const openfpm::vector< openfpm::vector< long unsigned int > > &  box_nn_processor,
const nn_prcs< dim, T > &  nn_p 
)
inlineprotected

Create the box_nn_processor_int (nbx part) structure, the geo_cell list and proc_int_box.

This structure store for each sub-domain of this processors the boxes that come from the intersection of the near processors sub-domains enlarged by the ghost size (Internal ghost box). These boxes fill a geometrical cell list. The proc_int_box store the same information ordered by near processors

Parameters
v_clVirtual cluster
ghostmargins
sub_domains
box_nn_processorsub-domains of the near processors
nn_pstructure that store the near processor sub-domains
Note
Are the B8_0 B9_0 B9_1 B5_0 boxes in calculateGhostBoxes
See Also
calculateGhostBoxes

Definition at line 296 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::ebx_ibx_form ( size_t  k,
size_t  b,
size_t  p_id,
const comb< dim > &  c,
size_t  N_b,
Vcluster v_cl,
const bool  ei 
)
inlineprivate

This is the external and internal ghost box link formula.

This formula is pretty important and require an extensive explanation

+------------+
|            |
|            +---+---------+
| Processor 5|   |         |
|            | E | Proc 6  |
|  Sub 0     | 0 |         |
|            | _ | Sub 9   |
|            | 9 |         |
|            |   |         |
|            +---+---------+
|            |
+------------+

* 

E0_6 is an external ghost box from the prospective of processor 5 and an internal ghost boxes from the prospective of processor 6. So for every external ghost box that processor 5 compute, exist an internal ghost box in processor 6

Here we link this information with an unique id, for processor 5 and 6. Consider Processor 5 sending to processor 6 its sub-domains, including the one in figure with id 0 in the list, and receive from processor 6 the sub-domain in figure as id 9. Consider also we have 16 processor. E0_9 come from the intersection of the expanded sub-domain 0 with 9 (Careful the id is related to the send and receive position in the list) and the intersection is in the sector 0

The id of the external box (for processor 5) is calculated as

((k * N_b + b) * v_cl.getProcessingUnits() + p_id) * openfpm::math::pow(3,dim) + c.lin()

The parameter assume a different meaning if they the formula is used for calculating external/internal ghost boxes id

Parameters
kexpanded sub-domain sent/received to/from p_id ( 0 )
bsub-domain received/sent from/to p_id ( 9 )
p_idprocessor id ( 6 )
csector where the sub-domain b live
N_bnumber of sub-domain received/sent from/to p_id
v_clVcluster
eiindicate if the formula is used to calculate external (true) or internal (false) ids
Returns
id of the external/internal ghost
Note
To an explanation about the sectors see getShiftVectors

Definition at line 143 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
void ie_ghost< dim, T >::generateShiftVectors ( const Box< dim, T > &  domain,
size_t(&)  bc[dim] 
)
inlineprotected

Here we generare the shift vectors.

Parameters
domainbox that describe the domain

Definition at line 160 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
inline ::Box<dim,T> ie_ghost< dim, T >::getEGhostBox ( size_t  b_id) const
inline

Given the external ghost box id, it return the external ghost box.

Parameters
b_idexternal ghost box id
Returns
the external ghost box

Definition at line 720 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getEGhostBoxProcessor ( size_t  b_id) const
inline

Given the external ghost box id, it return the near processor at witch belong or the near processor that produced this external ghost box.

Parameters
b_idexternal ghost box id
Returns
the processor id of the external ghost box

Definition at line 733 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
const ::Box<dim,T>& ie_ghost< dim, T >::getIGhostBox ( size_t  b_id) const
inline

Given the internal ghost box id, it return the internal ghost box.

Parameters
b_idinternal ghost box id
Returns
the internal ghost box

Definition at line 685 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getIGhostBoxProcessor ( size_t  b_id) const
inline

Given the internal ghost box id, it return the near processor at witch belong or the near processor that produced this internal ghost box.

Parameters
b_idinternal ghost box id
Returns
the processor id of the ghost box

Definition at line 698 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
auto ie_ghost< dim, T >::getInternalIDBoxes ( Point< dim, T > &  p) -> decltype(geo_cell.getCellIterator(geo_cell.getCell(p)))
inline

/brief Given a point it return the set of boxes in which the point fall

Parameters
pPoint to check
Returns
An iterator with the id's of the internal boxes in which the point fall

Definition at line 745 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getNEGhostBox ( ) const
inline

Get the number of the calculated external ghost boxes.

Returns
the number of external ghost boxes

Definition at line 708 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getNIGhostBox ( ) const
inline

Return the total number of the calculated internal ghost boxes.

Returns
the number of internal ghost boxes

Definition at line 673 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
const ::Box<dim,T>& ie_ghost< dim, T >::getProcessorEGhostBox ( size_t  id,
size_t  j 
) const
inline

Get the j External ghost box.

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one external ghost box)
Returns
the box

Definition at line 567 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getProcessorEGhostId ( size_t  id,
size_t  j 
) const
inline

Get the j External ghost box id.

Every external ghost box has a linked internal ghost box, because they overlap and they must contain the same information (Think on a ghost_get). So if exist an internal ghost box with id x, exist also an external ghost box with id x

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one external ghost box)
Returns
the box

Definition at line 623 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
const comb<dim>& ie_ghost< dim, T >::getProcessorEGhostPos ( size_t  id,
size_t  j 
) const
inline

Get the j External ghost box sector.

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one external ghost box)
Returns
the sector

Definition at line 579 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getProcessorEGhostSub ( size_t  id,
size_t  j 
) const
inline

Get the local sub-domain at witch belong the external ghost box.

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one external ghost box)
Returns
sub-domain at which belong the external ghost box

Definition at line 663 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
const ::Box<dim,T>& ie_ghost< dim, T >::getProcessorIGhostBox ( size_t  id,
size_t  j 
) const
inline

Get the j Internal ghost box for one processor.

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one internal ghost box)
Returns
the box

Definition at line 555 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getProcessorIGhostId ( size_t  id,
size_t  j 
) const
inline

Get the j Internal ghost box id.

Every internal ghost box has a linked external ghost box, because they overlap and they must contain the same information (Think on a ghost_get). So if exist an internal ghost box with id x, exist also an external ghost box with id x

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one internal ghost box)
Returns
the box id

Definition at line 607 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
const comb<dim>& ie_ghost< dim, T >::getProcessorIGhostPos ( size_t  id,
size_t  j 
) const
inline

Get the ghost box sector of the external ghost box linked with the j internal ghost box.

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one internal ghost box)
Returns
the sector

Definition at line 591 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getProcessorIGhostSSub ( size_t  id,
size_t  j 
) const
inline

Get the sub-domain send-id at witch belong the internal ghost box.

The internal ghost box is create from the intersection a local sub-domain and an extended sub-domain communicated from another processor. This function return the id of the sub-domain in the receiving list

Parameters
idadjacent processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one internal ghost box)
Returns
sub-domain at which belong the internal ghost box

Definition at line 639 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getProcessorIGhostSub ( size_t  id,
size_t  j 
) const
inline

Get the local sub-domain at witch belong the internal ghost box.

Parameters
idadjacent processor list id (the id go from 0 to getNNProcessor())
jbox (each near processor can produce more than one internal ghost box)
Returns
sub-domain at which belong the internal ghost box

Definition at line 651 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getProcessorNEGhost ( size_t  id) const
inline

Get the number of External ghost boxes for one processor id.

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
Returns
the number of external ghost

Definition at line 543 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::getProcessorNIGhost ( size_t  id) const
inline

Get the number of Internal ghost boxes for one processor.

Parameters
idnear processor list id (the id go from 0 to getNNProcessor())
Returns
the number of internal ghost

Definition at line 532 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
const openfpm::vector<Point<dim,T> >& ie_ghost< dim, T >::getShiftVectors ( )
inline

It return the shift vector

Consider a domain with some ghost, at the border of the domain the ghost must be treated in a special way, depending on the periodicity of the boundary

                                                    [1,1]
    +---------+------------------------+---------+
    | (1,-1)  |                        | (1,1)   |
    |   |     |    (1,0) --> 7         |   |     |
    |   v     |                        |   v     |
    |   6     |                        |   8     |
    +--------------------------------------------+
    |         |                        |         |
    |         |                        |         |
    |         |                        |         |
    | (-1,0)  |                        | (1,0)   |
    |    |    |                        |   |     |
    |    v    |      (0,0) --> 4       |   v     |
    |    3    |                        |   5     |
    |         |                        |         |
  B |         |                        |     A   |
 *  |         |                        |    *    |
    |         |                        |         |
    |         |                        |         |
    |         |                        |         |
    +--------------------------------------------+
    | (-1,-1) |                        | (-1,1)  |
    |    |    |   (-1,0) --> 1         |    |    |
    |    v    |                        |    v    |
    |    0    |                        |    2    |
    +---------+------------------------+---------+

if a particle is bound in (1,0) linearized to 5, before communicate this particle (A in figure) must be shifted on -1.0 on x (B in figure)

This function return the set of shift vectors that determine such shift, for example in the example above the shift at position 5 will be (0,-1.0)

Returns
the shift vectors

Definition at line 507 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
template<typename id >
const openfpm::vector<size_t> ie_ghost< dim, T >::ghost_processorID ( const Point< dim, T > &  p,
const int  opt = MULTIPLE 
)
inline

Given a position it return if the position belong to any neighborhood processor ghost (Internal ghost)

if the particle come from an internal ghost from the periodicity of the domain, position must be shifted this function return the id of the shift vector

See Also
getShiftVector
Template Parameters
idtype of id to get box_id processor_id lc_processor_id shift_id
Parameters
pParticle position
optintersection boxes of the same processor can overlap, so in general the function can produce more entry with the same processor, the UNIQUE option eliminate double entries (UNIQUE) is for particle data (MULTIPLE) is for grid data [default MULTIPLE]
Returns
the processor ids

Definition at line 828 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
template<typename id , typename Mem >
const openfpm::vector<size_t>& ie_ghost< dim, T >::ghost_processorID ( const encapc< 1, Point< dim, T >, Mem > &  p,
const int  opt = MULTIPLE 
)
inline

Given a position it return if the position belong to any neighborhood processor ghost (Internal ghost)

Template Parameters
idtype of if to get box_id processor_id lc_processor_id
Parameters
pParticle position
optit indicate if the entry in the vector must be unique or not
Returns
the processor ids

Definition at line 915 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
template<typename id1 , typename id2 >
const openfpm::vector<std::pair<size_t,size_t> > ie_ghost< dim, T >::ghost_processorID_pair ( Point< dim, T > &  p,
const int  opt = MULTIPLE 
)
inline

Given a position it return if the position belong to any neighborhood processor ghost (Internal ghost)

if the particle come from an internal ghost from the periodicity of the domain, position must be shifted this function return the id of the shift vector

See Also
getShiftVector
Template Parameters
idtype of id to get box_id processor_id lc_processor_id shift_id
Parameters
pParticle position
optintersection boxes of the same processor can overlap, so in general the function can produce more entry with the same processor, the UNIQUE option eliminate double entries (UNIQUE) is for particle data (MULTIPLE) is for grid data [default MULTIPLE]
Returns
return the processor ids (not the rank, the id in the near processor list)

Definition at line 779 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
template<typename id1 , typename id2 , typename Mem >
const openfpm::vector<std::pair<size_t,size_t> >& ie_ghost< dim, T >::ghost_processorID_pair ( const encapc< 1, Point< dim, T >, Mem > &  p,
const int  opt = MULTIPLE 
)
inline

Given a position it return if the position belong to any neighborhood processor ghost (Internal ghost)

Template Parameters
id1first index type to get box_id processor_id lc_processor_id
id2second index type to get box_id processor_id lc_processor_id
Parameters
pParticle position
optindicate if the entries in the vector must be unique
Returns
a vector of pair containing the requested information

Definition at line 872 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
void ie_ghost< dim, T >::Initialize_geo_cell ( const Box< dim, T > &  domain,
const size_t(&)  div[dim] 
)
inlineprotected

Initialize the geo cell list structure.

The geo cell list structure exist to speed up the labelling the points if they fall on some internal ghost

Parameters
domainwhere the cell list is defined
divnumber of division of the cell list

Definition at line 174 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
bool ie_ghost< dim, T >::is_equal ( ie_ghost< dim, T > &  ig)
inline

Check if the ie_ghosts contain the same information.

Parameters
igElement to check
Returns
true if they are equal

Definition at line 993 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
bool ie_ghost< dim, T >::is_equal_ng ( ie_ghost< dim, T > &  ig)
inline

Check if the ie_loc_ghosts contain the same information with the exception of the ghost part It is anyway required that the ghost come from the same sub-domains decomposition.

Parameters
igElement to check
Returns
true if they are equal

Definition at line 1058 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
auto ie_ghost< dim, T >::labelPoint ( Point< dim, T > &  p) -> decltype(geo_cell.getCellIterator(geo_cell.getCell(p)))
inline

if the point fall into the ghost of some near processor it return the processors id's in which it fall

Parameters
pPoint
Returns
iterator of the processors id's

Definition at line 757 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
size_t ie_ghost< dim, T >::link_ebx_ibx ( const nn_prcs< dim, T > &  nn_p,
size_t  p_id,
size_t  i 
)
inlineprivate

Given a local sub-domain i, it give the id of such sub-domain in the sent list for the processor p_id.

Processor 5 send its sub-domains to processor 6 and will receive the list from 6

This function search if a local sub-domain has been sent to a processor p_id, if found it return at witch position is in the list of the sent sub-domains

Parameters
nn_pstructure that store the processor graph as near processor
p_idnear processor rank
isub-domain
Returns
Given a local sub-domain i, it give the id of such sub-domain in the sent list for the processor p_id

Definition at line 73 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
void ie_ghost< dim, T >::reset ( )
inline

Reset the nn_prcs structure.

Definition at line 1066 of file ie_ghost.hpp.

template<unsigned int dim, typename T>
bool ie_ghost< dim, T >::write ( std::string  output,
size_t  p_id 
) const
inline

write the information about the ghost in vtk format

1) internal_ghost_X.vtk Internal ghost boxes for the local processor (X) 2) external_ghost_X.vtk External ghost boxes for the local processor (X)

Parameters
outputdirectory
p_idprocessor rank
Returns
true if the write succeed

internal_ghost_X.vtk Internal ghost boxes for the local processor (X)

external_ghost_X.vtk External ghost boxes for the local processor (X)

Definition at line 959 of file ie_ghost.hpp.

Field Documentation

template<unsigned int dim, typename T>
openfpm::vector< openfpm::vector< Box_proc<dim,T> > > ie_ghost< dim, T >::box_nn_processor_int
private

for each sub-domain (first vector), contain the list (nested vector) of the neighborhood processors and for each processor contain the boxes calculated from the intersection of the sub-domains + ghost with the near-by processor sub-domain () and the other way around

See Also
calculateGhostBoxes

Definition at line 31 of file ie_ghost.hpp.


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