Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit b0c0c5a1 authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille
Browse files

Minor changes in C API for ditributed version

parent 56f3d16f
......@@ -637,6 +637,24 @@ public:
});
}
void apply_on_cell(Callback_apply_on_cell function){
double boxwidth = octreeDist->getBoxWidth();
//apply user function reset on each user's cell
octreeDist->forEachCellWithLevel([&](CoreCell * currCell,const int currLevel){
if(currCell->getContainer()){
FTreeCoordinate currCoord = currCell->getCoordinate();
int arrayCoord[3] = {currCoord.getX(),currCoord.getY(),currCoord.getZ()};
MortonIndex currMorton = currCoord.getMortonIndex(currLevel);
double position[3];
FPoint<FReal> boxC = this->getBoxCorner();
position[0] = boxC.getX() + currCoord.getX()*boxwidth/double(1<<currLevel);
position[1] = boxC.getY() + currCoord.getY()*boxwidth/double(1<<currLevel);
position[2] = boxC.getZ() + currCoord.getZ()*boxwidth/double(1<<currLevel);
function(currLevel,currMorton,arrayCoord,position,currCell->getContainer(),kernel->getUserKernelDatas());
}
});
}
void apply_on_each_leaf(Callback_apply_on_leaf function){
if(octreeDist){
FUserKernelEngine<FReal,LeafClass>::template generic_apply_on_each_leaf<ContainerClass,CoreCellDist>(octreeDist,kernel->getUserKernelDatas(),function);
......
......@@ -361,7 +361,7 @@ public:
this->octree = new OctreeClass(TreeHeight,FMath::Min(3,TreeHeight-1),BoxWidth,FPoint<FReal>(BoxCenter));
}
void apply_on_cell(Callback_apply_on_cell function){
virtual void apply_on_cell(Callback_apply_on_cell function){
double boxwidth = octree->getBoxWidth();
//apply user function reset on each user's cell
octree->forEachCellWithLevel([&](CoreCell * currCell,const int currLevel){
......
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