OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
NNc_array< dim, size, thr > Class Template Reference

Detailed Description

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
class NNc_array< dim, size, thr >

Definition at line 32 of file NNc_array.hpp.

Public Member Functions

void set_size (const size_t(&sz)[dim])
 Set the size in each.
 
const long int & operator[] (size_t i) const
 return the element i
 
long int & operator[] (size_t i)
 return the element i
 
void init_full ()
 Initialize the NNc array with full neighborhood cells indexes.
 
void init_sym ()
 Initialize the NNc array with symmetric neighborhood cells indexes.
 
const long int * getPointer () const
 return the pointer to the array
 
NNc_array< dim, size, thr > & operator= (const NNc_array< dim, size, thr > &nnc)
 Copy the NNc_array.
 
void swap (NNc_array< dim, size, thr > &nnc)
 swap NNc_array
 

Private Attributes

long int NNc_arr [size]
 NNc_array.
 
grid_sm< dim, void > gs
 size of the cell array on each dimension
 

Member Function Documentation

◆ getPointer()

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
const long int * NNc_array< dim, size, thr >::getPointer ( ) const
inline

return the pointer to the array

Returns
the pointer

Definition at line 146 of file NNc_array.hpp.

◆ init_full()

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
void NNc_array< dim, size, thr >::init_full ( )
inline

Initialize the NNc array with full neighborhood cells indexes.

Definition at line 76 of file NNc_array.hpp.

◆ init_sym()

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
void NNc_array< dim, size, thr >::init_sym ( )
inline

Initialize the NNc array with symmetric neighborhood cells indexes.

Definition at line 104 of file NNc_array.hpp.

◆ operator=()

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
NNc_array< dim, size, thr > & NNc_array< dim, size, thr >::operator= ( const NNc_array< dim, size, thr > &  nnc)
inline

Copy the NNc_array.

Parameters
nncNNc_array to copy

Definition at line 156 of file NNc_array.hpp.

◆ operator[]() [1/2]

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
long int & NNc_array< dim, size, thr >::operator[] ( size_t  i)
inline

return the element i

Returns
element i

Definition at line 67 of file NNc_array.hpp.

◆ operator[]() [2/2]

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
const long int & NNc_array< dim, size, thr >::operator[] ( size_t  i) const
inline

return the element i

Returns
element i

Definition at line 57 of file NNc_array.hpp.

◆ set_size()

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
void NNc_array< dim, size, thr >::set_size ( const size_t(&)  sz[dim])
inline

Set the size in each.

Parameters
szsize og the cell grid in each dimensions

Definition at line 47 of file NNc_array.hpp.

◆ swap()

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
void NNc_array< dim, size, thr >::swap ( NNc_array< dim, size, thr > &  nnc)
inline

swap NNc_array

Parameters
nncNNc_array to copy

Definition at line 169 of file NNc_array.hpp.

Field Documentation

◆ gs

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
grid_sm<dim,void> NNc_array< dim, size, thr >::gs
private

size of the cell array on each dimension

Definition at line 38 of file NNc_array.hpp.

◆ NNc_arr

template<unsigned int dim, unsigned int size, bool thr = as_array_nnc<dim>::type::value>
long int NNc_array< dim, size, thr >::NNc_arr[size]
private

NNc_array.

Definition at line 35 of file NNc_array.hpp.


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