Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
ScalFMM
Commits
14307471
Commit
14307471
authored
12 years ago
by
PIACIBELLO Cyrille
Browse files
Options
Downloads
Plain Diff
M2M is currently being debugged
parents
30dec748
36e56db2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Src/Kernels/Taylor/FTaylorKernel.hpp
+46
-7
46 additions, 7 deletions
Src/Kernels/Taylor/FTaylorKernel.hpp
with
46 additions
and
7 deletions
Src/Kernels/Taylor/FTaylorKernel.hpp
+
46
−
7
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
,
&
b
f
,
&
c
f
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment