Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
10ae8359
Commit
10ae8359
authored
Jun 28, 2016
by
Quentin Khan
Browse files
Merge branch 'master' of
git+ssh://scm.gforge.inria.fr/gitroot/scalfmm/scalfmm
parents
e8eca9fe
84a2b007
Changes
1
Hide whitespace changes
Inline
Side-by-side
Addons/CKernelApi/Src/FScalFMMEngine.hpp
View file @
10ae8359
...
...
@@ -178,37 +178,6 @@ public:
}
/** Test ... */
struct
RunContainer
{
template
<
int
nbAttributeToInsert
,
class
ContainerClass
,
class
LeafClass
,
class
CellClass
>
static
void
Run
(
FOctree
<
FReal
,
CellClass
,
ContainerClass
,
LeafClass
>
*
octree
,
int
NbPartToInsert
,
int
*
strideForEachAtt
,
FReal
*
rawDatas
){
generic_tree_abstract_insert
<
ContainerClass
,
LeafClass
,
CellClass
,
nbAttributeToInsert
>
(
octree
,
NbPartToInsert
,
strideForEachAtt
,
rawDatas
);
}
};
template
<
class
ContainerClass
,
class
LeafClass
,
class
CellClass
,
int
nbAttributeToInsert
>
void
generic_tree_abstract_insert
(
FOctree
<
FReal
,
CellClass
,
ContainerClass
,
LeafClass
>
*
octree
,
int
NbPartToInsert
,
int
*
strideForEachAtt
,
FReal
*
rawDatas
){
for
(
FSize
idxPart
=
0
;
idxPart
<
NbPartToInsert
;
++
idxPart
){
FPoint
<
FReal
>
pos
=
FPoint
<
FReal
>
(
rawDatas
[
0
],
rawDatas
[
1
],
rawDatas
[
2
]);
MortonIndex
index
=
octree
->
getMortonFromPosition
(
pos
);
//Insert with how many attributes ???
octree
->
insert
(
pos
,
idxPart
);
//Get again the container
ContainerClass
*
containerToFill
=
octree
->
getLeafSrc
(
index
);
//cannot be nullptr
std
::
array
<
FReal
,
nbAttributeToInsert
>
arrayOfAttribute
;
for
(
int
idxAtt
=
0
;
idxAtt
<
nbAttributeToInsert
;
++
idxAtt
){
arrayOfAttribute
[
idxAtt
]
=
rawDatas
[
3
+
strideForEachAtt
[
idxAtt
]];
}
int
idxToRemove
=
containerToFill
->
getNbParticles
();
containerToFill
->
remove
(
&
idxToRemove
,
1
);
containerToFill
->
push
(
pos
,
idxPart
,
arrayOfAttribute
);
}
}
template
<
class
ContainerClass
,
class
LeafClass
,
class
CellClass
>
void
generic_get_forces_xyz
(
FOctree
<
FReal
,
CellClass
,
ContainerClass
,
LeafClass
>
*
octree
,
...
...
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