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
dcb59462
Commit
dcb59462
authored
Jul 01, 2013
by
PIACIBELLO Cyrille
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Psi Derivatives debugged
parent
f1edf066
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
23 deletions
+18
-23
Src/Kernels/Taylor/FTaylorKernel.hpp
Src/Kernels/Taylor/FTaylorKernel.hpp
+18
-23
No files found.
Src/Kernels/Taylor/FTaylorKernel.hpp
View file @
dcb59462
...
...
@@ -202,19 +202,20 @@ private:
FReal
dx
=
target
.
getX
()
-
src
.
getX
();
FReal
dy
=
target
.
getY
()
-
src
.
getY
();
FReal
dz
=
target
.
getZ
()
-
src
.
getZ
();
tab
[
0
]
=
1
/
(
FMath
::
Sqrt
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
));
FReal
R3
=
tab
[
0
]
/
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
);
FReal
R2
=
dx
*
dx
+
dy
*
dy
+
dz
*
dz
;
printf
(
"dx : %f dy : %f dz : %f
\n
"
,
dx
,
dy
,
dz
);
tab
[
0
]
=
FReal
(
1
)
/
FMath
::
Sqrt
(
R2
);
FReal
R3
=
tab
[
0
]
/
(
R2
);
tab
[
1
]
=
dx
*
R3
;
tab
[
2
]
=
dy
*
R3
;
tab
[
3
]
=
dz
*
R3
;
FReal
R5
=
R3
/
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
)
;
tab
[
4
]
=
R3
-
dx
*
dx
*
R5
;
tab
[
5
]
=
(
-
dx
)
*
dy
*
R5
;
tab
[
6
]
=
(
-
dx
)
*
dz
*
R5
;
tab
[
7
]
=
R3
-
dy
*
dy
*
R5
;
tab
[
8
]
=
(
-
dy
)
*
dz
*
R5
;
tab
[
9
]
=
R3
-
dz
*
dz
*
R5
;
FReal
R5
=
R3
/
R2
;
tab
[
4
]
=
FReal
(
3
)
*
dx
*
dx
*
R5
-
R3
;
//Derivative in (2,0,0)
tab
[
5
]
=
FReal
(
3
)
*
dx
*
dy
*
R5
;
//Derivative in (1,1,0)
tab
[
6
]
=
FReal
(
3
)
*
dx
*
dz
*
R5
;
//Derivative in (1,0,1)
tab
[
7
]
=
FReal
(
3
)
*
dy
*
dy
*
R5
-
R3
;
//Derivative in (0,2,0)
tab
[
8
]
=
FReal
(
3
)
*
dy
*
dz
*
R5
;
//Derivative in (0,1,1)
tab
[
9
]
=
FReal
(
3
)
*
dz
*
dz
*
R5
-
R3
;
//Derivative in (0,0,2)
}
/** @brief Compute and store the derivative for a given tuple.
...
...
@@ -443,8 +444,8 @@ public:
}
}
}
printf
(
"M2M :: cell : X = %f, Y = %f, Z = %f, %d,%d,%d --> %f
\n
"
,
cellCenter
.
getX
(),
cellCenter
.
getY
(),
cellCenter
.
getZ
(),
a
,
b
,
c
,
value
);
//
printf("M2M :: cell : X = %f, Y = %f, Z = %f, %d,%d,%d --> %f\n",
//
cellCenter.getX(),cellCenter.getY(),cellCenter.getZ(),a,b,c,value);
mult
[
idxMult
]
+=
value
;
incPowers
(
&
a
,
&
b
,
&
c
);
...
...
@@ -486,7 +487,7 @@ public:
// WARNING, won't work at upper level than leaf.
FPoint
curDistCenter
=
getLeafCenter
(
distantNeighbors
[
idxNeigh
]
->
getCoordinate
());
initDerivative
(
locCenter
,
curDist
Center
,
yetComputed
);
initDerivative
(
curDistCenter
,
loc
Center
,
yetComputed
);
//Iteration over Multipole / Local
int
al
=
0
,
bl
=
0
,
cl
=
0
;
...
...
@@ -504,8 +505,8 @@ public:
//Iterating over multipole array : k
for
(
int
j
=
0
;
j
<
SizeVector
;
j
++
){
FReal
psi
=
computeDerivative
(
al
+
am
,
bl
+
bm
,
cl
+
cm
,
locCenter
,
curDist
Center
,
yetComputed
);
//psi is the derivative of 1/R.
psi
*=
multipole
[
j
]
*
coeffN
;
FReal
psi
=
computeDerivative
(
al
+
am
,
bl
+
bm
,
cl
+
cm
,
curDistCenter
,
loc
Center
,
yetComputed
);
//psi is the derivative of 1/R.
psi
*=
multipole
[
j
]
*
coeffN
;
//Psi = Mj * N/n!
iterLocal
[
i
]
+=
psi
;
count
++
;
//printf("count : %d, al+am = %d, bl+bm=%d, cl+cm=%d\n",count,al+am,bl+bm,cl+cm);
...
...
@@ -520,10 +521,10 @@ public:
// For Debugging ..........................................................
int
x
=
0
,
y
=
0
,
z
=
0
;
FReal
tot
=
FReal
(
0
);
for
(
int
dby
=
0
;
dby
<
SizeVector
;
dby
++
)
for
(
int
dby
=
0
;
dby
<
(
2
*
P
+
1
)
*
(
P
+
1
)
*
(
2
*
P
+
3
)
/
3
;
dby
++
)
{
tot
+=
yetComputed
[
dby
];
printf
(
"M2L :: cell %f, %d,%d,%d ==> %f
\n
"
,
curDistCenter
.
getX
(),
x
,
y
,
z
,
iterLocal
[
dby
]);
printf
(
"M2L :: cell %f, %d,%d,%d ==> %f
\n
"
,
curDistCenter
.
getX
(),
x
,
y
,
z
,
yetComputed
[
dby
]);
incPowers
(
&
x
,
&
y
,
&
z
);
}
printf
(
"tot : %f
\n
"
,
tot
);
...
...
@@ -632,12 +633,6 @@ public:
incPowers
(
&
a
,
&
b
,
&
c
);
}
}
getCellCenter
(
local
->
getCoordinate
(),
treeHeight
);
printf
(
"Coordonnées Leaf : %f, %f, %f
\n
"
,
locCenter
.
getX
(),
locCenter
.
getY
(),
locCenter
.
getZ
());
printf
(
"widthatleaflevel : %f
\n
"
,
widthAtLeafLevel
);
}
/**
...
...
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