OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
shift_vect_converter< dim, T, Memory, layout_base > Class Template Reference

in case of high dimensions shift vector converter More...

Detailed Description

template<unsigned int dim, typename T, typename Memory, template< typename > class layout_base>
class shift_vect_converter< dim, T, Memory, layout_base >

in case of high dimensions shift vector converter

In case of high-dimensions the number of shift vectors explode, this class handle such case

Definition at line 20 of file shift_vect_converter.hpp.

#include <shift_vect_converter.hpp>

Public Member Functions

void generateShiftVectors (const Box< dim, T > &domain, size_t(&bc)[dim], openfpm::vector< Point< dim, T >, Memory, layout_base > &shifts)
 Here we generare the shift vectors for the low dimension case.
 
void Initialize (size_t(&bc)[dim])
 Initialize.
 
size_t linId_hd (const comb< dim > &cmb)
 linearize the combination in case of high dimension
 
size_t linId_ld (const comb< dim > &cmb)
 linearize the combination in case of low dimensions
 
size_t linId (const comb< dim > &cmb)
 linearize the combination in case of high dimensions
 

Private Member Functions

void generateShiftVectors_ld (const Box< dim, T > &domain, size_t(&bc)[dim], openfpm::vector< Point< dim, T >, Memory, layout_base > &shifts)
 Here we generare the shift vectors for the low dimension case.
 
void generateShiftVectors_hd (const Box< dim, T > &domain, size_t(&bc)[dim], openfpm::vector< Point< dim, T >, Memory, layout_base > &shifts)
 Here we generare the shift vectors for the high dimension case.
 

Private Attributes

size_t red_shift_v [dim]
 Indicate which indexes are non_periodic.
 
size_t tmp [dim]
 
int dim_r = 0
 

Member Function Documentation

◆ generateShiftVectors()

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
void shift_vect_converter< dim, T, Memory, layout_base >::generateShiftVectors ( const Box< dim, T > &  domain,
size_t(&)  bc[dim],
openfpm::vector< Point< dim, T >, Memory, layout_base > &  shifts 
)
inline

Here we generare the shift vectors for the low dimension case.

Parameters
domainbox that describe the domain

Definition at line 128 of file shift_vect_converter.hpp.

◆ generateShiftVectors_hd()

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
void shift_vect_converter< dim, T, Memory, layout_base >::generateShiftVectors_hd ( const Box< dim, T > &  domain,
size_t(&)  bc[dim],
openfpm::vector< Point< dim, T >, Memory, layout_base > &  shifts 
)
inlineprivate

Here we generare the shift vectors for the high dimension case.

Parameters
domainbox that describe the domain

Definition at line 73 of file shift_vect_converter.hpp.

◆ generateShiftVectors_ld()

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
void shift_vect_converter< dim, T, Memory, layout_base >::generateShiftVectors_ld ( const Box< dim, T > &  domain,
size_t(&)  bc[dim],
openfpm::vector< Point< dim, T >, Memory, layout_base > &  shifts 
)
inlineprivate

Here we generare the shift vectors for the low dimension case.

Parameters
domainbox that describe the domain

Definition at line 36 of file shift_vect_converter.hpp.

◆ Initialize()

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
void shift_vect_converter< dim, T, Memory, layout_base >::Initialize ( size_t(&)  bc[dim])
inline

Initialize.

Parameters
bcboundary conditions

Definition at line 142 of file shift_vect_converter.hpp.

◆ linId()

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
size_t shift_vect_converter< dim, T, Memory, layout_base >::linId ( const comb< dim > &  cmb)
inline

linearize the combination in case of high dimensions

Parameters
cmbcombination

Definition at line 188 of file shift_vect_converter.hpp.

◆ linId_hd()

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
size_t shift_vect_converter< dim, T, Memory, layout_base >::linId_hd ( const comb< dim > &  cmb)
inline

linearize the combination in case of high dimension

Parameters
cmbcombination

Definition at line 160 of file shift_vect_converter.hpp.

◆ linId_ld()

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
size_t shift_vect_converter< dim, T, Memory, layout_base >::linId_ld ( const comb< dim > &  cmb)
inline

linearize the combination in case of low dimensions

Parameters
cmbcombination

Definition at line 178 of file shift_vect_converter.hpp.

Field Documentation

◆ dim_r

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
int shift_vect_converter< dim, T, Memory, layout_base >::dim_r = 0
private

Definition at line 29 of file shift_vect_converter.hpp.

◆ red_shift_v

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
size_t shift_vect_converter< dim, T, Memory, layout_base >::red_shift_v[dim]
private

Indicate which indexes are non_periodic.

Definition at line 23 of file shift_vect_converter.hpp.

◆ tmp

template<unsigned int dim, typename T , typename Memory , template< typename > class layout_base>
size_t shift_vect_converter< dim, T, Memory, layout_base >::tmp[dim]
private

Definition at line 26 of file shift_vect_converter.hpp.


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