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
81b101a8
Commit
81b101a8
authored
Sep 18, 2014
by
COULAUD Olivier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logs
parent
99073ac3
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
364 additions
and
330 deletions
+364
-330
Src/Adaptive/FAdaptUnifKernel.hpp
Src/Adaptive/FAdaptUnifKernel.hpp
+10
-8
Src/Adaptive/FAdaptiveKernelWrapper.hpp
Src/Adaptive/FAdaptiveKernelWrapper.hpp
+354
-322
No files found.
Src/Adaptive/FAdaptUnifKernel.hpp
View file @
81b101a8
...
...
@@ -70,7 +70,7 @@ class FAdaptiveUnifKernel : FUnifKernel<CellClass, ContainerClass, MatrixKernelC
// const M2LHandlerClass M2LHandler;
const
MatrixKernelClass
*
const
MatrixKernel
;
int
sminM
,
sminL
;
public:
using
KernelBaseClass
::
P2M
;
...
...
@@ -87,11 +87,12 @@ public:
// * runtime_error is thrown if the required file is not valid).
// */
FAdaptiveUnifKernel
(
const
int
inTreeHeight
,
const
FReal
inBoxWidth
,
const
FPoint
&
inBoxCenter
,
const
MatrixKernelClass
*
const
inMatrixKernel
)
:
KernelBaseClass
(
inTreeHeight
,
inBoxWidth
,
inBoxCenter
,
inMatrixKernel
)
/*, M2LHandler(inMatrixKernel, inTreeHeight, inBoxWidth)*/
,
MatrixKernel
(
inMatrixKernel
)
const
FPoint
&
inBoxCenter
,
const
MatrixKernelClass
*
const
inMatrixKernel
,
const
int
&
minM
,
const
int
&
minL
)
:
KernelBaseClass
(
inTreeHeight
,
inBoxWidth
,
inBoxCenter
,
inMatrixKernel
)
/*, M2LHandler(inMatrixKernel, inTreeHeight, inBoxWidth)*/
,
MatrixKernel
(
inMatrixKernel
),
sminM
(
minM
),
sminL
(
minM
)
{}
// /** Copy constructor */
FAdaptiveUnifKernel
(
const
FAdaptiveUnifKernel
&
other
)
:
KernelBaseClass
(
other
)
/*, M2LHandler(other.M2LHandler)*/
,
MatrixKernel
(
other
.
MatrixKernel
)
:
KernelBaseClass
(
other
)
/*, M2LHandler(other.M2LHandler)*/
,
MatrixKernel
(
other
.
MatrixKernel
)
,
sminM
(
other
.
sminM
),
sminL
(
other
.
sminL
)
{
}
//
...
...
@@ -219,7 +220,7 @@ public:
// Target cell: local
const
FReal
localCellWidth
(
KernelBaseClass
::
BoxWidth
/
FReal
(
FMath
::
pow
(
2.0
,
localLevel
)));
const
FPoint
localCellCenter
(
KernelBaseClass
::
getCellCenter
(
local
->
getCoordinate
(),
localLevel
));
std
::
cout
<<
" call P2L localLevel "
<<
localLevel
<<
" localCellCenter "
<<
localCellCenter
<<
std
::
endl
;
// interpolation points of target (X) cell
FPoint
X
[
nnodes
];
FUnifTensor
<
order
>::
setRoots
(
localCellCenter
,
localCellWidth
,
X
);
...
...
@@ -235,7 +236,7 @@ public:
const
FReal
*
const
physicalValues
=
particles
->
getPhysicalValues
();
// apply P2L
for
(
unsigned
int
idxPart
=
0
;
idxPart
<
particles
->
getNbParticles
();
++
idxPart
){
for
(
int
idxPart
=
0
;
idxPart
<
particles
->
getNbParticles
();
++
idxPart
){
const
FPoint
y
=
FPoint
(
positionsX
[
idxPart
],
positionsY
[
idxPart
],
...
...
@@ -299,7 +300,7 @@ public:
const
FReal
*
const
MultipoleExpansion
=
pole
->
getMultipole
(
idxRhs
);
// apply M2P
for
(
unsigned
int
idxPart
=
0
;
idxPart
<
particles
->
getNbParticles
();
++
idxPart
){
for
(
int
idxPart
=
0
;
idxPart
<
particles
->
getNbParticles
();
++
idxPart
){
const
FPoint
x
=
FPoint
(
positionsX
[
idxPart
],
positionsY
[
idxPart
],
positionsZ
[
idxPart
]);
...
...
@@ -443,14 +444,15 @@ public:
}
bool
preferP2M
(
const
ContainerClass
*
const
particles
)
override
{
return
particles
->
getNbParticles
()
<
10
;
return
particles
->
getNbParticles
()
>
this
->
sminM
;
}
bool
preferP2M
(
const
int
/*atLevel*/
,
const
ContainerClass
*
const
particles
[],
const
int
nbContainers
)
override
{
int
counterParticles
=
0
;
for
(
int
idxContainer
=
0
;
idxContainer
<
nbContainers
;
++
idxContainer
){
counterParticles
+=
particles
[
idxContainer
]
->
getNbParticles
();
}
return
counterParticles
<
10
;
std
::
cout
<<
" Part("
<<
counterParticles
<<
") "
;
return
counterParticles
>
this
->
sminM
;
}
};
...
...
Src/Adaptive/FAdaptiveKernelWrapper.hpp
View file @
81b101a8
This diff is collapsed.
Click to expand it.
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