Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
TurTLE
TurTLE
Commits
b8eaa38d
Commit
b8eaa38d
authored
7 years ago
by
Berenger Bramas
Browse files
Options
Downloads
Patches
Plain Diff
Remove tests and comments
parent
0de739dd
No related branches found
No related tags found
1 merge request
!23
WIP: Feature/use cmake
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bfps/cpp/particles/p2p_computer.hpp
+2
-2
2 additions, 2 deletions
bfps/cpp/particles/p2p_computer.hpp
bfps/cpp/particles/p2p_distr_mpi.hpp
+0
-214
0 additions, 214 deletions
bfps/cpp/particles/p2p_distr_mpi.hpp
with
2 additions
and
216 deletions
bfps/cpp/particles/p2p_computer.hpp
+
2
−
2
View file @
b8eaa38d
...
...
@@ -25,8 +25,8 @@ public:
const
real_number
pos_part2
[],
const
real_number
data_part2
[],
real_number
rhs_part2
[],
const
real_number
dist_pow2
,
const
real_number
xshift_coef
,
const
real_number
yshift_coef
,
const
real_number
zshift_coef
)
const
{
rhs_part1
[
0
]
+=
1
;
rhs_part2
[
0
]
+=
1
;
// TODO put the kernel here
static_assert
(
size_particle_positions
==
3
,
"This kernel works only with 3 values for one position"
)
;
}
};
...
...
This diff is collapsed.
Click to expand it.
bfps/cpp/particles/p2p_distr_mpi.hpp
+
0
−
214
View file @
b8eaa38d
...
...
@@ -284,17 +284,6 @@ public:
particles_positions
[(
idxPart
)
*
size_particle_positions
+
IDX_Y
],
particles_positions
[(
idxPart
)
*
size_particle_positions
+
IDX_Z
]);
assert
(
my_down_z_cell_level
<=
get_cell_coord_z_from_index
(
particles_coord
[
idxPart
]));
if
(
!
(
get_cell_coord_z_from_index
(
particles_coord
[
idxPart
])
<=
my_top_z_cell_level
)){
// TODO
printf
(
"Coord index %ld - %ld (tree index %ld)
\n
"
,
idxPart
,
inout_index_particles
[
idxPart
],
particles_coord
[
idxPart
]);
printf
(
">> Box index %ld - %ld - %ld
\n
"
,
get_cell_coord_x_from_index
(
particles_coord
[
idxPart
]),
get_cell_coord_y_from_index
(
particles_coord
[
idxPart
]),
get_cell_coord_z_from_index
(
particles_coord
[
idxPart
]));
printf
(
">> idxPartition %d
\n
"
,
idxPartition
);
printf
(
">> my_top_z_cell_level %ld
\n
"
,
my_top_z_cell_level
);
printf
(
">> position %e %e %e
\n
"
,
particles_positions
[(
idxPart
)
*
size_particle_positions
+
IDX_X
],
particles_positions
[(
idxPart
)
*
size_particle_positions
+
IDX_Y
],
particles_positions
[(
idxPart
)
*
size_particle_positions
+
IDX_Z
]);
}
assert
(
get_cell_coord_z_from_index
(
particles_coord
[
idxPart
])
<=
my_top_z_cell_level
);
}
}
...
...
@@ -319,10 +308,6 @@ public:
return
p1
.
first
<
p2
.
first
;
});
// for(partsize_t idxPart = 1 ; idxPart < (long int)part_to_sort.size() ; ++idxPart){// TODO
// assert(part_to_sort[idxPart-1].first <= part_to_sort[idxPart].first);
// }
// Permute array using buffer
std
::
vector
<
unsigned
char
>
buffer
;
permute_copy
<
real_number
,
size_particle_positions
>
(
current_offset_particles_for_partition
[
idxPartition
],
...
...
@@ -360,28 +345,6 @@ public:
current_cell_idx
=
particles_coord
[
idx_part
];
current_nb_particles_in_cell
=
1
;
current_cell_offset
=
idx_part
;
// if(inout_index_particles[idx_part] == 547){// TODO
// printf("idxPartition %d\n", idxPartition);
// printf(">> Coord index %ld - %ld (tree index %ld)\n", idx_part, inout_index_particles[idx_part],particles_coord[idx_part]);
// printf(">> Box index %ld - %ld - %ld\n", get_cell_coord_x_from_index(particles_coord[idx_part]),
// get_cell_coord_y_from_index(particles_coord[idx_part]),
// get_cell_coord_z_from_index(particles_coord[idx_part]));
// printf(">> current_cell_offset %ld current_nb_particles_in_cell %ld\n", current_cell_offset, current_nb_particles_in_cell);
// printf(">> Position %e %e %e\n", particles_positions[idx_part*size_particle_positions + IDX_X],
// particles_positions[idx_part*size_particle_positions + IDX_Y],
// particles_positions[idx_part*size_particle_positions + IDX_Z]);
// }
// if(inout_index_particles[idx_part] == 356){// TODO
// printf("idxPartition %d\n", idxPartition);
// printf(">> Coord index %ld - %ld (tree index %ld)\n", idx_part, inout_index_particles[idx_part],particles_coord[idx_part]);
// printf(">> Box index %ld - %ld - %ld\n", get_cell_coord_x_from_index(particles_coord[idx_part]),
// get_cell_coord_y_from_index(particles_coord[idx_part]),
// get_cell_coord_z_from_index(particles_coord[idx_part]));
// printf(">> current_cell_offset %ld current_nb_particles_in_cell %ld\n", current_cell_offset, current_nb_particles_in_cell);
// printf(">> Position %e %e %e\n", particles_positions[idx_part*size_particle_positions + IDX_X],
// particles_positions[idx_part*size_particle_positions + IDX_Y],
// particles_positions[idx_part*size_particle_positions + IDX_Z]);
// }
}
else
{
current_nb_particles_in_cell
+=
1
;
...
...
@@ -393,10 +356,6 @@ public:
}
}
// printf("[%d] go from cutoff level %ld to %ld\n",
// my_rank, my_down_z_cell_level, my_top_z_cell_level); // TODO remove
// fflush(stdout); // TODO
// Offset per cell layers
long
int
previous_index
=
0
;
std
::
unique_ptr
<
partsize_t
[]
>
particles_offset_layers
(
new
partsize_t
[
my_nb_cell_levels
+
1
]());
...
...
@@ -412,9 +371,6 @@ public:
}
}
for
(
long
int
idx_layer
=
0
;
idx_layer
<
my_nb_cell_levels
;
++
idx_layer
){
// printf("[%d] nb particles in cutoff level %ld are %ld\n",
// my_rank, idx_layer, particles_offset_layers[idx_layer+1]); // TODO remove
// fflush(stdout); // TODO
particles_offset_layers
[
idx_layer
+
1
]
+=
particles_offset_layers
[
idx_layer
];
}
...
...
@@ -425,10 +381,6 @@ public:
// Find process with at least one neighbor
{
std
::
cout
<<
my_rank
<<
">> my_top_z_cell_level "
<<
my_top_z_cell_level
<<
std
::
endl
;
std
::
cout
<<
my_rank
<<
">> my_down_z_cell_level "
<<
my_down_z_cell_level
<<
std
::
endl
;
std
::
cout
.
flush
();
// TODO
int
dest_proc
=
(
my_rank
+
1
)
%
nb_processes_involved
;
while
(
dest_proc
!=
my_rank
&&
(
my_top_z_cell_level
==
first_cell_level_proc
(
dest_proc
)
...
...
@@ -440,11 +392,6 @@ public:
nb_levels_to_send
+=
1
;
}
std
::
cout
<<
my_rank
<<
" dest_proc "
<<
dest_proc
<<
std
::
endl
;
std
::
cout
<<
my_rank
<<
">> first_cell_level_proc(dest_proc) "
<<
first_cell_level_proc
(
dest_proc
)
<<
std
::
endl
;
std
::
cout
<<
my_rank
<<
">> last_cell_level_proc(dest_proc) "
<<
last_cell_level_proc
(
dest_proc
)
<<
std
::
endl
;
std
::
cout
.
flush
();
// TODO
NeighborDescriptor
descriptor
;
descriptor
.
destProc
=
dest_proc
;
descriptor
.
nbLevelsToExchange
=
nb_levels_to_send
;
...
...
@@ -452,21 +399,10 @@ public:
descriptor
.
isRecv
=
false
;
descriptor
.
positionsReceived
=
false
;
std
::
cout
<<
my_rank
<<
" SEND"
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.destProc "
<<
descriptor
.
destProc
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.nbLevelsToExchange "
<<
descriptor
.
nbLevelsToExchange
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.nbParticlesToExchange "
<<
descriptor
.
nbParticlesToExchange
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.isRecv "
<<
descriptor
.
isRecv
<<
std
::
endl
;
std
::
cout
<<
">> neigDescriptors.size() "
<<
neigDescriptors
.
size
()
<<
std
::
endl
;
std
::
cout
.
flush
();
// TODO
neigDescriptors
.
emplace_back
(
std
::
move
(
descriptor
));
dest_proc
=
(
dest_proc
+
1
)
%
nb_processes_involved
;
}
std
::
cout
<<
my_rank
<<
" NO dest_proc "
<<
dest_proc
<<
std
::
endl
;
std
::
cout
<<
my_rank
<<
" NO first_cell_level_proc(dest_proc) "
<<
first_cell_level_proc
(
dest_proc
)
<<
std
::
endl
;
std
::
cout
.
flush
();
// TODO
int
src_proc
=
(
my_rank
-
1
+
nb_processes_involved
)
%
nb_processes_involved
;
while
(
src_proc
!=
my_rank
...
...
@@ -479,10 +415,6 @@ public:
nb_levels_to_recv
+=
1
;
}
std
::
cout
<<
my_rank
<<
" src_proc "
<<
src_proc
<<
std
::
endl
;
std
::
cout
<<
my_rank
<<
" first_cell_level_proc(src_proc) "
<<
first_cell_level_proc
(
src_proc
)
<<
std
::
endl
;
std
::
cout
.
flush
();
// TODO
NeighborDescriptor
descriptor
;
descriptor
.
destProc
=
src_proc
;
descriptor
.
nbLevelsToExchange
=
nb_levels_to_recv
;
...
...
@@ -492,20 +424,8 @@ public:
neigDescriptors
.
emplace_back
(
std
::
move
(
descriptor
));
std
::
cout
<<
my_rank
<<
"] RECV"
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.destProc "
<<
descriptor
.
destProc
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.nbLevelsToExchange "
<<
descriptor
.
nbLevelsToExchange
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.nbParticlesToExchange "
<<
descriptor
.
nbParticlesToExchange
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.nbParticlesToExchange "
<<
descriptor
.
nbParticlesToExchange
<<
std
::
endl
;
std
::
cout
<<
">> descriptor.isRecv "
<<
descriptor
.
isRecv
<<
std
::
endl
;
std
::
cout
<<
">> neigDescriptors.size() "
<<
neigDescriptors
.
size
()
<<
std
::
endl
;
std
::
cout
.
flush
();
// TODO
src_proc
=
(
src_proc
-
1
+
nb_processes_involved
)
%
nb_processes_involved
;
}
std
::
cout
<<
my_rank
<<
" NO src_proc "
<<
src_proc
<<
std
::
endl
;
std
::
cout
<<
my_rank
<<
" NO first_cell_level_proc(src_proc) "
<<
first_cell_level_proc
(
src_proc
)
<<
std
::
endl
;
std
::
cout
.
flush
();
// TODO
}
//////////////////////////////////////////////////////////////////////
...
...
@@ -529,12 +449,6 @@ public:
current_com
,
&
mpiRequests
.
back
()));
if
(
descriptor
.
nbParticlesToExchange
){
// std::cout << my_rank << "] SEND_PARTICLES" << std::endl;
// std::cout << "descriptor.nbParticlesToExchange " << descriptor.nbParticlesToExchange << std::endl;
// std::cout << "descriptor.destProc " << descriptor.destProc << std::endl;
// std::cout << "idxDescr " << idxDescr << std::endl;
// std::cout << "send from part " << particles_offset_layers[my_nb_cell_levels-descriptor.nbLevelsToExchange] << std::endl;
whatNext
.
emplace_back
(
std
::
pair
<
Action
,
int
>
{
NOTHING_TODO
,
-
1
});
mpiRequests
.
emplace_back
();
assert
(
descriptor
.
nbParticlesToExchange
*
size_particle_positions
<
std
::
numeric_limits
<
int
>::
max
());
...
...
@@ -562,8 +476,6 @@ public:
}
}
else
{
// std::cout << "RECV_PARTICLES " << RECV_PARTICLES << std::endl;
// std::cout << "idxDescr " << idxDescr << std::endl;
whatNext
.
emplace_back
(
std
::
pair
<
Action
,
int
>
{
RECV_PARTICLES
,
idxDescr
});
mpiRequests
.
emplace_back
();
AssertMpi
(
MPI_Irecv
(
&
descriptor
.
nbParticlesToExchange
,
...
...
@@ -606,13 +518,7 @@ public:
assert
(
NbParticlesToReceive
!=
-
1
);
assert
(
descriptor
.
toCompute
==
nullptr
);
// std::cout << my_rank << "] RECV_PARTICLES" << std::endl;
// std::cout << "descriptor.nbParticlesToExchange " << descriptor.nbParticlesToExchange << std::endl;
// std::cout << "descriptor.destProc " << descriptor.destProc << std::endl;
// std::cout << "releasedAction.second " << releasedAction.second << std::endl;
if
(
NbParticlesToReceive
){
// std::cout << "MPI_Irecv " << std::endl;
descriptor
.
toCompute
.
reset
(
new
real_number
[
NbParticlesToReceive
*
size_particle_positions
]);
whatNext
.
emplace_back
(
std
::
pair
<
Action
,
int
>
{
CHECK_PARTICLES
,
releasedAction
.
second
});
mpiRequests
.
emplace_back
();
...
...
@@ -668,19 +574,6 @@ public:
std
::
array
<
real_number
,
3
>
shift
[
27
];
const
int
nbNeighbors
=
my_tree
.
getNeighbors
(
current_cell_idx
,
neighbors
,
neighbors_indexes
,
shift
,
true
);
// for(int idx_test = 0 ; idx_test < nb_parts_in_cell ; ++idx_test){ // TODO
// real_number totest[3] = {8.570442e-01, 7.173084e-02, 8.279754e-03};
// if(int(descriptor.toCompute[(idxPart+idx_test)*size_particle_positions + IDX_X]*1000) == int(totest[0]*1000)
// && int(descriptor.toCompute[(idxPart+idx_test)*size_particle_positions + IDX_Y]*1000) == int(totest[1]*1000)
// && int(descriptor.toCompute[(idxPart+idx_test)*size_particle_positions + IDX_Z]*1000) == int(totest[2]*1000)){
// printf("Found a pos %ld\n", idxPart+idx_test);
// printf("pos %e %e %e\n",
// descriptor.toCompute[(idxPart+idx_test)*size_particle_positions + IDX_X],
// descriptor.toCompute[(idxPart+idx_test)*size_particle_positions + IDX_Y],
// descriptor.toCompute[(idxPart+idx_test)*size_particle_positions + IDX_Z]);
// }
// }
// with other interval
for
(
size_t
idx_neighbor
=
0
;
idx_neighbor
<
nbNeighbors
;
++
idx_neighbor
){
cells_locker
.
lock
(
neighbors_indexes
[
idx_neighbor
]);
...
...
@@ -705,22 +598,6 @@ public:
&
particles_current_rhs
[((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
dist_r2
,
shift
[
idx_neighbor
][
IDX_X
],
shift
[
idx_neighbor
][
IDX_Y
],
shift
[
idx_neighbor
][
IDX_Z
]);
}
// if(inout_index_particles[(*neighbors[idx_neighbor])[idx_2].first+idx_p2] == 356){// TODO
// printf("test interaction between :\n");
// printf("index %ld (%ld) pos %e %e %e\n",
// (idxPart+idx_p1), -1L,
// descriptor.toCompute[(idxPart+idx_p1)*size_particle_positions + IDX_X],
// descriptor.toCompute[(idxPart+idx_p1)*size_particle_positions + IDX_Y],
// descriptor.toCompute[(idxPart+idx_p1)*size_particle_positions + IDX_Z]);
// printf("index %ld (%ld) pos %e %e %e\n",
// ((*neighbors[idx_neighbor])[idx_2].first+idx_p2),
// inout_index_particles[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)],
// particles_positions[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)*size_particle_positions + IDX_X],
// particles_positions[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)*size_particle_positions + IDX_Y],
// particles_positions[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)*size_particle_positions + IDX_Z]);
// printf("Radius = %e (%e)\n", sqrt(dist_r2), dist_r2);
// }
}
}
}
...
...
@@ -795,28 +672,6 @@ public:
for
(
size_t
idx_1
=
0
;
idx_1
<
intervals
.
size
()
;
++
idx_1
){
// self interval
for
(
partsize_t
idx_p1
=
0
;
idx_p1
<
intervals
[
idx_1
].
second
;
++
idx_p1
){
// if(((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 356))){// TODO
// printf("box %ld:\n", iter_cell.first);
// printf("intervals.size() %lu:\n", intervals.size());
// printf("intervals[idx_1].second %ld:\n", intervals[idx_1].second);
// printf("index %ld (%ld) pos %e %e %e\n",
// (intervals[idx_1].first+idx_p1), inout_index_particles[(intervals[idx_1].first+idx_p1)],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_X],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Y],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Z]);
// }
// if(((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 547))){// TODO
// printf("box %ld:\n", iter_cell.first);
// printf("intervals.size() %lu:\n", intervals.size());
// printf("intervals[idx_1].second %ld:\n", intervals[idx_1].second);
// printf("index %ld (%ld) pos %e %e %e\n",
// (intervals[idx_1].first+idx_p1), inout_index_particles[(intervals[idx_1].first+idx_p1)],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_X],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Y],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Z]);
// }
for
(
partsize_t
idx_p2
=
idx_p1
+
1
;
idx_p2
<
intervals
[
idx_1
].
second
;
++
idx_p2
){
const
real_number
dist_r2
=
compute_distance_r2
(
particles_positions
[(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_positions
+
IDX_X
],
particles_positions
[(
intervals
[
idx_1
].
first
+
idx_p1
)
*
size_particle_positions
+
IDX_Y
],
...
...
@@ -835,27 +690,6 @@ public:
&
particles_current_rhs
[(
intervals
[
idx_1
].
first
+
idx_p2
)
*
size_particle_rhs
],
dist_r2
,
0
,
0
,
0
);
}
// if(((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 356)
// || inout_index_particles[(intervals[idx_1].first+idx_p2)] == 356)/*
// && ((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 1832)
// || inout_index_particles[(intervals[idx_1].first+idx_p2)] == 1832)
// && ((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 547)
// || inout_index_particles[(intervals[idx_1].first+idx_p2)] == 547)*/){// TODO
// printf("print between :\n");
// printf("index %ld (%ld) pos %e %e %e\n",
// (intervals[idx_1].first+idx_p1), inout_index_particles[(intervals[idx_1].first+idx_p1)],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_X],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Y],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Z]);
// printf("index %ld (%ld) pos %e %e %e\n",
// (intervals[idx_1].first+idx_p2),
// inout_index_particles[(intervals[idx_1].first+idx_p2)],
// particles_positions[(intervals[idx_1].first+idx_p2)*size_particle_positions + IDX_X],
// particles_positions[(intervals[idx_1].first+idx_p2)*size_particle_positions + IDX_Y],
// particles_positions[(intervals[idx_1].first+idx_p2)*size_particle_positions + IDX_Z]);
// printf("Radius = %e (%e)\n", sqrt(dist_r2), dist_r2);
// }
}
}
...
...
@@ -880,27 +714,6 @@ public:
&
particles_current_rhs
[(
intervals
[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
dist_r2
,
0
,
0
,
0
);
}
// if(((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 356)
// || inout_index_particles[(intervals[idx_2].first+idx_p2)] == 356)/*
// && ((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 547)
// || inout_index_particles[(intervals[idx_2].first+idx_p2)] == 547)
// && ((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 1832)
// || inout_index_particles[(intervals[idx_2].first+idx_p2)] == 1832)*/){// TODO
// printf("print between :\n");
// printf("index %ld (%ld) pos %e %e %e\n",
// (intervals[idx_1].first+idx_p1), inout_index_particles[(intervals[idx_1].first+idx_p1)],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_X],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Y],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Z]);
// printf("index %ld (%ld) pos %e %e %e\n",
// (intervals[idx_2].first+idx_p2),
// inout_index_particles[(intervals[idx_2].first+idx_p2)],
// particles_positions[(intervals[idx_2].first+idx_p2)*size_particle_positions + IDX_X],
// particles_positions[(intervals[idx_2].first+idx_p2)*size_particle_positions + IDX_Y],
// particles_positions[(intervals[idx_2].first+idx_p2)*size_particle_positions + IDX_Z]);
// printf("Radius = %e (%e)\n", sqrt(dist_r2), dist_r2);
// }
}
}
}
...
...
@@ -911,12 +724,6 @@ public:
std
::
array
<
real_number
,
3
>
shift
[
27
];
const
int
nbNeighbors
=
my_tree
.
getNeighbors
(
currenct_cell_idx
,
neighbors
,
neighbors_indexes
,
shift
,
false
);
// if(((currenct_cell_idx == 785))){// TODO
// printf("box %ld:\n", iter_cell.first);
// printf("intervals.size() %lu:\n", intervals.size());
// printf("nbNeighbors %d\n",nbNeighbors);
// }
for
(
size_t
idx_1
=
0
;
idx_1
<
intervals
.
size
()
;
++
idx_1
){
// with other interval
for
(
size_t
idx_neighbor
=
0
;
idx_neighbor
<
nbNeighbors
;
++
idx_neighbor
){
...
...
@@ -943,27 +750,6 @@ public:
&
particles_current_rhs
[((
*
neighbors
[
idx_neighbor
])[
idx_2
].
first
+
idx_p2
)
*
size_particle_rhs
],
dist_r2
,
shift
[
idx_neighbor
][
IDX_X
],
shift
[
idx_neighbor
][
IDX_Y
],
shift
[
idx_neighbor
][
IDX_Z
]);
}
// if(((inout_index_particles[(intervals[idx_1].first+idx_p1)] == 356)
// || inout_index_particles[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)] == 356)/*
// && (inout_index_particles[(intervals[idx_1].first+idx_p1)] == 547)
// || inout_index_particles[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)] == 547
// && (inout_index_particles[(intervals[idx_1].first+idx_p1)] == 1832)
// || inout_index_particles[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)] == 1832*/){// TODO
// printf("print between :\n");
// printf("index %ld (%ld) pos %e %e %e\n",
// (intervals[idx_1].first+idx_p1), inout_index_particles[(intervals[idx_1].first+idx_p1)],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_X],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Y],
// particles_positions[(intervals[idx_1].first+idx_p1)*size_particle_positions + IDX_Z]);
// printf("index %ld (%ld) pos %e %e %e\n",
// ((*neighbors[idx_neighbor])[idx_2].first+idx_p2),
// inout_index_particles[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)],
// particles_positions[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)*size_particle_positions + IDX_X],
// particles_positions[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)*size_particle_positions + IDX_Y],
// particles_positions[((*neighbors[idx_neighbor])[idx_2].first+idx_p2)*size_particle_positions + IDX_Z]);
// printf("Radius = %e (%e)\n", sqrt(dist_r2), dist_r2);
// }
}
}
}
...
...
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