Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
d6243220
Commit
d6243220
authored
Dec 18, 2013
by
BRAMAS Berenger
Browse files
print out was wrong when debuged
parent
3eda9d44
Changes
2
Hide whitespace changes
Inline
Side-by-side
UTests/utestRotationDirectDebug.cpp
View file @
d6243220
...
...
@@ -70,7 +70,7 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
Print
(
quarterDimLeaf
);
TestParticle
*
const
particles
=
new
TestParticle
[
nbParticles
];
particles
[
0
].
position
=
FPoint
(
quarterDimLeaf
,
quarterDimLeaf
,
quarterDimLeaf
);
particles
[
0
].
position
=
FPoint
(
2
*
quarterDimLeaf
,
quarterDimLeaf
,
quarterDimLeaf
);
particles
[
0
].
physicalValue
=
0.50
;
particles
[
1
].
position
=
FPoint
(
2
*
quarterDimLeaf
,
quarterDimLeaf
,
quarterDimLeaf
);
particles
[
1
].
physicalValue
=
-
0.10
;
...
...
@@ -78,11 +78,12 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
Print
(
"Number of particles:"
);
Print
(
nbParticles
);
for
(
int
idxLeafX
=
0
;
idxLeafX
<
dimGrid
;
++
idxLeafX
){
for
(
int
idxLeafY
=
0
;
idxLeafY
<
dimGrid
;
++
idxLeafY
){
for
(
int
idxLeafZ
=
0
;
idxLeafZ
<
dimGrid
;
++
idxLeafZ
){
for
(
int
idxLeafX
=
0
;
idxLeafX
<
2
/*
dimGrid
*/
;
++
idxLeafX
){
for
(
int
idxLeafY
=
0
;
idxLeafY
<
1
/*
dimGrid
*/
;
++
idxLeafY
){
for
(
int
idxLeafZ
=
0
;
idxLeafZ
<
1
/*
dimGrid
*/
;
++
idxLeafZ
){
particles
[
1
].
position
=
FPoint
(
FReal
(
idxLeafX
)
*
dimLeaf
+
2
*
quarterDimLeaf
,
particles
[
0
].
position
=
FPoint
((
idxLeafX
+
1
)
*
quarterDimLeaf
,
quarterDimLeaf
,
quarterDimLeaf
);
particles
[
1
].
position
=
FPoint
(
FReal
(
2
)
*
dimLeaf
+
2
*
quarterDimLeaf
,
FReal
(
idxLeafY
)
*
dimLeaf
+
quarterDimLeaf
,
FReal
(
idxLeafZ
)
*
dimLeaf
+
quarterDimLeaf
);
...
...
@@ -157,8 +158,8 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
std
::
cout
<<
"Multipole:
\n
"
;
int
index_j_k
=
0
;
for
(
int
j
=
0
;
j
<=
P
;
++
j
){
std
::
cout
<<
"["
<<
j
<<
"] "
<<
"[0] "
<<
cell
->
getMultipole
()[
index_j_k
].
getReal
()
<<
" i"
<<
cell
->
getMultipole
()[
index_j_k
].
getImag
()
<<
"
\t
"
;
for
(
int
k
=
1
;
k
<=
j
;
++
k
,
++
index_j_k
){
std
::
cout
<<
"["
<<
j
<<
"] "
;
for
(
int
k
=
0
;
k
<=
j
;
++
k
,
++
index_j_k
){
std
::
cout
<<
"["
<<
k
<<
"] "
<<
cell
->
getMultipole
()[
index_j_k
].
getReal
()
<<
" i"
<<
cell
->
getMultipole
()[
index_j_k
].
getImag
()
<<
" "
;
}
std
::
cout
<<
"
\n
"
;
...
...
@@ -167,8 +168,8 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
std
::
cout
<<
"Local:
\n
"
;
index_j_k
=
0
;
for
(
int
j
=
0
;
j
<=
P
;
++
j
){
std
::
cout
<<
"["
<<
j
<<
"] "
<<
"[0] "
<<
cell
->
getLocal
()[
index_j_k
].
getReal
()
<<
" i"
<<
cell
->
getLocal
()[
index_j_k
].
getImag
()
<<
"
\t
"
;
for
(
int
k
=
1
;
k
<=
j
;
++
k
,
++
index_j_k
){
std
::
cout
<<
"["
<<
j
<<
"] "
;
for
(
int
k
=
0
;
k
<=
j
;
++
k
,
++
index_j_k
){
std
::
cout
<<
"["
<<
k
<<
"] "
<<
cell
->
getLocal
()[
index_j_k
].
getReal
()
<<
" i"
<<
cell
->
getLocal
()[
index_j_k
].
getImag
()
<<
" "
;
}
std
::
cout
<<
"
\n
"
;
...
...
@@ -221,7 +222,7 @@ class TestRotationDirect : public FUTester<TestRotationDirect> {
// The tests!
///////////////////////////////////////////////////////////
static
const
int
P
=
2
;
static
const
int
P
=
1
;
/** Rotation */
void
TestRotation
(){
...
...
UTests/utestSphericalDirectDebug.cpp
View file @
d6243220
...
...
@@ -173,8 +173,8 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> {
std
::
cout
<<
"Multipole:
\n
"
;
int
index_j_k
=
0
;
for
(
int
j
=
0
;
j
<=
DevP
;
++
j
){
std
::
cout
<<
"["
<<
j
<<
"]
"
<<
"[0] "
<<
cell
->
getMultipole
()[
index_j_k
].
getReal
()
<<
" i"
<<
cell
->
getMultipole
()[
index_j_k
].
getImag
()
<<
"
\t
"
;
for
(
int
k
=
1
;
k
<=
j
;
++
k
,
++
index_j_k
){
std
::
cout
<<
"["
<<
j
<<
"]
\n
"
;
for
(
int
k
=
0
;
k
<=
j
;
++
k
,
++
index_j_k
){
std
::
cout
<<
"["
<<
k
<<
"] "
<<
cell
->
getMultipole
()[
index_j_k
].
getReal
()
<<
" i"
<<
cell
->
getMultipole
()[
index_j_k
].
getImag
()
<<
" "
;
}
std
::
cout
<<
"
\n
"
;
...
...
@@ -183,8 +183,8 @@ class TestSphericalDirect : public FUTester<TestSphericalDirect> {
std
::
cout
<<
"Local:
\n
"
;
index_j_k
=
0
;
for
(
int
j
=
0
;
j
<=
DevP
;
++
j
){
std
::
cout
<<
"["
<<
j
<<
"]
"
<<
"[0] "
<<
cell
->
getLocal
()[
index_j_k
].
getReal
()
<<
" i"
<<
cell
->
getLocal
()[
index_j_k
].
getImag
()
<<
"
\t
"
;
for
(
int
k
=
1
;
k
<=
j
;
++
k
,
++
index_j_k
){
std
::
cout
<<
"["
<<
j
<<
"]
\n
"
;
for
(
int
k
=
0
;
k
<=
j
;
++
k
,
++
index_j_k
){
std
::
cout
<<
"["
<<
k
<<
"] "
<<
cell
->
getLocal
()[
index_j_k
].
getReal
()
<<
" i"
<<
cell
->
getLocal
()[
index_j_k
].
getImag
()
<<
" "
;
}
std
::
cout
<<
"
\n
"
;
...
...
Write
Preview
Supports
Markdown
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