Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Boards
Labels
Milestones
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
265170f9
Commit
265170f9
authored
Sep 07, 2015
by
BLANCHARD Pierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a local array for local expansion to sum m2l and l2l contributions properly.
parent
f923ecae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
Src/Kernels/Uniform/FUnifKernel.hpp
Src/Kernels/Uniform/FUnifKernel.hpp
+12
-5
No files found.
Src/Kernels/Uniform/FUnifKernel.hpp
View file @
265170f9
...
...
@@ -145,13 +145,17 @@ public:
const
int
/*TreeLevel*/
)
{
for
(
int
idxRhs
=
0
;
idxRhs
<
NVALS
;
++
idxRhs
){
// 1) Apply Inverse Discete Fourier Transform
FReal
localExp
[
AbstractBaseClass
::
nnodes
];
M2LHandler
.
unapplyZeroPaddingAndDFT
(
ParentCell
->
getTransformedLocal
(
idxRhs
),
const_cast
<
CellClass
*>
(
ParentCell
)
->
getLocal
(
idxRhs
));
localExp
);
FBlas
::
add
(
AbstractBaseClass
::
nnodes
,
const_cast
<
FReal
*>
(
ParentCell
->
getLocal
(
idxRhs
)),
localExp
);
// 2) apply Sx
for
(
unsigned
int
ChildIndex
=
0
;
ChildIndex
<
8
;
++
ChildIndex
){
if
(
ChildCells
[
ChildIndex
]){
AbstractBaseClass
::
Interpolator
->
applyL2L
(
ChildIndex
,
ParentCell
->
getLocal
(
idxRhs
)
,
ChildCells
[
ChildIndex
]
->
getLocal
(
idxRhs
));
AbstractBaseClass
::
Interpolator
->
applyL2L
(
ChildIndex
,
localExp
,
ChildCells
[
ChildIndex
]
->
getLocal
(
idxRhs
));
}
}
}
...
...
@@ -162,21 +166,24 @@ public:
{
const
FPoint
<
FReal
>
LeafCellCenter
(
AbstractBaseClass
::
getLeafCellCenter
(
LeafCell
->
getCoordinate
()));
FReal
localExp
[
NVALS
*
AbstractBaseClass
::
nnodes
];
for
(
int
idxRhs
=
0
;
idxRhs
<
NVALS
;
++
idxRhs
){
// 1) Apply Inverse Discete Fourier Transform
M2LHandler
.
unapplyZeroPaddingAndDFT
(
LeafCell
->
getTransformedLocal
(
idxRhs
),
const_cast
<
CellClass
*>
(
LeafCell
)
->
getLocal
(
idxRhs
));
localExp
+
idxRhs
*
AbstractBaseClass
::
nnodes
);
FBlas
::
add
(
AbstractBaseClass
::
nnodes
,
const_cast
<
FReal
*>
(
LeafCell
->
getLocal
(
idxRhs
)),
localExp
+
idxRhs
*
AbstractBaseClass
::
nnodes
);
}
// 2.a) apply Sx
AbstractBaseClass
::
Interpolator
->
applyL2P
(
LeafCellCenter
,
AbstractBaseClass
::
BoxWidthLeaf
,
LeafCell
->
getLocal
(
0
)
,
TargetParticles
);
localExp
,
TargetParticles
);
// 2.b) apply Px (grad Sx)
AbstractBaseClass
::
Interpolator
->
applyL2PGradient
(
LeafCellCenter
,
AbstractBaseClass
::
BoxWidthLeaf
,
LeafCell
->
getLocal
(
0
)
,
TargetParticles
);
localExp
,
TargetParticles
);
}
...
...
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