Commit 3a732c98 authored by incardon's avatar incardon
Browse files

Yaroslav work merged

parent 6c8ba9db
......@@ -13,11 +13,6 @@
#include "CellList.hpp"
#include "ProcKeys.hpp"
extern "C"
{
#include "hilbertKey.h"
}
/* \brief Cell list implementation with particle iterator over cells
*
* \see CellList<dim,T,FAST,transform,base>
......@@ -46,48 +41,11 @@ private:
//! iteration across cells
Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,base>> SFC;
public:
//! Init SFC
bool init_sfc;
CellList_gen()
:CellList<dim,T,Mem_type,transform,base>()
{};
/*! \brief Set the ghost marker
*
*
*/
const Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,base>> & getCellSFC() const
void initialize_sfc(size_t pad)
{
return SFC;
}
/*! \brief return the celllist iterator (across cells)
*
* \return an iterator
*
*/
inline typename Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,base>>::Pit getIterator()
{
return typename Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,base>>::Pit(*this);
}
/*! Initialize the cell list
*
* \param box Domain where this cell list is living
* \param div grid size on each dimension
* \param g_m_new A ghost marker
* \param pad padding cell
* \param slot maximum number of slot
*
*/
void Initialize(const Box<dim,T> & box, const size_t (&div)[dim], size_t g_m_new, const size_t pad = 1, size_t slot=STARTING_NSLOT)
{
CellList<dim,T,Mem_type,transform,base>::Initialize(box,div,pad,slot);
g_m = g_m_new;
size_t sz[dim];
//Get grid_sm without padding (gs_small)
......@@ -129,6 +87,56 @@ public:
SFC.linearize_hkeys(*this,m);
}
public:
CellList_gen()
:CellList<dim,T,Mem_type,transform,base>(),init_sfc(false)
{};
/*! \brief Set the ghost marker
*
*
*/
const Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,base>> & getCellSFC() const
{
return SFC;
}
/*! \brief return the celllist iterator (across cells)
*
* \return an iterator
*
*/
inline typename Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,base>>::Pit getIterator()
{
// Initialize SFC
if (init_sfc == false)
{
initialize_sfc(this->getPadding(0));
init_sfc = true;
}
return typename Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,base>>::Pit(*this);
}
/*! Initialize the cell list
*
* \param box Domain where this cell list is living
* \param div grid size on each dimension
* \param g_m_new A ghost marker
* \param pad padding cell
* \param slot maximum number of slot
*
*/
void Initialize(const Box<dim,T> & box, const size_t (&div)[dim], size_t g_m_new, const size_t pad = 1, size_t slot=STARTING_NSLOT)
{
CellList<dim,T,Mem_type,transform,base>::Initialize(box,div,pad,slot);
g_m = g_m_new;
}
/*! \brief Return cellkeys vector
*
......
......@@ -8,7 +8,10 @@
#ifndef OPENFPM_DATA_SRC_NN_CELLLIST_PROCKEYS_HPP_
#define OPENFPM_DATA_SRC_NN_CELLLIST_PROCKEYS_HPP_
extern "C"
{
#include "hilbertKey.h"
}
/* !Brief Class for a linear (1D-like) order processing of cell keys for CellList_gen implementation
*
......
......@@ -8,6 +8,8 @@
#ifndef OPENFPM_DATA_SRC_UTIL_COMPARE_FUSION_VECTOR_HPP_
#define OPENFPM_DATA_SRC_UTIL_COMPARE_FUSION_VECTOR_HPP_
#include "meta_compare.hpp"
/*! \brief this class is a functor for "for_each" algorithm
*
* It compare a boost::fusion::vector with another boost::fusion::vector
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment