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
9e878f8d
Commit
9e878f8d
authored
Sep 05, 2012
by
COULAUD Olivier
Browse files
Modifications to compare with DL_POLY code
parent
3bd7cd3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Src/Files/FEwalLoader.hpp
View file @
9e878f8d
...
...
@@ -33,7 +33,7 @@ protected:
FPoint
centerOfBox
;
//< The center of box read from file
FReal
boxWidth
;
//< the box width read from file
int
nbParticles
;
//< the number of particles read from file
int
levcfg
;
//< DL_POLY CONFIG file key. 0,1 or 2
public:
/**
* The constructor need the file name
...
...
@@ -55,7 +55,7 @@ public:
int
imcon
;
int
tempi
(
0
);
FReal
tempf
(
0
);
file
>>
tempi
>>
imcon
>>
this
->
nbParticles
;
file
>>
levcfg
>>
imcon
>>
this
->
nbParticles
;
// Periodic case
if
(
imcon
>
0
)
{
FReal
widthx
,
widthy
,
widthz
;
...
...
@@ -134,10 +134,18 @@ public:
file
.
read
(
type
,
2
);
file
>>
index
;
std
::
getline
(
file
,
line
);
// needed to skip the end of the line in non periodic case
if
(
levcfg
==
0
)
{
file
>>
x
>>
y
>>
z
;
}
else
if
(
levcfg
==
1
)
{
file
>>
x
>>
y
>>
z
;
file
>>
vx
>>
vy
>>
vz
;
}
else
{
file
>>
x
>>
y
>>
z
;
file
>>
vx
>>
vy
>>
vz
;
file
>>
fx
>>
fy
>>
fz
;
}
file
>>
x
>>
y
>>
z
;
file
>>
vx
>>
vy
>>
vz
;
file
>>
fx
>>
fy
>>
fz
;
// std::cout << " x >> y >> z: " << x<< " " <<y<< " " <<z <<std::endl;
inParticle
.
setPosition
(
x
,
y
,
z
);
inParticle
.
setForces
(
fx
,
fy
,
fz
);
...
...
Tests/Kernels/testDL_POLY.cpp
View file @
9e878f8d
...
...
@@ -128,7 +128,7 @@ int main(int argc, char ** argv){
particle
.
setForces
(
0
,
0
,
0
);
particle
.
setPotential
(
0
);
// insert in tree
tree
.
insert
(
part
);
tree
.
insert
(
part
icle
);
}
counter
.
tac
();
...
...
Tests/Kernels/testSphericalEwalAlgorithm.cpp
View file @
9e878f8d
...
...
@@ -97,7 +97,8 @@ int main(int argc, char ** argv){
// recommenda
FTic
counter
;
const
FReal
coeff_MD
=
FReal
(
138935.4835
/
418.4
);
const
FReal
coeff_MD
=
FReal
(
138935.4835
/
418.4
);
const
FReal
coeff_MD1
=
FReal
(
138935.4835
);
// -----------------------------------------------------
...
...
@@ -187,7 +188,7 @@ int main(int argc, char ** argv){
potential
+=
iter
.
data
().
getPotential
()
*
iter
.
data
().
getPhysicalValue
();
if
(
FParameters
::
existParameter
(
argc
,
argv
,
"-verbose"
)){
std
::
cout
<<
" "
<<
iter
.
data
().
getIndex
()
+
1
<<
"
\t
"
<<
std
::
cout
<<
" "
<<
iter
.
data
().
getIndex
()
+
1
<<
"
\t
"
<<
iter
.
data
().
getType
()
<<
"
\t
"
<<
std
::
setprecision
(
5
)
<<
iter
.
data
().
getPosition
().
getX
()
<<
"
\t
"
<<
iter
.
data
().
getPosition
().
getY
()
<<
"
\t
"
<<
iter
.
data
().
getPosition
().
getZ
()
<<
" Forces:
\t
"
<<
std
::
setprecision
(
8
)
<<
...
...
@@ -216,7 +217,7 @@ int main(int argc, char ** argv){
printf
(
"Fz diff is =
\n
"
);
printf
(
"%f
\n
"
,
fz
.
getL2Norm
());
printf
(
"%f
\n
"
,
fz
.
getInfNorm
());
std
::
cout
<<
std
::
endl
<<
std
::
endl
<<
"Potential
= "
<<
potential
*
coeff_MD
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
<<
std
::
endl
<<
"Potential= "
<<
potential
*
coeff_MD
/
2
<<
std
::
endl
;
}
...
...
@@ -234,13 +235,13 @@ int main(int argc, char ** argv){
forces
+=
iter
.
data
().
getForces
();
if
(
FParameters
::
existParameter
(
argc
,
argv
,
"-verbose"
)){
std
::
cout
<<
" "
<<
iter
.
data
().
getIndex
()
+
1
<<
"
\t
"
<<
std
::
cout
<<
" "
<<
iter
.
data
().
getIndex
()
+
1
<<
"
\t
"
<<
iter
.
data
().
getType
()
<<
"
\t
"
<<
std
::
setprecision
(
5
)
<<
iter
.
data
().
getPosition
().
getX
()
<<
"
\t
"
<<
iter
.
data
().
getPosition
().
getY
()
<<
"
\t
"
<<
iter
.
data
().
getPosition
().
getZ
()
<<
" Forces:
\t
"
<<
std
::
setprecision
(
8
)
<<
iter
.
data
().
getForces
().
getX
()
*
coeff_MD
<<
"
\t
"
<<
iter
.
data
().
getForces
().
getY
()
*
coeff_MD
<<
"
\t
"
<<
iter
.
data
().
getForces
().
getZ
()
*
coeff_MD
<<
std
::
endl
;
std
::
setprecision
(
8
)
<<
iter
.
data
().
getForces
().
getX
()
*
coeff_MD
1
<<
"
\t
"
<<
iter
.
data
().
getForces
().
getY
()
*
coeff_MD
1
<<
"
\t
"
<<
iter
.
data
().
getForces
().
getZ
()
*
coeff_MD
1
<<
std
::
endl
;
}
iter
.
gotoNext
();
...
...
@@ -248,7 +249,7 @@ int main(int argc, char ** argv){
}
while
(
octreeIterator
.
moveRight
());
std
::
cout
<<
"Foces Sum x = "
<<
forces
.
getX
()
<<
" y = "
<<
forces
.
getY
()
<<
" z = "
<<
forces
.
getZ
()
<<
std
::
endl
;
std
::
cout
<<
"Potential = "
<<
potential
*
coeff_MD
<<
std
::
endl
;
std
::
cout
<<
"Potential = "
<<
potential
*
coeff_MD
/
2
<<
std
::
endl
;
std
::
cout
<<
"Constante DL_POLY: "
<<
coeff_MD
<<
std
::
endl
;
}
// -----------------------------------------------------
...
...
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