Commit 654c95a1 authored by COULAUD Olivier's avatar COULAUD Olivier
Browse files
parents 8f06a15f 0420a4b7
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required (VERSION 2.8.5)
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
......@@ -32,7 +32,6 @@ OPTION( SCALFMM_ATTACHE_SOURCE "Set to ON to compile with -g" OFF )
OPTION( SCALFMM_USE_STARPU "Set to ON to use starpu" OFF )
# Test if openmp is here
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
find_package(OpenMP)
......@@ -96,9 +95,25 @@ ADD_DEFINITIONS(-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wconversion)
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/Src/ScalFmmConfig.h.cmake
${CMAKE_BINARY_DIR}/Src/ScalFmmConfig.h )
# Use Mem stats
MESSAGE( STATUS "SCALFMM_USE_MEM_STATS = ${SCALFMM_USE_MEM_STATS}" )
# Test if openmp is here
include(FindOpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Add CBLAS
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CBLAS_LIBRARIES}")
# Build - lib
add_subdirectory(Src)
# Link with scalfmm lib
set(scalfmm_lib scalfmm)
# Build - Tests
MESSAGE( STATUS "SCALFMM_BUILD_TESTS = ${SCALFMM_BUILD_TESTS}" )
if( SCALFMM_BUILD_TESTS )
......@@ -112,9 +127,6 @@ if( SCALFMM_BUILD_UTESTS )
add_subdirectory(UTests)
endif()
# Use Mem stats
MESSAGE( STATUS "SCALFMM_USE_MEM_STATS = ${SCALFMM_USE_MEM_STATS}" )
# Build - doc
add_subdirectory(Doc)
......
cmake_minimum_required(VERSION 2.8)
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
if(insource)
......@@ -29,6 +27,8 @@ add_library(
target_link_libraries(
scalfmm
${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
${STARPU_LIBRARIES}
)
# Adding the entire project dir as an include dir
......
// ===================================================================================
// Logiciel initial: ScalFmm Version 0.5
// Co-auteurs : Olivier Coulaud, Bérenger Bramas.
// Propriétaires : INRIA.
// Copyright © 2011-2012, diffusé sous les termes et conditions d’une licence propriétaire.
// Initial software: ScalFmm Version 0.5
// Co-authors: Olivier Coulaud, Bérenger Bramas.
// Owners: INRIA.
// Copyright © 2011-2012, spread under the terms and conditions of a proprietary license.
// ===================================================================================
#ifndef FFMMALGORITHMSTARPU_HPP
#define FFMMALGORITHMSTARPU_HPP
// /!\ Please, you must read the license at the bottom of this page
......@@ -73,10 +83,12 @@ template <class CellClass>
class FStarCell : public CellClass{
public:
/** The handle to register the data */
StarHandle handle;
StarHandle handleUp;
StarHandle handleDown;
/** Called by fmm starpu to register data */
void initHandle(){
handle.registerVariable( static_cast<CellClass*>(this) );
handleUp.registerVariable( static_cast<CellClass*>(this) );
handleDown.registerVariable( static_cast<CellClass*>(this) );
}
};
......@@ -267,6 +279,8 @@ class FFmmAlgorithmStarpu : protected FAssertable{
p2m_cl.where = STARPU_CPU;
p2m_cl.cpu_funcs[0] = p2m_cpu;
p2m_cl.nbuffers = 2;
p2m_cl.modes[0] = STARPU_W;
p2m_cl.modes[1] = STARPU_R;
// P2P
memset(p2p_cl, 0, sizeof(starpu_codelet) * 28);
for(int idxNeig = 0 ; idxNeig <= 27 ; ++idxNeig){
......@@ -378,7 +392,7 @@ class FFmmAlgorithmStarpu : protected FAssertable{
}
public:
public:
/** The constructor need the octree and the kernels used for computation
* @param inTree the octree to work on
* @param inKernels the kernels to call
......@@ -446,7 +460,7 @@ public:
// P2M
{
//kernels->P2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc());
starpu_insert_task( &p2m_cl, STARPU_RW, octreeIterator.getCurrentCell()->handle.handle,
starpu_insert_task( &p2m_cl, STARPU_W, octreeIterator.getCurrentCell()->handleUp.handle,
STARPU_R, octreeIterator.getCurrentLeaf()->getSrc()->handle.handle, 0);
}
// P2P
......@@ -461,11 +475,10 @@ public:
// then we insert neighbors with a mask system
unsigned int mask = 0;
int idxInsert = 1;
for(int idxCounterNeigh = 26 ; idxCounterNeigh >= 0 ; --idxCounterNeigh){
mask <<= 1;
for(int idxCounterNeigh = 0 ; idxCounterNeigh < 27 ; ++idxCounterNeigh){
if( neighbors[idxCounterNeigh] ){
task->handles[idxInsert++] = neighbors[idxCounterNeigh]->handle.handle;
++mask;
mask = mask | (1 << idxCounterNeigh);
}
}
// Put the right codelet
......@@ -522,14 +535,14 @@ public:
// create task
struct starpu_task* const task = starpu_task_create();
// buffer 0 is current leaf
task->handles[0] = octreeIterator.getCurrentCell()->handle.handle;
task->handles[0] = octreeIterator.getCurrentCell()->handleDown.handle;
// insert other with a mask
memset(mask_m2l, 0, sizeof(unsigned int) * 12);
int idxInsert = 1;
for(int idxNeigh = 342 ; idxNeigh >= 0 ; --idxNeigh){
for(int idxNeigh = 0 ; idxNeigh < 343 ; ++idxNeigh){
if( neighbors[idxNeigh] ){
task->handles[idxInsert++] = neighbors[idxNeigh]->handle.handle;
task->handles[idxInsert++] = neighbors[idxNeigh]->handleUp.handle;
mask_m2l[ idxNeigh >> 5 ] = mask_m2l[ idxNeigh >> 5 ] | (1 << (idxNeigh & 0x1F));
}
}
......@@ -561,16 +574,15 @@ public:
//kernels->M2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
struct starpu_task* const task = starpu_task_create();
// buffer 0 is parent cell
task->handles[0] = octreeIterator.getCurrentCell()->handle.handle;
task->handles[0] = octreeIterator.getCurrentCell()->handleUp.handle;
// add child with mask
unsigned int mask = 0;
int idxInsert = 1;
CellClass*const*const child = octreeIterator.getCurrentChild();
for(int idxChild = 7 ; idxChild >= 0 ; --idxChild){
mask <<= 1;
for(int idxChild = 0 ; idxChild < 8 ; ++idxChild){
if(child[idxChild]){
task->handles[idxInsert++] = child[idxChild]->handle.handle;
++mask;
task->handles[idxInsert++] = child[idxChild]->handleUp.handle;
mask = mask | (1 << idxChild);
}
}
// put right codelet
......@@ -600,14 +612,14 @@ public:
// create task
struct starpu_task* const task = starpu_task_create();
// buffer 0 is current leaf
task->handles[0] = octreeIterator.getCurrentCell()->handle.handle;
task->handles[0] = octreeIterator.getCurrentCell()->handleDown.handle;
// insert other with a mask
memset(mask_m2l, 0, sizeof(unsigned int) * 12);
int idxInsert = 1;
for(int idxNeigh = 342 ; idxNeigh >= 0 ; --idxNeigh){
for(int idxNeigh = 0 ; idxNeigh < 343 ; ++idxNeigh){
if( neighbors[idxNeigh] ){
task->handles[idxInsert++] = neighbors[idxNeigh]->handle.handle;
task->handles[idxInsert++] = neighbors[idxNeigh]->handleUp.handle;
mask_m2l[ idxNeigh >> 5 ] = mask_m2l[ idxNeigh >> 5 ] | (1 << (idxNeigh & 0x1F));
}
}
......@@ -658,16 +670,15 @@ public:
//kernels->L2L( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
struct starpu_task* const task = starpu_task_create();
// buffer 0 is parent cell
task->handles[0] = octreeIterator.getCurrentCell()->handle.handle;
task->handles[0] = octreeIterator.getCurrentCell()->handleDown.handle;
// insert children with mask
unsigned int mask = 0;
int idxInsert = 1;
CellClass*const*const child = octreeIterator.getCurrentChild();
for(int idxChild = 7 ; idxChild >= 0 ; --idxChild){
mask <<= 1;
for(int idxChild = 0 ; idxChild < 8 ; ++idxChild){
if(child[idxChild]){
task->handles[idxInsert++] = child[idxChild]->handle.handle;
++mask;
task->handles[idxInsert++] = child[idxChild]->handleDown.handle;
mask = mask | (1 << idxChild);
}
}
// put right codelet
......@@ -709,7 +720,7 @@ public:
octreeIterator.gotoBottomLeft();
do{
//kernels->L2P( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc());
starpu_insert_task(&l2p_cl, STARPU_R, octreeIterator.getCurrentCell()->handle.handle,
starpu_insert_task(&l2p_cl, STARPU_R, octreeIterator.getCurrentCell()->handleDown.handle,
STARPU_RW, octreeIterator.getCurrentLeaf()->getTargets()->handle.handle, 0);
} while(octreeIterator.moveRight());
......@@ -853,4 +864,3 @@ KernelClass** FFmmAlgorithmStarpu<OctreeClass,ParticleClass,CellClass,RealCellCl
#endif //FFMMALGORITHMSTARPU_HPP
// [--LICENSE--]
cmake_minimum_required (VERSION 2.8)
# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
if(insource)
......@@ -9,19 +7,6 @@ endif(insource)
project(Tests_scalfmm CXX)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
# Test if openmp is here
include(FindOpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
# Add CBLAS
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CBLAS_LIBRARIES}")
# Link with scalfmm lib
set(scalfmm_lib scalfmm)
# Find all code files
file(
GLOB_RECURSE
......
......@@ -22,9 +22,7 @@
#include <cstdio>
#include <cstdlib>
#ifdef FUSE_STARPU
#include <starpu.h>
#endif
#include "../../Src/Kernels/Chebyshev/FChebParticle.hpp"
#include "../../Src/Kernels/Chebyshev/FChebLeaf.hpp"
#include "../../Src/Kernels/Chebyshev/FChebCell.hpp"
......@@ -32,7 +30,6 @@
#include "../../Src/Kernels/Chebyshev/FChebKernel.hpp"
#include "../../Src/Kernels/Chebyshev/FChebSymKernel.hpp"
//#include "../Src/Utils/FTic.hpp"
#include "../../Src/Utils/FParameters.hpp"
#include "../../Src/Containers/FOctree.hpp"
......@@ -40,15 +37,6 @@
#include "../../Src/Core/FFmmAlgorithm.hpp"
#include "../../Src/Core/FFmmAlgorithmThread.hpp"
#ifdef FUSE_STARPU
#include "../../Src/Core/FFmmAlgorithmStarpu.hpp"
#endif
/** This program show an example of use of
* the fmm basic algo
* it also check that each particles is little or longer
* related that each other
*/
......@@ -102,7 +90,6 @@ int main(int argc, char* argv[])
// init timer
FTic time;
#ifndef FUSE_STARPU
// typedefs
typedef FChebParticle ParticleClass;
......@@ -115,20 +102,8 @@ int main(int argc, char* argv[])
typedef FChebSymKernel<ParticleClass,CellClass,ContainerClass,MatrixKernelClass,ORDER> KernelClass;
typedef FFmmAlgorithm<OctreeClass,ParticleClass,CellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
//typedef FFmmAlgorithmThread<OctreeClass,ParticleClass,CellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
#else
// // typedefs for STARPU
// typedef FChebParticle ParticleClass;
// typedef StarVector<ParticleClass> ContainerClass;
// typedef DataVector<ParticleClass> RealContainerClass;
// typedef FChebLeaf<ParticleClass,ContainerClass> LeafClass;
// typedef FChebMatrixKernelR MatrixKernelClass;
// typedef FChebCell<ORDER> RealCellClass;
// typedef FStarCell<RealCellClass> CellClass;
// typedef FOctree<ParticleClass,CellClass,ContainerClass,LeafClass> OctreeClass;
// //typedef FChebKernel<ParticleClass,RealCellClass,RealContainerClass,MatrixKernelClass,ORDER> KernelClass;
// typedef FChebSymKernel<ParticleClass,RealCellClass,RealContainerClass,MatrixKernelClass,ORDER> KernelClass;
// typedef FFmmAlgorithmStarpu<OctreeClass,ParticleClass,CellClass,RealCellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
#endif
// What we do //////////////////////////////////////////////////////
std::cout << ">> Testing the Chebyshev interpolation base FMM algorithm.\n";
......
......@@ -44,11 +44,6 @@
#include <string.h>
// export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
// Compile With openmp : g++ testFmbAlgorithm.cpp ../../Src/Utils/FDebug.cpp ../../Src/Utils/FTrace.cpp -lgomp -fopenmp -lstarpu -O2 -o testFmbAlgorithm.exe
//
// g++ -L../starpu/lib/ -I../starpu/include testFmbAlgorithmNoProc.cpp ../../Src/Utils/FDebug.cpp ../../Src/Utils/FTrace.cpp ../../Src/Utils/FMath.cpp ../../Src/Utils/FPoint.cpp -lgomp -fopenmp -lstarpu -O2 -o testFmbAlgorithm.exe
////////////////////////////////////////////////////////////////
// Define classes
////////////////////////////////////////////////////////////////
......
// ===================================================================================
// Ce LOGICIEL "ScalFmm" est couvert par le copyright Inria 20xx-2012.
// Inria détient tous les droits de propriété sur le LOGICIEL, et souhaite que
// la communauté scientifique l'utilise afin de le tester et de l'évaluer.
// Inria donne gracieusement le droit d'utiliser ce LOGICIEL. Toute utilisation
// dans un but lucratif ou à des fins commerciales est interdite sauf autorisation
// expresse et préalable d'Inria.
// Toute utilisation hors des limites précisées ci-dessus et réalisée sans l'accord
// expresse préalable d'Inria constituerait donc le délit de contrefaçon.
// Le LOGICIEL étant un produit en cours de développement, Inria ne saurait assurer
// aucune responsabilité et notamment en aucune manière et en aucun cas, être tenu
// de répondre d'éventuels dommages directs ou indirects subits par l'utilisateur.
// Tout utilisateur du LOGICIEL s'engage à communiquer à Inria ses remarques
// relatives à l'usage du LOGICIEL
// ===================================================================================
// ==== CMAKE =====
// @FUSE_BLAS
// @FUSE_STARPU
// ================
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <starpu.h>
#include "../../Src/Kernels/Chebyshev/FChebParticle.hpp"
#include "../../Src/Kernels/Chebyshev/FChebLeaf.hpp"
#include "../../Src/Kernels/Chebyshev/FChebCell.hpp"
#include "../../Src/Kernels/Chebyshev/FChebMatrixKernel.hpp"
#include "../../Src/Kernels/Chebyshev/FChebKernel.hpp"
#include "../../Src/Kernels/Chebyshev/FChebSymKernel.hpp"
#include "../../Src/Utils/FParameters.hpp"
#include "../../Src/Containers/FOctree.hpp"
#include "../../Src/Containers/FVector.hpp"
#include "../../Src/Core/FFmmAlgorithm.hpp"
#include "../../Src/Core/FFmmAlgorithmThread.hpp"
#include "../../Src/Core/FFmmAlgorithmStarpu.hpp"
FReal computeL2norm(unsigned int N, FReal *const u, FReal *const v)
{
FReal dot = FReal(0.);
FReal diff_dot = FReal(0.);
for (unsigned int i=0; i<N; ++i) {
FReal w = v[i] - u[i];
diff_dot += w * w;
dot += u[i] * u[i];
}
return FMath::Sqrt(diff_dot / dot);
}
FReal computeINFnorm(unsigned int N, FReal *const u, FReal *const v)
{
FReal max = FReal(0.);
FReal diff_max = FReal(0.);
for (unsigned int n=0; n<N; ++n) {
if ( max<std::abs(u[n])) max = std::abs(u[n]);
if (diff_max<std::abs(u[n]-v[n])) diff_max = std::abs(u[n]-v[n]);
}
return diff_max / max;
}
// Simply create particles and try the kernels
int main(int argc, char* argv[])
{
const unsigned int ORDER = 3;
const FReal epsilon = FParameters::getValue(argc, argv, "-eps", FReal(1e-3));
const long NbPart = FParameters::getValue(argc, argv, "-num", 400000);
const unsigned int TreeHeight = FParameters::getValue(argc, argv, "-h", 6);
const unsigned int SubTreeHeight = FParameters::getValue(argc, argv, "-sh", 2);
const unsigned int NbThreads = FParameters::getValue(argc, argv, "-t", 1);
omp_set_num_threads(NbThreads);
std::cout << "Using " << omp_get_max_threads() << " threads." << std::endl;
const FReal Width = 10.;
// init random fun
const FReal FRandMax = FReal(RAND_MAX) / Width;
srand( static_cast<unsigned int>(time(NULL)) );
// init timer
FTic time;
// typedefs for STARPU
typedef FChebParticle ParticleClass;
typedef StarVector<ParticleClass> ContainerClass;
typedef DataVector<ParticleClass> RealContainerClass;
typedef FChebLeaf<ParticleClass,ContainerClass> LeafClass;
typedef FChebMatrixKernelR MatrixKernelClass;
typedef FChebCell<ORDER> RealCellClass;
typedef FStarCell<RealCellClass> CellClass;
typedef FOctree<ParticleClass,CellClass,ContainerClass,LeafClass> OctreeClass;
//typedef FChebKernel<ParticleClass,RealCellClass,RealContainerClass,MatrixKernelClass,ORDER> KernelClass;
typedef FChebSymKernel<ParticleClass,RealCellClass,RealContainerClass,MatrixKernelClass,ORDER> KernelClass;
typedef FFmmAlgorithmStarpu<OctreeClass,ParticleClass,CellClass,RealCellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
// What we do //////////////////////////////////////////////////////
std::cout << ">> Testing the Chebyshev interpolation base FMM algorithm.\n";
const FPoint BoxCenter(.5*Width, .5*Width, .5*Width);
OctreeClass tree(TreeHeight, SubTreeHeight, Width, BoxCenter);
// -----------------------------------------------------
std::cout << "Creating and inserting " << NbPart << " particles in a octree of height " << TreeHeight
<< " ..." << std::endl;
time.tic();
ParticleClass particle;
for(long i=0; i<NbPart; ++i) {
particle.setPosition(FReal(rand())/FRandMax, FReal(rand())/FRandMax, FReal(rand())/FRandMax);
particle.setPhysicalValue(FReal(rand())/FReal(RAND_MAX));
tree.insert(particle);
}
std::cout << "Done " << "(" << time.tacAndElapsed() << ")." << std::endl;
// -----------------------------------------------------
// -----------------------------------------------------
std::cout << "\nChebyshev FMM ... " << std::endl;
time.tic();
KernelClass kernels(TreeHeight, BoxCenter, Width, epsilon);
FmmClass algorithm(&tree,&kernels);
algorithm.execute();
std::cout << "completed in " << time.tacAndElapsed() << "sec." << std::endl;
// -----------------------------------------------------
// -----------------------------------------------------
// find first non empty leaf cell
OctreeClass::Iterator iLeafs(&tree);
iLeafs.gotoBottomLeft();
const ContainerClass *const Targets = iLeafs.getCurrentListTargets();
const unsigned int NumTargets = Targets->getSize();
FReal* Potential = new FReal [NumTargets];
FBlas::setzero(NumTargets, Potential);
FReal* Force = new FReal [NumTargets * 3];
FBlas::setzero(NumTargets * 3, Force);
std::cout << "\nDirect computation of " << NumTargets << " target particles ..." << std::endl;
const MatrixKernelClass MatrixKernel;
do {
const ContainerClass *const Sources = iLeafs.getCurrentListSrc();
unsigned int counter = 0;
ContainerClass::ConstBasicIterator iTarget(*Targets);
while(iTarget.hasNotFinished()) {
const FReal wt = iTarget.data().getPhysicalValue();
ContainerClass::ConstBasicIterator iSource(*Sources);
while(iSource.hasNotFinished()) {
if (&iTarget.data() != &iSource.data()) {
const FReal one_over_r = MatrixKernel.evaluate(iTarget.data().getPosition(),
iSource.data().getPosition());
const FReal ws = iSource.data().getPhysicalValue();
// potential
Potential[counter] += one_over_r * ws;
// force
FPoint force(iSource.data().getPosition() - iTarget.data().getPosition());
force *= ((ws*wt) * (one_over_r*one_over_r*one_over_r));
Force[counter*3 + 0] += force.getX();
Force[counter*3 + 1] += force.getY();
Force[counter*3 + 2] += force.getZ();
}
iSource.gotoNext();
}
counter++;
iTarget.gotoNext();
}
} while(iLeafs.moveRight());
FReal* ApproxPotential = new FReal [NumTargets];
FReal* ApproxForce = new FReal [NumTargets * 3];
unsigned int counter = 0;
ContainerClass::ConstBasicIterator iTarget(*Targets);
while(iTarget.hasNotFinished()) {
ApproxPotential[counter] = iTarget.data().getPotential();
ApproxForce[counter*3 + 0] = iTarget.data().getForces().getX();
ApproxForce[counter*3 + 1] = iTarget.data().getForces().getY();
ApproxForce[counter*3 + 2] = iTarget.data().getForces().getZ();
counter++;
iTarget.gotoNext();
}
std::cout << "\nPotential error:" << std::endl;
std::cout << "Relative L2 error = " << computeL2norm( NumTargets, Potential, ApproxPotential)
<< std::endl;
std::cout << "Relative Lmax error = " << computeINFnorm(NumTargets, Potential, ApproxPotential)
<< std::endl;
std::cout << "\nForce error:" << std::endl;
std::cout << "Relative L2 error = " << computeL2norm( NumTargets*3, Force, ApproxForce)
<< std::endl;
std::cout << "Relative Lmax error = " << computeINFnorm(NumTargets*3, Force, ApproxForce)
<< std::endl;
std::cout << std::endl;
// free memory
delete [] Potential;
delete [] ApproxPotential;
delete [] Force;
delete [] ApproxForce;
/*
// Check if particles are strictly within its containing cells
const FReal BoxWidthLeaf = BoxWidth / FReal(FMath::pow(2, TreeHeight-1));
OctreeClass::Iterator octreeIterator(&tree);
octreeIterator.gotoBottomLeft();
do{
const CellClass *const LeafCell = octreeIterator.getCurrentCell();
const FPoint& LeafCellCenter = LeafCell -> getPosition();
const ContainerClass *const Particles = octreeIterator.getCurrentListSrc();
ContainerClass::ConstBasicIterator particleIterator(*Particles);
while(particleIterator.hasNotFinished()) {
const FPoint distance(LeafCellCenter-particleIterator.data().getPosition());
std::cout << "center - particle = " << distance << " < " << BoxWidthLeaf/FReal(2.) << std::endl;
if (std::abs(distance.getX())>BoxWidthLeaf/FReal(2.) ||
std::abs(distance.getY())>BoxWidthLeaf/FReal(2.) ||
std::abs(distance.getZ())>BoxWidthLeaf/FReal(2.)) {
std::cout << "stop" << std::endl;
exit(-1);
}
particleIterator.gotoNext();
}
} while(octreeIterator.moveRight());
*/
return 0;
}
// ===================================================================================
// Logiciel initial: ScalFmm Version 0.5
// Co-auteurs : Olivier Coulaud, Bérenger Bramas.
// Propriétaires : INRIA.
// Copyright © 2011-2012, diffusé sous les termes et conditions d’une licence propriétaire.
// Initial software: ScalFmm Version 0.5
// Co-authors: Olivier Coulaud, Bérenger Bramas.
// Owners: INRIA.
// Copyright © 2011-2012, spread under the terms and conditions of a proprietary license.
// ===================================================================================
// ==== CMAKE =====
// @FUSE_STARPU
// ================
#include <starpu.h>
#include "../../Src/Utils/FTic.hpp"
#include "../../Src/Utils/FParameters.hpp"
#include "../../Src/Containers/FOctree.hpp"
#include "../../Src/Containers/FVector.hpp"
#include "../../Src/Core/FFmmAlgorithmStarpu.hpp"
#include "../../Src/Components/FSimpleLeaf.hpp"
#include "../../Src/Kernels/Spherical/FSphericalKernel.hpp"
#include "../../Src/Kernels/Spherical/FSphericalCell.hpp"
#include "../../Src/Kernels/Spherical/FSphericalParticle.hpp"
#include "../../Src/Files/FFmaLoader.hpp"