Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
74e8a2ad
Commit
74e8a2ad
authored
Aug 26, 2014
by
COULAUD Olivier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove duplicated section.
parent
602599bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
69 deletions
+4
-69
Examples/compareAllPoissonKernels.cpp
Examples/compareAllPoissonKernels.cpp
+4
-69
No files found.
Examples/compareAllPoissonKernels.cpp
View file @
74e8a2ad
...
...
@@ -328,74 +328,6 @@ int main(int argc, char* argv[])
//
////////////////////////////////////////////////////////////////////
//
{
// begin FFmaBlas kernel
std
::
cout
<<
"
\n
FFmaBlas FMM ... P: "
<<
DevP
<<
std
::
endl
;
// typedefs
typedef
FSphericalCell
CellClass
;
typedef
FP2PParticleContainerIndexed
<>
ContainerClass
;
typedef
FSimpleLeaf
<
ContainerClass
>
LeafClass
;
typedef
FOctree
<
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
typedef
FSphericalBlockBlasKernel
<
CellClass
,
ContainerClass
>
KernelClass
;
typedef
FFmmAlgorithmThread
<
OctreeClass
,
CellClass
,
ContainerClass
,
KernelClass
,
LeafClass
>
FmmClass
;
// init cell class and oct-tree
CellClass
::
Init
(
DevP
,
true
);
// only for blas
OctreeClass
tree
(
TreeHeight
,
SubTreeHeight
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
{
// -----------------------------------------------------
time
.
tic
();
for
(
int
idxPart
=
0
;
idxPart
<
loader
.
getNumberOfParticles
()
;
++
idxPart
){
// put in tree
tree
.
insert
(
particles
[
idxPart
].
getPosition
(),
idxPart
,
particles
[
idxPart
].
getPhysicalValue
());
}
time
.
tac
();
std
::
cout
<<
"( FFmaBlockBlas@Inserting Particles = "
<<
time
.
elapsed
()
<<
" s)."
<<
std
::
endl
;
}
// -----------------------------------------------------
// -----------------------------------------------------
time
.
tic
();
KernelClass
kernels
(
DevP
,
TreeHeight
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
FmmClass
algorithm
(
&
tree
,
&
kernels
);
algorithm
.
execute
();
time
.
tac
();
std
::
cout
<<
"(FFmaBlockBlas @Algorithm = "
<<
time
.
elapsed
()
<<
" s)."
<<
std
::
endl
;
// -----------------------------------------------------
FReal
energy
=
0.0
;
FMath
::
FAccurater
potentialDiff
;
FMath
::
FAccurater
fx
,
fy
,
fz
;
{
// Check that each particle has been summed with all other
tree
.
forEachLeaf
([
&
](
LeafClass
*
leaf
){
const
FReal
*
const
physicalValues
=
leaf
->
getTargets
()
->
getPhysicalValues
();
const
FReal
*
const
potentials
=
leaf
->
getTargets
()
->
getPotentials
();
const
FReal
*
const
forcesX
=
leaf
->
getTargets
()
->
getForcesX
();
const
FReal
*
const
forcesY
=
leaf
->
getTargets
()
->
getForcesY
();
const
FReal
*
const
forcesZ
=
leaf
->
getTargets
()
->
getForcesZ
();
const
int
nbParticlesInLeaf
=
leaf
->
getTargets
()
->
getNbParticles
();
const
FVector
<
int
>&
indexes
=
leaf
->
getTargets
()
->
getIndexes
();
for
(
int
idxPart
=
0
;
idxPart
<
nbParticlesInLeaf
;
++
idxPart
){
const
int
indexPartOrig
=
indexes
[
idxPart
];
potentialDiff
.
add
(
particles
[
indexPartOrig
].
getPotential
(),
potentials
[
idxPart
]);
fx
.
add
(
particles
[
indexPartOrig
].
getForces
()[
0
],
forcesX
[
idxPart
]);
fy
.
add
(
particles
[
indexPartOrig
].
getForces
()[
1
],
forcesY
[
idxPart
]);
fz
.
add
(
particles
[
indexPartOrig
].
getForces
()[
2
],
forcesZ
[
idxPart
]);
energy
+=
potentials
[
idxPart
]
*
physicalValues
[
idxPart
]
;
}
});
}
// Print for information
std
::
cout
<<
"FFmaBlockBlas Energy "
<<
FMath
::
Abs
(
energy
-
energyD
)
/
energyD
<<
std
::
endl
;
std
::
cout
<<
"FFmaBlockBlas Potential "
<<
potentialDiff
<<
std
::
endl
;
std
::
cout
<<
"FFmaBlockBlas Fx "
<<
fx
<<
std
::
endl
;
std
::
cout
<<
"FFmaBlockBlas Fy "
<<
fy
<<
std
::
endl
;
std
::
cout
<<
"FFmaBlockBlas Fz "
<<
fz
<<
std
::
endl
;
}
// end FFmaBlas kernel
{
// begin FFmaBlas kernel FSphericalBlockBlasKernel
std
::
cout
<<
"
\n
FFmaBlas FMM ... P: "
<<
DevP
<<
std
::
endl
;
...
...
@@ -464,7 +396,10 @@ int main(int argc, char* argv[])
std
::
cout
<<
"FFmaBlas Fy "
<<
fy
<<
std
::
endl
;
std
::
cout
<<
"FFmaBlas Fz "
<<
fz
<<
std
::
endl
;
}
// end FFmaBlas kernel
{
// begin FFmaBlockBlas kernel FSphericalBlockBlasKernel
//
////////////////////////////////////////////////////////////////////
//
{
// begin FFmaBlockBlas kernel
std
::
cout
<<
"
\n
FFmaBlockBlas FMM ... P: "
<<
DevP
<<
std
::
endl
;
// typedefs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment