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
23e60a06
Commit
23e60a06
authored
5 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
adds timing tags
parent
7b4d4274
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpp/particles/interpolation/abstract_particle_set.hpp
+6
-0
6 additions, 0 deletions
cpp/particles/interpolation/abstract_particle_set.hpp
cpp/particles/interpolation/particle_set.hpp
+5
-1
5 additions, 1 deletion
cpp/particles/interpolation/particle_set.hpp
with
11 additions
and
1 deletion
cpp/particles/interpolation/abstract_particle_set.hpp
+
6
−
0
View file @
23e60a06
...
...
@@ -45,6 +45,7 @@
* - updating particle information and redistributing data among MPI processes
* accordingly.
* - approximating fields at particle locations ("sampling").
* - applying a generic particle-to-particle interaction object (P2PKernel)
*
*/
...
...
@@ -80,6 +81,7 @@ class abstract_particle_set
template
<
class
func_type
>
int
LOOP
(
func_type
expression
)
{
TIMEZONE
(
"abstract_particle_set::LOOP"
);
for
(
partsize_t
idx
=
0
;
idx
<
this
->
getLocalNumberOfParticles
()
*
this
->
getStateSize
();
idx
++
)
expression
(
idx
);
return
EXIT_SUCCESS
;
...
...
@@ -87,6 +89,7 @@ class abstract_particle_set
template
<
class
func_type
>
int
LOOP_state
(
func_type
expression
)
{
TIMEZONE
(
"abstract_particle_set::LOOP_state"
);
for
(
partsize_t
idx_part
=
0
;
idx_part
<
this
->
getLocalNumberOfParticles
();
idx_part
++
)
for
(
unsigned
int
cc
=
0
;
cc
<
this
->
getStateSize
();
cc
++
)
expression
(
idx_part
,
cc
);
...
...
@@ -141,6 +144,7 @@ class abstract_particle_set
p2p_kernel_class
p2p_kernel
,
std
::
vector
<
std
::
unique_ptr
<
particle_rnumber
[]
>>
&
additional_data
)
{
TIMEZONE
(
"abstract_particle_set::applyP2PKernel"
);
// there must be at least one array with additional data,
// since the p2p kernel expects an array where to store the result of the computation
assert
(
int
(
additional_data
.
size
())
>
int
(
0
));
...
...
@@ -166,6 +170,7 @@ class abstract_particle_set
const
std
::
string
field_name
,
const
int
iteration
)
{
TIMEZONE
(
"abstract_particle_set::writeSample"
);
// set file layout
particle_sample_writer
->
setParticleFileLayout
(
this
->
getParticleFileLayout
());
// allocate position array
...
...
@@ -197,6 +202,7 @@ class abstract_particle_set
const
std
::
string
field_name
,
const
int
iteration
)
{
TIMEZONE
(
"abstract_particle_set::writeStateTriplet"
);
assert
(
i0
>=
0
);
assert
(
i0
<=
this
->
getStateSize
()
-
3
);
// set file layout
...
...
This diff is collapsed.
Click to expand it.
cpp/particles/interpolation/particle_set.hpp
+
5
−
1
View file @
23e60a06
...
...
@@ -151,6 +151,7 @@ class particle_set: public abstract_particle_set
p2p_cutoff
)
{
TIMEZONE
(
"particle_set::particle_set"
);
// if these assertions fail,
// it means the constructor prototype is broken
// because the arrays above are wrong.
...
...
@@ -224,6 +225,7 @@ class particle_set: public abstract_particle_set
const
int
firstState
,
const
int
lastState
)
const
{
TIMEZONE
(
"particle_set::extractFromParticleState"
);
const
int
numberOfStates
=
std
::
max
(
0
,(
std
::
min
(
lastState
,
state_size
)
-
firstState
));
std
::
unique_ptr
<
particle_rnumber
[]
>
stateExtract
(
new
particle_rnumber
[
local_number_of_particles
*
numberOfStates
]);
...
...
@@ -243,6 +245,7 @@ class particle_set: public abstract_particle_set
int
template_sample
(
const
field
<
field_rnumber
,
be
,
fc
>
&
field_to_sample
,
particle_rnumber
*
result
)
{
TIMEZONE
(
"particle_set::template_sample"
);
// attention: compute_distr adds result on top of existing values.
// please clean up result as appropriate before call.
this
->
pDistributor
.
template
compute_distr
<
interpolator_class
,
...
...
@@ -291,6 +294,7 @@ class particle_set: public abstract_particle_set
int
redistribute
(
std
::
vector
<
std
::
unique_ptr
<
particle_rnumber
[]
>>
&
additional_data
)
{
TIMEZONE
(
"particle_set::redistribute"
);
this
->
pDistributor
.
template
redistribute
<
interpolator_class
,
state_size
,
state_size
,
...
...
@@ -307,7 +311,7 @@ class particle_set: public abstract_particle_set
int
init
(
abstract_particles_input
<
partsize_t
,
particle_rnumber
>&
particles_input
)
{
TIMEZONE
(
"particle
s
_s
ystem
::init"
);
TIMEZONE
(
"particle_s
et
::init"
);
this
->
local_state
=
particles_input
.
getMyParticles
();
this
->
local_index
=
particles_input
.
getMyParticlesIndexes
();
...
...
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