Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
ScalFMM
Commits
7757df8c
Commit
7757df8c
authored
13 years ago
by
Matthias Messner
Browse files
Options
Downloads
Patches
Plain Diff
bugfix in FChebKernel.hpp, added starpu support in testChebAlgorithm [WIP]
parent
1ad28c71
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Src/Kernels/Chebyshev/FChebKernel.hpp
+4
-4
4 additions, 4 deletions
Src/Kernels/Chebyshev/FChebKernel.hpp
Tests/Kernels/testChebAlgorithm.cpp
+22
-6
22 additions, 6 deletions
Tests/Kernels/testChebAlgorithm.cpp
UTests/utestChebyshevDirect.cpp
+7
-5
7 additions, 5 deletions
UTests/utestChebyshevDirect.cpp
with
33 additions
and
15 deletions
Src/Kernels/Chebyshev/FChebKernel.hpp
+
4
−
4
View file @
7757df8c
...
@@ -179,10 +179,10 @@ public:
...
@@ -179,10 +179,10 @@ public:
// TargetParticles);
// TargetParticles);
// 2.c) apply Sx and Px (grad Sx)
// 2.c) apply Sx and Px (grad Sx)
AbstractBaseClass
::
Interpolator
->
applyL2P
Gradient
(
LeafCellCenter
,
AbstractBaseClass
::
Interpolator
->
applyL2P
Total
(
LeafCellCenter
,
AbstractBaseClass
::
BoxWidthLeaf
,
AbstractBaseClass
::
BoxWidthLeaf
,
LeafCell
->
getLocal
(),
LeafCell
->
getLocal
(),
TargetParticles
);
TargetParticles
);
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Tests/Kernels/testChebAlgorithm.cpp
+
22
−
6
View file @
7757df8c
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
#include
<cstdio>
#include
<cstdio>
#include
<cstdlib>
#include
<cstdlib>
#include
<starpu.h>
#include
"../../Src/Kernels/Chebyshev/FChebParticle.hpp"
#include
"../../Src/Kernels/Chebyshev/FChebParticle.hpp"
#include
"../../Src/Kernels/Chebyshev/FChebLeaf.hpp"
#include
"../../Src/Kernels/Chebyshev/FChebLeaf.hpp"
#include
"../../Src/Kernels/Chebyshev/FChebCell.hpp"
#include
"../../Src/Kernels/Chebyshev/FChebCell.hpp"
...
@@ -38,6 +40,7 @@
...
@@ -38,6 +40,7 @@
#include
"../../Src/Core/FFmmAlgorithm.hpp"
#include
"../../Src/Core/FFmmAlgorithm.hpp"
#include
"../../Src/Core/FFmmAlgorithmThread.hpp"
#include
"../../Src/Core/FFmmAlgorithmThread.hpp"
#include
"../../Src/Core/FFmmAlgorithmStarpu.hpp"
/** This program show an example of use of
/** This program show an example of use of
...
@@ -81,8 +84,8 @@ int main(int argc, char* argv[])
...
@@ -81,8 +84,8 @@ int main(int argc, char* argv[])
{
{
const
unsigned
int
ORDER
=
3
;
const
unsigned
int
ORDER
=
3
;
const
FReal
epsilon
=
FParameters
::
getValue
(
argc
,
argv
,
"-eps"
,
FReal
(
1e-3
));
const
FReal
epsilon
=
FParameters
::
getValue
(
argc
,
argv
,
"-eps"
,
FReal
(
1e-3
));
const
long
NbPart
=
FParameters
::
getValue
(
argc
,
argv
,
"-num"
,
400000
0
);
const
long
NbPart
=
FParameters
::
getValue
(
argc
,
argv
,
"-num"
,
400000
);
const
unsigned
int
TreeHeight
=
FParameters
::
getValue
(
argc
,
argv
,
"-h"
,
7
);
const
unsigned
int
TreeHeight
=
FParameters
::
getValue
(
argc
,
argv
,
"-h"
,
6
);
const
unsigned
int
SubTreeHeight
=
FParameters
::
getValue
(
argc
,
argv
,
"-sh"
,
2
);
const
unsigned
int
SubTreeHeight
=
FParameters
::
getValue
(
argc
,
argv
,
"-sh"
,
2
);
const
unsigned
int
NbThreads
=
FParameters
::
getValue
(
argc
,
argv
,
"-t"
,
1
);
const
unsigned
int
NbThreads
=
FParameters
::
getValue
(
argc
,
argv
,
"-t"
,
1
);
...
@@ -105,10 +108,23 @@ int main(int argc, char* argv[])
...
@@ -105,10 +108,23 @@ int main(int argc, char* argv[])
typedef
FChebMatrixKernelR
MatrixKernelClass
;
typedef
FChebMatrixKernelR
MatrixKernelClass
;
typedef
FChebCell
<
ORDER
>
CellClass
;
typedef
FChebCell
<
ORDER
>
CellClass
;
typedef
FOctree
<
ParticleClass
,
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
typedef
FOctree
<
ParticleClass
,
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
//typedef FChebKernel<ParticleClass,CellClass,ContainerClass,MatrixKernelClass,ORDER> KernelClass;
typedef
FChebKernel
<
ParticleClass
,
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
>
KernelClass
;
typedef
FChebSymKernel
<
ParticleClass
,
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
>
KernelClass
;
//typedef FChebSymKernel<ParticleClass,CellClass,ContainerClass,MatrixKernelClass,ORDER> KernelClass;
//typedef FFmmAlgorithm<OctreeClass,ParticleClass,CellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
typedef
FFmmAlgorithm
<
OctreeClass
,
ParticleClass
,
CellClass
,
ContainerClass
,
KernelClass
,
LeafClass
>
FmmClass
;
typedef
FFmmAlgorithmThread
<
OctreeClass
,
ParticleClass
,
CellClass
,
ContainerClass
,
KernelClass
,
LeafClass
>
FmmClass
;
//typedef FFmmAlgorithmThread<OctreeClass,ParticleClass,CellClass,ContainerClass,KernelClass,LeafClass> FmmClass;
// // 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 //////////////////////////////////////////////////////
// What we do //////////////////////////////////////////////////////
std
::
cout
<<
">> Testing the Chebyshev interpolation base FMM algorithm.
\n
"
;
std
::
cout
<<
">> Testing the Chebyshev interpolation base FMM algorithm.
\n
"
;
...
...
This diff is collapsed.
Click to expand it.
UTests/utestChebyshevDirect.cpp
+
7
−
5
View file @
7757df8c
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include
"../Src/Kernels/Chebyshev/FChebCell.hpp"
#include
"../Src/Kernels/Chebyshev/FChebCell.hpp"
#include
"../Src/Kernels/Chebyshev/FChebMatrixKernel.hpp"
#include
"../Src/Kernels/Chebyshev/FChebMatrixKernel.hpp"
#include
"../Src/Kernels/Chebyshev/FChebKernel.hpp"
#include
"../Src/Kernels/Chebyshev/FChebKernel.hpp"
#include
"../Src/Kernels/Chebyshev/FChebSymKernel.hpp"
/*
/*
In this test we compare the spherical fmm results and the direct results.
In this test we compare the spherical fmm results and the direct results.
...
@@ -70,6 +71,7 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
...
@@ -70,6 +71,7 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
typedef
FChebCell
<
ORDER
>
CellClass
;
typedef
FChebCell
<
ORDER
>
CellClass
;
typedef
FOctree
<
ParticleClass
,
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
typedef
FOctree
<
ParticleClass
,
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
typedef
FChebKernel
<
ParticleClass
,
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
>
KernelClass
;
typedef
FChebKernel
<
ParticleClass
,
CellClass
,
ContainerClass
,
MatrixKernelClass
,
ORDER
>
KernelClass
;
//typedef FChebSymKernel<ParticleClass,CellClass,ContainerClass,MatrixKernelClass,ORDER> KernelClass;
typedef
FFmmAlgorithm
<
OctreeClass
,
ParticleClass
,
CellClass
,
ContainerClass
,
KernelClass
,
LeafClass
>
FmmClass
;
typedef
FFmmAlgorithm
<
OctreeClass
,
ParticleClass
,
CellClass
,
ContainerClass
,
KernelClass
,
LeafClass
>
FmmClass
;
// Warning in make test the exec dir it Build/UTests
// Warning in make test the exec dir it Build/UTests
...
@@ -110,17 +112,17 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
...
@@ -110,17 +112,17 @@ class TestChebyshevDirect : public FUTester<TestChebyshevDirect> {
for
(
int
idxOther
=
idxTarget
+
1
;
idxOther
<
loader
.
getNumberOfParticles
()
;
++
idxOther
){
for
(
int
idxOther
=
idxTarget
+
1
;
idxOther
<
loader
.
getNumberOfParticles
()
;
++
idxOther
){
//kernels.directInteractionMutual(&particles[idxTarget], &particles[idxOther]);
//kernels.directInteractionMutual(&particles[idxTarget], &particles[idxOther]);
const
FReal
wt
=
particles
[
idxTarget
].
getPhysicalValue
();
const
FReal
wt
=
particles
[
idxTarget
].
getPhysicalValue
();
const
FReal
ws
=
particles
[
idxOther
].
getPhysicalValue
();
const
FReal
ws
=
particles
[
idxOther
].
getPhysicalValue
();
const
FReal
one_over_r
=
MatrixKernel
.
evaluate
(
particles
[
idxTarget
].
getPosition
(),
const
FReal
one_over_r
=
MatrixKernel
.
evaluate
(
particles
[
idxTarget
].
getPosition
(),
particles
[
idxOther
].
getPosition
());
particles
[
idxOther
].
getPosition
());
// potential
// potential
particles
[
idxTarget
].
incPotential
(
one_over_r
*
ws
);
particles
[
idxTarget
].
incPotential
(
one_over_r
*
ws
);
particles
[
idxOther
].
incPotential
(
one_over_r
*
wt
);
particles
[
idxOther
].
incPotential
(
one_over_r
*
wt
);
// force
// force
F3DPosition
force
(
particles
[
idx
Target
].
getPosition
()
-
particles
[
idx
Other
].
getPosition
());
F3DPosition
force
(
particles
[
idx
Other
].
getPosition
()
-
particles
[
idx
Target
].
getPosition
());
force
*=
((
ws
*
wt
)
*
(
one_over_r
*
one_over_r
*
one_over_r
));
force
*=
((
ws
*
wt
)
*
(
one_over_r
*
one_over_r
*
one_over_r
));
particles
[
idxTarget
].
incForces
(
force
.
getX
(),
force
.
getY
(),
force
.
getZ
());
particles
[
idxTarget
].
incForces
(
force
.
getX
(),
force
.
getY
(),
force
.
getZ
());
particles
[
idxOther
].
incForces
(
-
force
.
getX
(),
-
force
.
getY
(),
-
force
.
getZ
());
particles
[
idxOther
].
incForces
(
-
force
.
getX
(),
-
force
.
getY
(),
-
force
.
getZ
());
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment