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
1e94dd3b
Commit
1e94dd3b
authored
Sep 05, 2012
by
BRAMAS Berenger
Browse files
Add periodic test in ewal
parent
9e878f8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Src/Files/FEwalLoader.hpp
View file @
1e94dd3b
...
...
@@ -53,7 +53,7 @@ public:
file
.
getline
(
buffer
,
bufferSize
);
int
imcon
;
int
tempi
(
0
);
//
int tempi(0);
FReal
tempf
(
0
);
file
>>
levcfg
>>
imcon
>>
this
->
nbParticles
;
// Periodic case
...
...
Tests/Kernels/testDL_POLY.cpp
View file @
1e94dd3b
...
...
@@ -96,7 +96,7 @@ int main(int argc, char ** argv){
FTic
counter
;
//
const
FReal
coeff_MD
=
138935.4835
/
418.4
;
const
FReal
coeff_MD
=
FReal
(
138935.4835
/
418.4
)
;
//
const
char
*
const
filename
=
FParameters
::
getStr
(
argc
,
argv
,
"-f"
,
"../Data/test20k.fma"
);
...
...
Tests/Kernels/testSphericalEwalAlgorithm.cpp
View file @
1e94dd3b
...
...
@@ -85,7 +85,7 @@ int main(int argc, char ** argv){
///////////////////////What we do/////////////////////////////
std
::
cout
<<
">> This executable has to be used to test Spherical algorithm.
\n
"
;
std
::
cout
<<
">> options are -h H -sh SH -P p -per PER -f FILE -noper -verbose -gen
\n
"
;
std
::
cout
<<
">> options are -h H -sh SH -P p -per PER -f FILE -noper -verbose -gen
-direct
\n
"
;
std
::
cout
<<
">> Recommanded files : ../Data/EwalTest_Periodic.run ../Data/EwalTest_NoPeriodic.run
\n
"
;
//////////////////////////////////////////////////////////////
...
...
@@ -160,6 +160,34 @@ int main(int argc, char ** argv){
std
::
cout
<<
"Done "
<<
"(@Algorithm = "
<<
counter
.
elapsed
()
<<
"s)."
<<
std
::
endl
;
// -----------------------------------------------------
// Do direct
if
(
FParameters
::
existParameter
(
argc
,
argv
,
"-direct"
)){
KernelClass
kernels
(
DevP
,
NbLevels
,
loader
.
getBoxWidth
(),
loader
.
getCenterOfBox
());
for
(
int
idxTarget
=
0
;
idxTarget
<
loader
.
getNumberOfParticles
()
;
++
idxTarget
){
ParticleClass
part
=
particles
[
idxTarget
];
part
.
setForces
(
0
,
0
,
0
);
part
.
setPotential
(
0
);
// compute with all other except itself
for
(
int
idxOther
=
0
;
idxOther
<
loader
.
getNumberOfParticles
()
;
++
idxOther
){
if
(
idxOther
!=
idxTarget
){
kernels
.
directInteraction
(
&
part
,
particles
[
idxOther
]);
}
}
// print result
std
::
cout
<<
" "
<<
part
.
getIndex
()
+
1
<<
"
\t
"
<<
part
.
getType
()
<<
"
\t
"
<<
std
::
setprecision
(
5
)
<<
part
.
getPosition
().
getX
()
<<
"
\t
"
<<
part
.
getPosition
().
getY
()
<<
"
\t
"
<<
part
.
getPosition
().
getZ
()
<<
" Forces:
\t
"
<<
std
::
setprecision
(
8
)
<<
part
.
getForces
().
getX
()
*
coeff_MD1
<<
"
\t
"
<<
part
.
getForces
().
getY
()
*
coeff_MD1
<<
"
\t
"
<<
part
.
getForces
().
getZ
()
*
coeff_MD1
<<
std
::
endl
;
}
}
// -----------------------------------------------------
{
FReal
potential
=
0
;
...
...
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