Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
1382bfae
Commit
1382bfae
authored
Mar 13, 2018
by
COULAUD Olivier
Browse files
Remove all warnings with g++-7.2
parent
e0420347
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Examples/CMakeLists.txt
View file @
1382bfae
...
...
@@ -12,6 +12,7 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BUILD_TYPE})
INCLUDE_DIRECTORIES
(
${
SCALFMM_BINARY_DIR
}
/Src
${
SCALFMM_SOURCE_DIR
}
/Src
${
SCALFMM_SOURCE_DIR
}
/Contribs
${
SCALFMM_INCLUDES
}
)
...
...
Src/Components/FBasicCell.hpp
View file @
1382bfae
...
...
@@ -23,7 +23,7 @@
class
FBasicCell
:
public
FAbstractSerializable
{
MortonIndex
mortonIndex
;
///< Morton index (need by most elements)
FTreeCoordinate
coordinate
;
///< The position
std
::
size_t
level
;
///< Level in tree
int
/*
std::size_t
*/
level
;
///< Level in tree
public:
/** Default constructor */
...
...
@@ -34,11 +34,11 @@ public:
virtual
~
FBasicCell
(){
}
std
::
size_t
getLevel
()
const
{
int
/*
std::size_t
*/
getLevel
()
const
{
return
this
->
level
;
}
void
setLevel
(
std
::
size_t
inLevel
)
{
void
setLevel
(
int
/*
std::size_t
*/
inLevel
)
{
this
->
level
=
inLevel
;
}
...
...
Src/Containers/FTreeCoordinate.hpp
View file @
1382bfae
...
...
@@ -27,7 +27,7 @@ private:
public:
/** Default constructor (position = {0,0,0})*/
FTreeCoordinate
()
:
point_t
()
{}
explicit
FTreeCoordinate
()
:
point_t
()
{}
/** Constructor from Morton index */
[[
gnu
::
deprecated
]]
...
...
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
View file @
1382bfae
...
...
@@ -6,24 +6,24 @@
#include <array>
#include <vector>
#include "
../
Utils/FAssert.hpp"
#include "
../
Utils/FLog.hpp"
#include "Utils/FAssert.hpp"
#include "Utils/FLog.hpp"
#include "
../
Utils/FTic.hpp"
#include "
../
Utils/FGlobal.hpp"
#include "
../
Utils/FMemUtils.hpp"
#include "
../
Utils/FEnv.hpp"
#include "Utils/FTic.hpp"
#include "Utils/FGlobal.hpp"
#include "Utils/FMemUtils.hpp"
#include "Utils/FEnv.hpp"
#include "
../
Containers/FBoolArray.hpp"
#include "
../
Containers/FOctree.hpp"
#include "
../
Containers/FLightOctree.hpp"
#include "Containers/FBoolArray.hpp"
#include "Containers/FOctree.hpp"
#include "Containers/FLightOctree.hpp"
#include "
../
Containers/FBufferWriter.hpp"
#include "
../
Containers/FBufferReader.hpp"
#include "Containers/FBufferWriter.hpp"
#include "Containers/FBufferReader.hpp"
#include "
../
Utils/FEnv.hpp"
#include "Utils/FEnv.hpp"
#include "
../
Utils/FMpi.hpp"
#include "Utils/FMpi.hpp"
#include <omp.h>
...
...
@@ -511,7 +511,7 @@ protected:
// We work from height-1 to 1
for
(
int
idxLevel
=
OctreeHeight
-
2
;
idxLevel
>
0
;
--
idxLevel
){
const
int
fakeLevel
=
idxLevel
+
offsetRealTree
;
//
const int fakeLevel = idxLevel + offsetRealTree;
// Does my cells are covered by my neighbors working interval and so I have no more work?
const
bool
noMoreWorkForMe
=
(
idProcess
!=
0
&&
!
procHasWorkAtLevel
(
idxLevel
+
1
,
idProcess
));
if
(
noMoreWorkForMe
){
...
...
@@ -1392,7 +1392,7 @@ protected:
// for each levels exepted leaf level
for
(
int
idxLevel
=
1
;
idxLevel
<
OctreeHeight
-
1
;
++
idxLevel
){
const
int
fakeLevel
=
idxLevel
+
offsetRealTree
;
//
const int fakeLevel = idxLevel + offsetRealTree;
// If nothing to do in the next level skip the current one
if
(
idProcess
!=
0
&&
!
procHasWorkAtLevel
(
idxLevel
+
1
,
idProcess
)
){
avoidGotoLeftIterator
.
moveDown
();
...
...
Src/Core/FFmmAlgorithmThreadProcTsm.hpp
View file @
1382bfae
...
...
@@ -382,7 +382,7 @@ protected:
iterArray
[
leafs
++
]
=
octreeIterator
;
}
while
(
octreeIterator
.
moveRight
());
const
int
chunkSize
=
FMath
::
Max
(
1
,
numberOfLeafs
/
(
omp_get_max_threads
()
*
omp_get_max_threads
()));
//
const int chunkSize = FMath::Max(1 , numberOfLeafs/(omp_get_max_threads()*omp_get_max_threads()));
FLOG
(
computationCounter
.
tic
());
#pragma omp parallel num_threads(MaxThreads)
...
...
Src/GroupTree/Core/FGroupTaskStarpuMpiAlgorithm.hpp
View file @
1382bfae
...
...
@@ -101,11 +101,13 @@ protected:
const
TagInfo
currentInfo
=
{
inLevel
,
mindex
,
idxBloc
,
mode
};
auto
found
=
previousTag
.
find
(
tag
);
if
(
found
!=
previousTag
.
end
()){
const
TagInfo
prev
=
found
->
second
;
assert
(
currentInfo
==
prev
);
#ifndef NDEBUG
const
TagInfo
prev
=
found
->
second
;
#endif
assert
(
currentInfo
==
prev
);
}
else
{
previousTag
[
tag
]
=
currentInfo
;
previousTag
[
tag
]
=
currentInfo
;
}
}
return
tag
;
...
...
Src/Kernels/Taylor/FTaylorKernel.hpp
View file @
1382bfae
...
...
@@ -2,11 +2,12 @@
#ifndef FTAYLORKERNEL_HPP
#define FTAYLORKERNEL_HPP
#include "../../Components/FAbstractKernels.hpp"
#include "../../Utils/FMemUtils.hpp"
#include "../../Utils/FLog.hpp"
#include "../../Utils/FSmartPointer.hpp"
#include "../P2P/FP2PR.hpp"
#include <cassert>
#include "Components/FAbstractKernels.hpp"
#include "Utils/FMemUtils.hpp"
#include "Utils/FLog.hpp"
#include "Utils/FSmartPointer.hpp"
#include "Kernels/P2P/FP2PR.hpp"
/**
* @author Cyrille Piacibello
...
...
@@ -183,7 +184,10 @@ private:
* \f[ C^{b}_{a} \f]
*/
FReal
combin
(
const
int
&
a
,
const
int
&
b
){
if
(
a
<
b
)
{
printf
(
"combin :: Error combin negative!! a=%d b=%d
\n
"
,
a
,
b
);
exit
(
-
1
)
;
}
// use assert to remove the following warning with gcc
// error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow]
assert
((
"combin :: Error combin negative!!"
,
a
>=
b
));
// if(a<b) {printf("combin :: Error combin negative!! a=%d b=%d\n",a,b); exit(-1) ; }
return
factorials
[
a
]
/
(
factorials
[
b
]
*
factorials
[
a
-
b
])
;
}
...
...
Src/Kernels/Uniform/FUnifTensorialKernel.hpp
View file @
1382bfae
...
...
@@ -123,34 +123,34 @@ public:
}
template
<
class
SymbolicData
>
void
M2M
(
typename
CellClass
::
multipole_t
*
const
FRestrict
ParentMultipole
,
const
SymbolicData
*
const
ParentSymb
,
const
typename
CellClass
::
multipole_t
*
const
FRestrict
*
const
FRestrict
ChildMultipoles
,
const
SymbolicData
*
const
/*ChildSymbs*/
[])
{
for
(
int
idxV
=
0
;
idxV
<
NVALS
;
++
idxV
){
for
(
int
idxRhs
=
0
;
idxRhs
<
nRhs
;
++
idxRhs
){
// update multipole index
int
idxMul
=
idxV
*
nRhs
+
idxRhs
;
// 1) apply Sy
FBlas
::
scal
(
AbstractBaseClass
::
nnodes
,
FReal
(
0.
),
ParentMultipole
->
get
(
idxMul
));
for
(
unsigned
int
ChildIndex
=
0
;
ChildIndex
<
8
;
++
ChildIndex
){
if
(
ChildMultipoles
[
ChildIndex
]){
AbstractBaseClass
::
Interpolator
->
applyM2M
(
ChildIndex
,
ChildMultipoles
[
ChildIndex
]
->
get
(
idxMul
),
ParentMultipole
->
get
(
idxMul
),
ParentSymb
->
getLevel
()
/*Cell width extension specific*/
);
}
}
// 2) Apply Discete Fourier Transform
M2LHandler
.
applyZeroPaddingAndDFT
(
ParentMultipole
->
get
(
idxMul
),
ParentMultipole
->
getTransformed
(
idxMul
));
}
}
// NVALS
}
template
<
class
SymbolicData
>
void
M2M
(
typename
CellClass
::
multipole_t
*
const
FRestrict
ParentMultipole
,
const
SymbolicData
*
const
ParentSymb
,
const
typename
CellClass
::
multipole_t
*
const
FRestrict
*
const
FRestrict
ChildMultipoles
,
const
SymbolicData
*
const
/*ChildSymbs*/
[])
{
for
(
int
idxV
=
0
;
idxV
<
NVALS
;
++
idxV
){
for
(
int
idxRhs
=
0
;
idxRhs
<
nRhs
;
++
idxRhs
){
// update multipole index
int
idxMul
=
idxV
*
nRhs
+
idxRhs
;
// 1) apply Sy
FBlas
::
scal
(
AbstractBaseClass
::
nnodes
,
FReal
(
0.
),
ParentMultipole
->
get
(
idxMul
));
for
(
unsigned
int
ChildIndex
=
0
;
ChildIndex
<
8
;
++
ChildIndex
){
if
(
ChildMultipoles
[
ChildIndex
]){
AbstractBaseClass
::
Interpolator
->
applyM2M
(
ChildIndex
,
ChildMultipoles
[
ChildIndex
]
->
get
(
idxMul
),
ParentMultipole
->
get
(
idxMul
),
ParentSymb
->
getLevel
()
/*Cell width extension specific*/
);
}
}
// 2) Apply Discete Fourier Transform
M2LHandler
.
applyZeroPaddingAndDFT
(
ParentMultipole
->
get
(
idxMul
),
ParentMultipole
->
getTransformed
(
idxMul
));
}
}
// NVALS
}
template
<
class
SymbolicData
>
...
...
Src/Utils/FConstFuncs.hpp
View file @
1382bfae
...
...
@@ -12,7 +12,7 @@ constexpr T Fpow(T a, std::size_t p) {
template
<
typename
T
,
typename
U
,
typename
std
::
enable_if
<
std
::
is_arithmetic
<
T
>
::
value
,
T
>::
type
*
=
nullptr
,
typename
std
::
enable_if
<
std
::
is_arithmetic
<
U
>::
value
,
U
>::
type
*
=
nullptr
>
constexpr
bool
Ffeq
(
T
a
,
U
b
,
T
epsilon
=
1e-7
)
{
constexpr
bool
Ffeq
(
const
T
&
a
,
const
U
&
b
,
T
epsilon
=
1e-7
)
{
return
a
-
b
<
epsilon
&&
b
-
a
<
epsilon
;
}
...
...
Src/Utils/FPoint.hpp
View file @
1382bfae
...
...
@@ -370,7 +370,7 @@ public:
template
<
class
T
,
must_be_floating
<
T
>
=
nullptr
>
friend
bool
operator
==
(
const
FPoint
<
FReal
,
Dim
>&
lhs
,
const
FPoint
<
T
,
Dim
>&
rhs
)
{
auto
lhs_it
=
lhs
.
begin
(),
rhs_it
=
rhs
.
begin
();
for
(
std
::
size_t
i
=
0
;
i
<
Dim
;
i
++
,
++
lhs_it
,
++
rhs_it
)
{
for
(
std
::
size_t
i
=
0
;
i
<
Dim
;
++
i
,
++
lhs_it
,
++
rhs_it
)
{
if
(
!
Ffeq
(
*
lhs_it
,
*
rhs_it
))
{
return
false
;
}
...
...
Tests/CMakeLists.txt
View file @
1382bfae
...
...
@@ -19,6 +19,7 @@ file(
INCLUDE_DIRECTORIES
(
${
SCALFMM_BINARY_DIR
}
/Src
${
SCALFMM_SOURCE_DIR
}
/Src
${
SCALFMM_SOURCE_DIR
}
/Contribs
${
SCALFMM_SOURCE_DIR
}
${
SCALFMM_INCLUDES
}
)
...
...
Tests/GroupTree/testBlockedMpiAlgorithm.cpp
View file @
1382bfae
...
...
@@ -3,42 +3,42 @@
// @FUSE_MPI
// @FUSE_STARPU
#include "
../../Src/
Utils/FGlobal.hpp"
#include "
../../Src/
Utils/FMpi.hpp"
#include "Utils/FGlobal.hpp"
#include "Utils/FMpi.hpp"
#include "
../../Src/
GroupTree/Core/FGroupTree.hpp"
#include "GroupTree/Core/FGroupTree.hpp"
#include "
../../Src/
Components/FSimpleLeaf.hpp"
#include "
../../Src/
Components/FSymbolicData.hpp"
#include "
../../Src/
Containers/FVector.hpp"
#include "Components/FSimpleLeaf.hpp"
#include "Components/FSymbolicData.hpp"
#include "Containers/FVector.hpp"
#include "
../../Src/
Utils/FMath.hpp"
#include "
../../Src/
Utils/FMemUtils.hpp"
#include "
../../Src/
Utils/FParameters.hpp"
#include "Utils/FMath.hpp"
#include "Utils/FMemUtils.hpp"
#include "Utils/FParameters.hpp"
#include "
../../Src/
Files/FRandomLoader.hpp"
#include "Files/FRandomLoader.hpp"
#include "
../../Src/
GroupTree/Core/FGroupTaskStarpuMpiAlgorithm.hpp"
#include "GroupTree/Core/FGroupTaskStarpuMpiAlgorithm.hpp"
#include "
../../Src/
GroupTree/Core/FP2PGroupParticleContainer.hpp"
#include "
../../Src/
GroupTree/Core/FGroupTaskAlgorithm.hpp"
#include "GroupTree/Core/FP2PGroupParticleContainer.hpp"
#include "GroupTree/Core/FGroupTaskAlgorithm.hpp"
#include "
../../Src/
Utils/FParameterNames.hpp"
#include "Utils/FParameterNames.hpp"
#include "
../../Src/
Components/FTestParticleContainer.hpp"
#include "
../../Src/
Components/FTestKernels.hpp"
#include "
../../Src/
Components/FTestCell.hpp"
#include "
../../Src/
GroupTree/TestKernel/FGroupTestParticleContainer.hpp"
#include "Components/FTestParticleContainer.hpp"
#include "Components/FTestKernels.hpp"
#include "Components/FTestCell.hpp"
#include "GroupTree/TestKernel/FGroupTestParticleContainer.hpp"
#include "
../../Src/
Utils/FLeafBalance.hpp"
#include "
../../Src/
Files/FMpiTreeBuilder.hpp"
#include "Utils/FLeafBalance.hpp"
#include "Files/FMpiTreeBuilder.hpp"
#include "
../../Src/
Core/FFmmAlgorithm.hpp"
#include "
../../Src/
Containers/FCoordinateComputer.hpp"
#include "Core/FFmmAlgorithm.hpp"
#include "Containers/FCoordinateComputer.hpp"
#include "
../../Src/
GroupTree/StarPUUtils/FStarPUKernelCapacities.hpp"
#include "
../../Src/
GroupTree/StarPUUtils/FStarPUCpuWrapper.hpp"
#include "GroupTree/StarPUUtils/FStarPUKernelCapacities.hpp"
#include "GroupTree/StarPUUtils/FStarPUCpuWrapper.hpp"
...
...
Tests/GroupTree/testBlockedMpiInterpolation.cpp
View file @
1382bfae
...
...
@@ -5,33 +5,33 @@
// @FUSE_MPI
// @FUSE_STARPU
#include "
../../Src/
Files/FBlockedMpiInterpolation.hpp"
#include "
../../Src/
Utils/FGlobal.hpp"
#include "Files/FBlockedMpiInterpolation.hpp"
#include "Utils/FGlobal.hpp"
#include "
../../Src/
Kernels/P2P/FP2PParticleContainer.hpp"
#include "Kernels/P2P/FP2PParticleContainer.hpp"
#include "
../../Src/
Kernels/Chebyshev/FChebSymKernel.hpp"
#include "
../../Src/
Kernels/Chebyshev/FChebCell.hpp"
#include "Kernels/Chebyshev/FChebSymKernel.hpp"
#include "Kernels/Chebyshev/FChebCell.hpp"
#include "Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "
../../Src/
GroupTree/Core/FGroupSeqAlgorithm.hpp"
#include "
../../Src/
GroupTree/Core/FGroupTaskAlgorithm.hpp"
#include "
../../Src/
GroupTree/Core/FGroupTaskStarpuAlgorithm.hpp"
#include "
../../Src/
GroupTree/Core/FP2PGroupParticleContainer.hpp"
#include "GroupTree/Core/FGroupSeqAlgorithm.hpp"
#include "GroupTree/Core/FGroupTaskAlgorithm.hpp"
#include "GroupTree/Core/FGroupTaskStarpuAlgorithm.hpp"
#include "GroupTree/Core/FP2PGroupParticleContainer.hpp"
#include "
../../Src/
Components/FTestParticleContainer.hpp"
#include "
../../Src/
Components/FTestCell.hpp"
#include "
../../Src/
Components/FTestKernels.hpp"
#include "Components/FTestParticleContainer.hpp"
#include "Components/FTestCell.hpp"
#include "Components/FTestKernels.hpp"
#include "
../../Src/
Core/FFmmAlgorithmThreadProc.hpp"
#include "
../../Src/
Files/FMpiTreeBuilder.hpp"
#include "
../../Src/
GroupTree/Core/FGroupTaskStarpuMpiAlgorithm.hpp"
#include "Core/FFmmAlgorithmThreadProc.hpp"
#include "Files/FMpiTreeBuilder.hpp"
#include "GroupTree/Core/FGroupTaskStarpuMpiAlgorithm.hpp"
#include "
../../Src/
Files/FMpiFmaGenericLoader.hpp"
#include "
../../Src/
Containers/FCoordinateComputer.hpp"
#include "Files/FMpiFmaGenericLoader.hpp"
#include "Containers/FCoordinateComputer.hpp"
#include "
../../Src/
GroupTree/StarPUUtils/FStarPUKernelCapacities.hpp"
#include "GroupTree/StarPUUtils/FStarPUKernelCapacities.hpp"
#include <memory>
...
...
@@ -55,13 +55,13 @@ int main(int argc, char *argv[]){
using
kernelClass
=
FChebSymKernel
<
FReal
,
GroupCellClass
,
GroupContainerClass
,
MatrixKernelClass
,
ORDER
>
;
auto
groupedTree
=
blockedMpiInterpolation
::
execute_algorithm
<
GroupCellClass
,
GroupCellUpClass
,
GroupCellDownClass
,
GroupCellSymbClass
,
kernelClass
,
MatrixKernelClass
>
(
argc
,
argv
);
GroupCellClass
,
GroupCellUpClass
,
GroupCellDownClass
,
GroupCellSymbClass
,
kernelClass
,
MatrixKernelClass
>
(
argc
,
argv
);
// Validation
...
...
Tests/Kernels/testChebAlgorithmProc.cpp
View file @
1382bfae
...
...
@@ -11,31 +11,31 @@
#include <cstdlib>
#include "
../../Src/
Kernels/Chebyshev/FChebCell.hpp"
#include "
../../Src/
Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "
../../Src/
Kernels/Chebyshev/FChebKernel.hpp"
#include "
../../Src/
Kernels/Chebyshev/FChebSymKernel.hpp"
#include "Kernels/Chebyshev/FChebCell.hpp"
#include "Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "Kernels/Chebyshev/FChebKernel.hpp"
#include "Kernels/Chebyshev/FChebSymKernel.hpp"
#include "
../../Src/
Components/FSimpleLeaf.hpp"
#include "
../../Src/
Kernels/P2P/FP2PParticleContainerIndexed.hpp"
#include "Components/FSimpleLeaf.hpp"
#include "Kernels/P2P/FP2PParticleContainerIndexed.hpp"
#include "
../../Src/
Utils/FParameters.hpp"
#include "
../../Src/
Utils/FMemUtils.hpp"
#include "Utils/FParameters.hpp"
#include "Utils/FMemUtils.hpp"
#include "
../../Src/
Containers/FOctree.hpp"
#include "
../../Src/
Containers/FVector.hpp"
#include "Containers/FOctree.hpp"
#include "Containers/FVector.hpp"
#include "
../../Src/
Files/FFmaGenericLoader.hpp"
#include "
../../Src/
Files/FMpiFmaGenericLoader.hpp"
#include "
../../Src/
Files/FMpiTreeBuilder.hpp"
#include "Files/FFmaGenericLoader.hpp"
#include "Files/FMpiFmaGenericLoader.hpp"
#include "Files/FMpiTreeBuilder.hpp"
#include "
../../Src/
Core/FFmmAlgorithm.hpp"
#include "
../../Src/
Core/FFmmAlgorithmThread.hpp"
#include "
../../Src/
Core/FFmmAlgorithmThreadProc.hpp"
#include "Core/FFmmAlgorithm.hpp"
#include "Core/FFmmAlgorithmThread.hpp"
#include "Core/FFmmAlgorithmThreadProc.hpp"
#include "
../../Src/
Utils/FLeafBalance.hpp"
#include "Utils/FLeafBalance.hpp"
#include "
../../Src/
Utils/FParameterNames.hpp"
#include "Utils/FParameterNames.hpp"
/**
* This program runs the FMM Algorithm Distributed with the Chebyshev kernel
...
...
@@ -138,8 +138,8 @@ int main(int argc, char* argv[])
{
// -----------------------------------------------------
std
::
cout
<<
"
\n
Error computation ... "
<<
std
::
endl
;
FReal
potential
;
FReal
fx
,
fy
,
fz
;
FReal
potential
{}
;
FReal
fx
{}
,
fy
{}
,
fz
{}
;
{
// Check that each particle has been summed with all other
tree
.
forEachLeaf
([
&
](
LeafClass
*
leaf
){
...
...
Tests/Kernels/testSphericalDlpolyAlgorithm.cpp
View file @
1382bfae
This diff is collapsed.
Click to expand it.
Tests/Kernels/testUnifAlgorithmProc.cpp
View file @
1382bfae
...
...
@@ -17,30 +17,30 @@
#include <cstdlib>
#include "
../../Src/
Kernels/Uniform/FUnifCell.hpp"
#include "
../../Src/
Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "
../../Src/
Kernels/Uniform/FUnifKernel.hpp"
#include "Kernels/Uniform/FUnifCell.hpp"
#include "Kernels/Interpolation/FInterpMatrixKernel.hpp"
#include "Kernels/Uniform/FUnifKernel.hpp"
#include "
../../Src/
Components/FSimpleLeaf.hpp"
#include "
../../Src/
Kernels/P2P/FP2PParticleContainerIndexed.hpp"
#include "Components/FSimpleLeaf.hpp"
#include "Kernels/P2P/FP2PParticleContainerIndexed.hpp"
#include "
../../Src/
Utils/FParameters.hpp"
#include "
../../Src/
Utils/FMemUtils.hpp"
#include "Utils/FParameters.hpp"
#include "Utils/FMemUtils.hpp"
#include "
../../Src/
Containers/FOctree.hpp"
#include "
../../Src/
Containers/FVector.hpp"
#include "Containers/FOctree.hpp"
#include "Containers/FVector.hpp"
#include "
../../Src/
Files/FFmaScanfLoader.hpp"
#include "
../../Src/
Files/FMpiFmaGenericLoader.hpp"
#include "
../../Src/
Files/FMpiTreeBuilder.hpp"
#include "Files/FFmaScanfLoader.hpp"
#include "Files/FMpiFmaGenericLoader.hpp"
#include "Files/FMpiTreeBuilder.hpp"
#include "
../../Src/
Core/FFmmAlgorithm.hpp"
#include "
../../Src/
Core/FFmmAlgorithmThread.hpp"
#include "
../../Src/
Core/FFmmAlgorithmThreadProc.hpp"
#include "Core/FFmmAlgorithm.hpp"
#include "Core/FFmmAlgorithmThread.hpp"
#include "Core/FFmmAlgorithmThreadProc.hpp"
#include "
../../Src/
Utils/FLeafBalance.hpp"
#include "Utils/FLeafBalance.hpp"
#include "
../../Src/
Utils/FParameterNames.hpp"
#include "Utils/FParameterNames.hpp"
/**
* This program runs the FMM Algorithm Distributed with the Uniform kernel
...
...
@@ -149,8 +149,8 @@ int main(int argc, char* argv[])
{
// -----------------------------------------------------
std
::
cout
<<
"
\n
Error computation ... "
<<
std
::
endl
;
FReal
potential
;
FReal
fx
,
fy
,
fz
;
FReal
potential
{}
;
FReal
fx
{}
,
fy
{}
,
fz
{}
;
{
// Check that each particle has been summed with all other
tree
.
forEachLeaf
([
&
](
LeafClass
*
leaf
){
const
FReal
*
const
potentials
=
leaf
->
getTargets
()
->
getPotentials
();
...
...
Tests/LET_STF_Implicit/testCompareGroupTree.cpp
View file @
1382bfae
...
...
@@ -5,38 +5,38 @@
// @FUSE_BLAS
// ================
#include <memory>
#include "
../../Src/
Utils/FGlobal.hpp"
#include "Utils/FGlobal.hpp"
//#include <mpi.h>
// include algo for linear tree
#include "inria/algorithm/distributed/mpi.hpp"
#include "inria/linear_tree/balance_tree.hpp"
// tree class
#include "
../../Src/
GroupTree/Core/FGroupTree.hpp"
#include "GroupTree/Core/FGroupTree.hpp"
// symbolic data
#include "
../../Src/
Components/FSymbolicData.hpp"
#include "Components/FSymbolicData.hpp"
// cell class
#include "
../../Src/
Kernels/Chebyshev/FChebCell.hpp"
#include "Kernels/Chebyshev/FChebCell.hpp"
// parameter
#include "
../../Src/
Utils/FParameters.hpp"
#include "
../../Src/
Utils/FParameterNames.hpp"
#include "Utils/FParameters.hpp"
#include "Utils/FParameterNames.hpp"
// GroupParticleContianer
#include "
../../Src/
GroupTree/Core/FP2PGroupParticleContainer.hpp"
#include "GroupTree/Core/FP2PGroupParticleContainer.hpp"
// file loader
#include "
../../Src/
Files/FMpiFmaGenericLoader.hpp"
#include "Files/FMpiFmaGenericLoader.hpp"
// FBox
#include "Adaptive/FBox.hpp"
// Group linear tree
#include "
../../Src/
GroupTree/Core/FGroupLinearTree.hpp"
#include "GroupTree/Core/FGroupLinearTree.hpp"
// Function for GroupLinearTree
#include "
../../Src/
GroupTree/Core/FDistributedGroupTreeBuilder.hpp"
#include "
../../Src/
Utils/FTic.hpp"
#include "
../../Src/
Files/FFmaGenericLoader.hpp"
#include "
../../Src/
Utils/FLeafBalance.hpp"
#include "GroupTree/Core/FDistributedGroupTreeBuilder.hpp"
#include "Utils/FTic.hpp"
#include "Files/FFmaGenericLoader.hpp"
#include "Utils/FLeafBalance.hpp"
#include "
../../
Contribs/json.hpp"
#include "Contribs/json.hpp"
#include <memory>
static
const
int
ORDER
=
6
;
...
...
@@ -218,9 +218,7 @@ int main(int argc, char *argv[]) {
auto
tree
=
time
.
elapsed
();
auto
let
=
timer_1
.
elapsed
();
if
(
file
.
fail
()){
// le fichier n'éxiste pas
auto
tree
=
time
.
elapsed
();
auto
let
=
timer_1
.
elapsed
();
// le fichier n'éxiste pas
result
[
"TreeHeight"
]
=
TreeHeight
;
result
[
"GroupSize"
]
=
groupSize
;
result
[
"Filename"
]
=
filename
;
...
...
@@ -244,17 +242,17 @@ int main(int argc, char *argv[]) {
//FFmaGenericLoader<FReal> loader(filename);
const
FSize
NbParticles
=
loader
.
getNumberOfParticles
();
FPoint
<
FReal
>
*
allParticlesToSort
=
new
FPoint
<
FReal
>
[
NbParticles
];
FSize
idxPart
=
0
;
for
(
FSize
idxPart
=
0
;
idxPart
<
loader
.
getNumberOfParticles
()
;
++
idxPart
){
FReal
physicalValue
=
0.1
;
loader
.
fillParticle
(
&
allParticlesToSort
[
idxPart
],
&
physicalValue
);
//Same with file or not
FSize
idxPart
{}
;
for
(
idxPart
=
0
;
idxPart
<
loader
.
getNumberOfParticles
()
;
++
idxPart
){
FReal
physicalValue
=
0.1
;
loader
.
fillParticle
(
&
allParticlesToSort
[
idxPart
],
&
physicalValue
);
//Same with file or not
}
std
::
vector
<
MortonIndex
>
distributedMortonIndex
;
std
::
vector
<
std
::
vector
<
int
>>
sizeForEachGroup
;
sortParticle
(
allParticlesToSort
,
TreeHeight
,
groupSize
,
sizeForEachGroup
,
distributedMortonIndex
,
loader
,
nproc
);
FP2PParticleContainer
<
FReal
>
allParticles
;
for
(
FSize
idxPart
=
0
;
idxPart
<
loader
.
getNumberOfParticles
()
;
++
idxPart
){
for
(
idxPart
=
0
;
idxPart
<
loader
.
getNumberOfParticles
()
;
++
idxPart
){
FReal
physicalValue
=
0.1
;
allParticles
.
push
(
allParticlesToSort
[
idxPart
],
physicalValue
);
}
...
...
Tests/LET_STF_Implicit/testLETGroupTree.cpp
View file @
1382bfae
...
...
@@ -246,7 +246,7 @@ int main(int argc, char *argv[]) {
// show if the block is local
bool
flag
=
dstr_grp_tree_vldr
::
validate_group_tree
(
localGroupTree
,
mpi_comm
);
std
::
cout
<<
comments
<<
std
::
endl
<<
" LET "
<<
std
::
endl
;
std
::
cout
<<
comments
<<
std
::
endl
<<
" LET "
<<
flag
<<
std
::
endl
;
localGroupTree
.
printInfoBlocks
();
std
::