Commit 74f47c5a authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille

Changes in finalize_leaf prototype (add leafData)

parent 0da49c66
......@@ -171,7 +171,7 @@ typedef void (*Callback_copy_cell)(void * userDatas, FSize size, void * memoryAl
* @param userData Kernel user data
*/
typedef void (*Callback_finalize_leaf)(int level, FSize nbParts, const FSize * idxParts, long long morton_index, double center[3],
void * cellDatas, void * userDatas);
void * cellDatas,void * leafDatas, void * userDatas);
/**
* @brief Callback to initialise data inside the Leaves
......@@ -180,7 +180,7 @@ typedef void (*Callback_finalize_leaf)(int level, FSize nbParts, const FSize * i
* @param idxParts array of size nbParts, containing the indices of each parts
* @param morton_index of the current cell
* @param center of the current leaf (3 double)
* @param userData cell user data
* @param userData leaf user data
* @param userData Kernel user data
*/
typedef void* (*Callback_init_leaf)(int level, FSize nbParts, const FSize * idxParts, long long morton_index, double center[3],
......
......@@ -218,8 +218,8 @@ public:
/** Do nothing */
virtual void P2PRemote(const FTreeCoordinate& ,
ContainerClass* const FRestrict , const ContainerClass* const FRestrict ,
ContainerClass* const *, const int *, const int ){
ContainerClass* const FRestrict , const ContainerClass* const FRestrict ,
ContainerClass const *const *, const int *, const int ){
}
//Getter
......@@ -464,7 +464,7 @@ public:
treeCoord.getZ()*boxWidthLeafLevel);
FPoint<double> leafCenter = absolutCoord + (octreeIn->getBoxCenter()-octreeIn->getBoxWidth()) + boxWidthLeafLevel/2;
function(lvl,leaf->getSrc()->getNbParticles(),leaf->getSrc()->getIndexes().data(),currMorton,leafCenter.getDataValue(),
currCell->getContainer(),kernelUserData);
currCell->getContainer(),leaf->getSrc()->getContainer(),kernelUserData);
});
}else{
std::cout << "Need to Build the tree and insert the parts First\n" << std::endl;
......
......@@ -87,9 +87,9 @@ void cheb_resetCell(int level, long long morton_index, int* tree_position,
* This function is mainly a display of its args...
*/
void on_leaf(int level, FSize nbParts, const FSize * idxParts, long long morton_index, double center[3],
void * cellDatas, void * userDatas){
printf("I'm leaf at %lld pos, of center [%e %e %e], containing %lld parts\n",
morton_index,center[0],center[1],center[2],nbParts);
void * cellDatas, void * leafData, void * userDatas){
/* printf("I'm leaf at %lld pos, of center [%e %e %e], containing %lld parts\n", */
/* morton_index,center[0],center[1],center[2],nbParts); */
}
......@@ -333,10 +333,10 @@ int main(int argc, char ** av){
nbPartOkay++;
}
else{
/* printf("id : %lld : %e, %e, %e, %e, ChebInterf Pot : %e Cheb Pot : %e \n", */
/* idxPart,diffX,diffY,diffZ,diffPot, */
/* potentialToStore[0][idxPart], */
/* potentialsRef[idxPart]); */
printf("id : %lld : %e, %e, %e, %e, ChebInterf Pot : %e Cheb Pot : %e \n",
idxPart,diffX,diffY,diffZ,diffPot,
potentialToStore[0][idxPart],
potentialsRef[idxPart]);
}
//That part is to verify with our usual exec' if everything is alright
if(idxPart == 0 || idxPart == nbPart/2 || idxPart == nbPart-1){
......
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