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
14307471
Commit
14307471
authored
Jul 16, 2013
by
PIACIBELLO Cyrille
Browse files
Options
Browse Files
Download
Plain Diff
M2M is currently being debugged
parents
30dec748
36e56db2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
7 deletions
+46
-7
Src/Kernels/Taylor/FTaylorKernel.hpp
Src/Kernels/Taylor/FTaylorKernel.hpp
+46
-7
No files found.
Src/Kernels/Taylor/FTaylorKernel.hpp
View file @
14307471
...
...
@@ -802,10 +802,16 @@ public:
/**
*@brief Translate the local expansion of parent cell to child cell
* Sur une cellule, \f$\mathcal{C}_l\f$, du niveau \f$l\f$ de centre \f$\mathbf{x}_p\f$, on a le développement local du potentiel suivant
* \f[
* L_{son} = \sum_{i=k}^{l} L_{i} (x_{son}-x_{father})^{i-k} \binom{i}{k}
*\f]
* V(x) = \sum_{\mathbf{k}=0}^{P}{O_\mathbf{k}\; (\mathbf{x}-\mathbf{x}_p)^\mathbf{k}}.\f]
*Soit \f$\mathbf{x}_f\f$ le centre d'une cellule fille de \f$\mathcal{C}_l\f$, le potentiel s'écrit alors
* \f[ V(x) = \sum_{\mathbf{n}=0}^{P}{L_\mathbf{n} (\mathbf{x}-\mathbf{x}_f)^\mathbf{n}} \f]
* avec
* \f[ L_\mathbf{n} = \sum_{\mathbf{k}=\mathbf{n}}^{\mathbf{p}}{C^\mathbf{n}_\mathbf{k} O_\mathbf{k-n}\;(\mathbf{x}_f-\mathbf{x}_p)^\mathbf{k-n}}.\f]
*/
<<<<<<<
HEAD
void
L2L
(
const
CellClass
*
const
FRestrict
local
,
CellClass
*
FRestrict
*
const
FRestrict
child
,
const
int
inLevel
)
...
...
@@ -824,18 +830,51 @@ public:
b
=
0
;
c
=
0
;
FPoint
childCenter
=
getCellCenter
(
child
[
idxChild
]
->
getCoordinate
(),
inLevel
+
1
);
=======
void
L2L
(
const
CellClass
*
const
FRestrict
fatherCell
,
CellClass
*
FRestrict
*
const
FRestrict
childCell
,
const
int
/*inLevel*/
)
{
FPoint
locCenter
=
getLeafCenter
(
fatherCell
->
getCoordinate
());
// Get father local expansion
const
FReal
*
fatherExpansion
=
fatherCell
->
getLocal
()
;
FReal
dx
,
dy
,
dz
,
coeff
;
int
ap
,
bp
,
cp
,
af
,
bf
,
cf
;
//
// For all children
for
(
int
idxChild
=
0
;
idxChild
<
8
;
++
idxChild
){
// if child exists
if
(
childCell
[
idxChild
]){
FReal
*
childExpansion
=
childCell
[
idxChild
]
->
getLocal
()
;
FPoint
childCenter
=
getLeafCenter
(
childCell
[
idxChild
]
->
getCoordinate
());
>>>>>>>
36e56
db26445e1f6668fde3fc25c87666917299d
//Set the distance between centers of cells
// Child - father
dx
=
childCenter
.
getX
()
-
locCenter
.
getX
();
dy
=
childCenter
.
getY
()
-
locCenter
.
getY
();
dz
=
childCenter
.
getZ
()
-
locCenter
.
getZ
();
// Precompute the arrays of dx^i
arrayDX
[
0
]
=
1.0
;
arrayDY
[
0
]
=
1.0
;
arrayDZ
[
0
]
=
1.0
;
for
(
int
i
=
1
;
i
<=
P
;
++
i
)
{
arrayDX
[
i
]
=
dx
*
arrayDX
[
i
-
1
]
;
arrayDY
[
i
]
=
dy
*
arrayDY
[
i
-
1
]
;
arrayDZ
[
i
]
=
dz
*
arrayDZ
[
i
-
1
]
;
}
//
//iterator over child's local expansion (to be filled)
for
(
int
k
=
0
;
k
<
SizeVector
;
k
++
){
af
=
0
;
bf
=
0
;
cf
=
0
;
for
(
int
k
=
0
;
k
<
SizeVector
;
++
k
){
//
//Iterator over parent's local array
for
(
int
i
=
k
;
i
<
SizeVector
;
i
++
){
(
child
[
idxChild
]
->
getLocal
())[
k
]
=
(
local
->
getLocal
())[
i
]
*
FMath
::
pow
(
dx
,
a
)
*
FMath
::
pow
(
dy
,
b
)
*
FMath
::
pow
(
dz
,
c
)
*
combin
(
i
,
k
);
ap
=
0
;
bp
=
0
;
cp
=
0
;
for
(
int
i
=
k
;
i
<
SizeVector
;
++
i
){
coeff
=
combin
(
ap
,
af
)
*
combin
(
bp
,
bf
)
*
combin
(
cp
,
cf
);
childExpansion
[
k
]
+=
coeff
*
fatherExpansion
[
i
-
k
]
*
arrayDX
[
ap
]
*
arrayDY
[
bp
]
*
arrayDZ
[
cp
]
;
incPowers
(
&
ap
,
&
bp
,
&
cp
);
}
incPowers
(
&
a
,
&
b
,
&
c
);
incPowers
(
&
a
f
,
&
bf
,
&
cf
);
}
}
}
...
...
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