Commit ae50e0a5 authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille

The Args that was not used in getLeft and getRight methods inside Balance classes arer now removed.

parent 42dd8013
......@@ -4,13 +4,13 @@
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
......@@ -29,7 +29,7 @@ class FAbstractBalanceAlgorithm{
public:
virtual ~FAbstractBalanceAlgorithm(){
}
/**
* @brief Give the right leaves (ie the min) of the interval that
* will be handle by idxOfProc
......@@ -40,8 +40,8 @@ public:
* @param numberOfProc Number of MPI processus that will handle the Octree
* @param idxOfProc Idx of the proc calling.
*/
virtual FSize getRight(const FSize numberOfLeaves, const int*numberOfPartPerLeaf, const FSize numberOfPart, const MortonIndex* idxOfLeaves,
const int numberOfProc, const int idxOfProc) = 0;
virtual FSize getRight(const FSize numberOfLeaves,
const int numberOfProc, const int idxOfProc) = 0;
/**
* @brief Give the Leaft leaves (ie the max) of the interval that
......@@ -53,8 +53,8 @@ public:
* @param numberOfProc Number of MPI processus that will handle the Octree
* @param idxOfProc Idx of the proc calling.
*/
virtual FSize getLeft(const FSize numberOfLeaves, const int*numberOfPartPerLeaf, const FSize numberOfPart, const MortonIndex* idxOfLeaves,
const int numberOfProc, const int idxOfProc) = 0;
virtual FSize getLeft(const FSize numberOfLeaves,
const int numberOfProc, const int idxOfProc) = 0;
};
......
......@@ -4,13 +4,13 @@
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
......@@ -34,20 +34,20 @@ public:
* Does not need the number of particles. Just divide the leaves
* over processus
*/
FSize getRight(const FSize numberOfLeaves, const int*numberOfPartPerLeaf, const FSize numberOfPart, const MortonIndex* idxOfLeaves,
const int numberOfProc, const int idxOfProc){
FSize getRight(const FSize numberOfLeaves,
const int numberOfProc, const int idxOfProc){
const double step = (double(numberOfLeaves) / double(numberOfProc));
const FSize res = FSize(FMath::Ceil(step * double(idxOfProc+1)));
if(res > numberOfLeaves) return numberOfLeaves;
else return res;
}
/**
* Does not need the number of particles. Just divide the leaves
* over processus
*/
FSize getLeft(const FSize numberOfLeaves, const int*numberOfPartPerLeaf, const FSize numberOfPart, const MortonIndex* idxOfLeaves,
const int numberOfProc, const int idxOfProc){
FSize getLeft(const FSize numberOfLeaves,
const int numberOfProc, const int idxOfProc){
const double step = (double(numberOfLeaves) / double(numberOfProc));
return FSize(FMath::Ceil(step * double(idxOfProc)));
}
......
......@@ -4,13 +4,13 @@
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
......@@ -33,8 +33,8 @@ public:
/**
* getRight interval based on particles distribution
*/
FSize getRight(const FSize numberOfLeaves, const int*numberOfPartPerLeaf, const FSize numberOfPart, const MortonIndex* idxOfLeaves,
const int numberOfProc, const int idxOfProc){
FSize getRight(const FSize numberOfLeaves,
const int numberOfProc, const int idxOfProc){
int acc = 0;
FSize i = 0;
const double step = (double(numberOfPart) / double(numberOfProc));
......@@ -48,12 +48,12 @@ public:
else
return i-1;
}
/**
* get left interval based on particles distribution
*/
FSize getLeft(const FSize numberOfLeaves, const int*numberOfPartPerLeaf, const FSize numberOfPart, const MortonIndex* idxOfLeaves,
const int numberOfProc, const int idxOfProc){
FSize getLeft(const FSize numberOfLeaves,
const int numberOfProc, const int idxOfProc){
int acc = 0;
FSize i = 0;
const double step = (double(numberOfPart) / double(numberOfProc));
......
......@@ -348,8 +348,8 @@ public:
std::vector< std::pair<size_t,size_t> > allObjectives;
allObjectives.resize(nbProcs);
for(int idxProc = 0 ; idxProc < nbProcs ; ++idxProc){
allObjectives[idxProc].first = balancer->getLeft(totalNumberOfLeavesInSimulation,nullptr,0,nullptr,nbProcs,idxProc);
allObjectives[idxProc].second = balancer->getRight(totalNumberOfLeavesInSimulation,nullptr,0,nullptr,nbProcs,idxProc);
allObjectives[idxProc].first = balancer->getLeft(totalNumberOfLeavesInSimulation,nbProcs,idxProc);
allObjectives[idxProc].second = balancer->getRight(totalNumberOfLeavesInSimulation,nbProcs,idxProc);
}
// Ask for the pack to send
......
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