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
91b64e4a
Commit
91b64e4a
authored
4 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
fixes rhs additional_data usage for p2p call
parent
25607346
No related branches found
No related tags found
No related merge requests found
Pipeline
#100544
passed
4 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cpp/particles/rhs/tracer_with_collision_counter_rhs.hpp
+7
-5
7 additions, 5 deletions
cpp/particles/rhs/tracer_with_collision_counter_rhs.hpp
with
7 additions
and
5 deletions
cpp/particles/rhs/tracer_with_collision_counter_rhs.hpp
+
7
−
5
View file @
91b64e4a
...
...
@@ -58,11 +58,13 @@ class tracer_with_collision_counter_rhs: public tracer_rhs<rnumber, be, tt>
// interpolation adds on top of existing values, so result must be cleared.
std
::
fill_n
(
result
,
pset
.
getLocalNumberOfParticles
()
*
3
,
0
);
int
interpolation_result
=
(
*
(
this
->
velocity
))(
t
,
pset
,
result
);
additional_data
.
push_back
(
std
::
unique_ptr
<
abstract_particle_set
::
particle_rnumber
[]
>
(
new
abstract_particle_set
::
particle_rnumber
[
pset
.
getLocalNumberOfParticles
()
*
pset
.
getStateSize
()]));
additional_data
.
insert
(
additional_data
.
begin
(),
std
::
unique_ptr
<
abstract_particle_set
::
particle_rnumber
[]
>
(
new
abstract_particle_set
::
particle_rnumber
[
pset
.
getLocalNumberOfParticles
()
*
pset
.
getStateSize
()]));
// copy rhs values to temporary array
pset
.
copy_state_tofrom
(
additional_data
[
additional_data
.
size
()
-
1
].
get
(),
additional_data
[
0
].
get
(),
result
);
this
->
p2p_gc
.
reset_collision_pairs
();
pset
.
template
applyP2PKernel
<
...
...
@@ -74,9 +76,9 @@ class tracer_with_collision_counter_rhs: public tracer_rhs<rnumber, be, tt>
// copy shuffled rhs values
pset
.
copy_state_tofrom
(
result
,
additional_data
[
additional_data
.
size
()
-
1
].
get
());
additional_data
[
0
].
get
());
// clear temporary array
additional_data
.
pop_back
(
);
additional_data
.
erase
(
additional_data
.
begin
()
);
return
interpolation_result
;
}
...
...
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