Commit 7cd19fd1 authored by incardon's avatar incardon

Fixing pdata with the new grid interface

parent 741bc01d
openfpm_data @ 77f7612f
Subproject commit c145364a145d40bd39819f3e8d44054d16e59352
Subproject commit 77f7612f3ba85d6aa63520e99bc9bd6dd23ffa11
openfpm_devices @ 5fcf26ec
Subproject commit 5e77238220a0ad397afc8939c85b402c09d8e87b
Subproject commit 5fcf26ecfb5cedb720c6239cca235e14e422aa5c
openfpm_io @ e4e6e157
Subproject commit a94658c3e4fc0f68fd261e7df39cd2a353bd4682
Subproject commit e4e6e157262c9a7887f6446926b8660e4cc1e3c2
openfpm_vcluster @ e858a42b
Subproject commit 99436bef0af38c208ed27755fa5f6b44eabc4172
Subproject commit e858a42b603fb632696045edb35b41bcf286aa14
......@@ -46,7 +46,6 @@
*
* \tparam dim is the dimensionality of the physical domain we are going to decompose.
* \tparam T type of the space we decompose, Real, Integer, Complex ...
* \tparam device_l layout to use
* \tparam Memory Memory factory used to allocate memory
* \tparam Domain Structure that contain the information of your physical domain
*
......@@ -82,7 +81,7 @@
*
*/
template<unsigned int dim, typename T, template<typename> class device_l=openfpm::device_cpu, typename Memory=HeapMemory, template<unsigned int, typename> class Domain=Box>
template<unsigned int dim, typename T, typename Memory=HeapMemory, template<unsigned int, typename> class Domain=Box>
class CartDecomposition : public ie_loc_ghost<dim,T>, public nn_prcs<dim,T> , public ie_ghost<dim,T>
{
......@@ -98,7 +97,7 @@ private:
//! This is the key type to access data_s, for example in the case of vector
//! acc_key is size_t
typedef typename openfpm::vector<SpaceBox<dim,T>,device_l<SpaceBox<dim,T>>,Memory,openfpm::vector_grow_policy_default,openfpm::vect_isel<SpaceBox<dim,T>>::value >::access_key acc_key;
typedef typename openfpm::vector<SpaceBox<dim,T>,Memory,openfpm::vector_grow_policy_default,openfpm::vect_isel<SpaceBox<dim,T>>::value >::access_key acc_key;
//! the set of all local sub-domain as vector
openfpm::vector<SpaceBox<dim,T>> sub_domains;
......
......@@ -495,7 +495,7 @@ public:
for (size_t i = 0 ; i < dim ; i++) {l_res[i] = (sp_tg.getHigh(i) >= 0)?(sp_tg.getHigh(i)+1):0;}
// Set the dimensions of the local grid
loc_grid.get(i).template resize<Memory>(l_res);
loc_grid.get(i).resize(l_res);
}
}
......
......@@ -163,9 +163,9 @@ public:
struct pos_prop
{
//! position vector
openfpm::vector<point,openfpm::device_cpu<point>,PreAllocHeapMemory<2>,openfpm::grow_policy_identity> pos;
openfpm::vector<point,PreAllocHeapMemory<2>,openfpm::grow_policy_identity> pos;
//! properties vector
openfpm::vector<prop,openfpm::device_cpu<prop>,PreAllocHeapMemory<2>,openfpm::grow_policy_identity> prp;
openfpm::vector<prop,PreAllocHeapMemory<2>,openfpm::grow_policy_identity> prp;
};
/*! \brief set the ghost
......@@ -254,8 +254,8 @@ public:
for (size_t i = 0 ; i < prc_r.size() ; i++)
{
// Create the size required to store the particles position and properties to communicate
size_t s1 = openfpm::vector<point,openfpm::device_cpu<point>,HeapMemory,openfpm::grow_policy_identity>::calculateMem(prc_sz_r.get(i),0);
size_t s2 = openfpm::vector<prop,openfpm::device_cpu<prop>,HeapMemory,openfpm::grow_policy_identity>::calculateMem(prc_sz_r.get(i),0);
size_t s1 = openfpm::vector<point,HeapMemory,openfpm::grow_policy_identity>::calculateMem(prc_sz_r.get(i),0);
size_t s2 = openfpm::vector<prop,HeapMemory,openfpm::grow_policy_identity>::calculateMem(prc_sz_r.get(i),0);
// Preallocate the memory
size_t sz[2] = {s1,s2};
......@@ -339,8 +339,8 @@ public:
// create vector representation to a piece of memory already allocated
openfpm::vector<point,openfpm::device_cpu<point>,PtrMemory,openfpm::grow_policy_identity> vpos;
openfpm::vector<prop,openfpm::device_cpu<prop>,PtrMemory,openfpm::grow_policy_identity> vprp;
openfpm::vector<point,PtrMemory,openfpm::grow_policy_identity> vpos;
openfpm::vector<prop,PtrMemory,openfpm::grow_policy_identity> vprp;
vpos.setMemory(*ptr1);
vprp.setMemory(*ptr2);
......@@ -402,7 +402,7 @@ public:
typedef object<typename object_creator<typename prop::type,prp...>::type> prp_object;
// send vector for each processor
typedef openfpm::vector<prp_object,openfpm::device_cpu<prp_object>,ExtPreAlloc<Memory>> send_vector;
typedef openfpm::vector<prp_object,ExtPreAlloc<Memory>> send_vector;
// Buffer that contain the number of elements to send for each processor
ghost_prc_sz.clear();
......@@ -499,7 +499,7 @@ public:
// Create the buffer for particle position
// definition of the send vector for position for each processor
typedef openfpm::vector<point,openfpm::device_cpu<point>,ExtPreAlloc<Memory>> send_pos_vector;
typedef openfpm::vector<point,ExtPreAlloc<Memory>> send_pos_vector;
openfpm::vector<send_pos_vector> g_pos_send;
if (opt != NO_POSITION)
......@@ -549,7 +549,7 @@ public:
PtrMemory * ptr1 = new PtrMemory(recv_mem_gg.get(i).getPointer(),recv_sz.get(i));
// create vector representation to a piece of memory already allocated
openfpm::vector<prp_object,openfpm::device_cpu<prp_object>,PtrMemory,openfpm::grow_policy_identity> v2;
openfpm::vector<prp_object,PtrMemory,openfpm::grow_policy_identity> v2;
v2.setMemory(*ptr1);
......@@ -576,7 +576,7 @@ public:
// create vector representation to a piece of memory already allocated
openfpm::vector<point,openfpm::device_cpu<point>,PtrMemory,openfpm::grow_policy_identity> v2;
openfpm::vector<point,PtrMemory,openfpm::grow_policy_identity> v2;
v2.setMemory(*ptr1);
......
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