Mentions légales du service

Skip to content
Snippets Groups Projects
Commit a5de1314 authored by Olivier COULAUD's avatar Olivier COULAUD
Browse files

rename the deprecated functions.

parent aac5215c
Branches
No related tags found
No related merge requests found
Pipeline #1119075 passed
......@@ -332,7 +332,7 @@ This is the easiest method, but cannot be parallelized efficiently (i.e., with a
The idea here is to traverse the internal structure of the tree. We start to browse the groups of leaves, then for each group the leaves and finally for each leaf the particles. In this approach, we don't know a priori the storage of the different objects.
#+begin_src c++
// loop on the group of the tree
for(auto const pg: tree.group_of_leaves())
for(auto const pg: tree.vector_of_leaf_groups())
{
// Loop on the leaf of thz group
for(auto const& leaf: pg->components())
......@@ -352,7 +352,7 @@ This method is slightly more efficient than the classical method and can be para
We will use our knowledge of particle storage to be more efficient. In the tree version with views, the particles of a group of leaves are stored continuously in the tree. Moreover, we need to know the type of the particles to get the right pointers (this can be automated) to the different components of the particles (position, inputs, outputs, variables).
#+begin_src c++
// loop on the group of the tree
for(auto pg: tree.group_of_leaves())
for(auto pg: tree.group_of_levector_of_leaf_groupsaves())
{
// std::cout << pg->storage() << "\n";
auto nb_particles = pg->storage().size();
......@@ -367,7 +367,10 @@ We will use our knowledge of particle storage to be more efficient. In the tree
auto ptr_fx = ptr_potential + nb_particles;
auto ptr_fy = ptr_fx + nb_particles;
// variables
auto ptr_var0 = reinterpret_cast<std::size_t*>(ptr_fz + nb_particles);
// tuple_ptr_variables is a tuple of pointer pointing on the first elemnt of each variables
auto tuple_ptr_variables = pg->storage().ptr_on_variables();
// To access the pointer on the first variable
const auto var0 = std::get<0>(variable_storage);
for(auto i = 0; i < nb_particles; ++i)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment