Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pairs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
software
pairs
Commits
7ed191a2
Commit
7ed191a2
authored
1 year ago
by
Rafael Ravedutti Lucio Machado
Browse files
Options
Downloads
Patches
Plain Diff
Small adjustments
Signed-off-by:
Rafael Ravedutti
<
rafael.r.ravedutti@fau.de
>
parent
5fea59f6
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
runtime/boundary_weights.hpp
+7
-7
7 additions, 7 deletions
runtime/boundary_weights.hpp
src/pairs/sim/domain_partitioning.py
+3
-8
3 additions, 8 deletions
src/pairs/sim/domain_partitioning.py
with
10 additions
and
15 deletions
runtime/boundary_weights.hpp
+
7
−
7
View file @
7ed191a2
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
//---
//---
#include
"pairs.hpp"
#include
"pairs.hpp"
#include
"pairs_common.hpp"
#include
"pairs_common.hpp"
#include
"gen/
property_
interface.hpp"
#include
"gen/interface
s
.hpp"
#pragma once
#pragma once
...
@@ -27,9 +27,9 @@ void compute_boundary_weights(
...
@@ -27,9 +27,9 @@ void compute_boundary_weights(
*
comm_weight
=
0
;
*
comm_weight
=
0
;
for
(
int
i
=
0
;
i
<
nlocal
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nlocal
;
i
++
)
{
real_t
pos_x
=
pairs_interface
::
get
P
osition
(
position_ptr
,
i
,
0
,
particle_capacity
);
real_t
pos_x
=
pairs_interface
::
get
_p
osition
(
position_ptr
,
i
,
0
,
particle_capacity
);
real_t
pos_y
=
pairs_interface
::
get
P
osition
(
position_ptr
,
i
,
1
,
particle_capacity
);
real_t
pos_y
=
pairs_interface
::
get
_p
osition
(
position_ptr
,
i
,
1
,
particle_capacity
);
real_t
pos_z
=
pairs_interface
::
get
P
osition
(
position_ptr
,
i
,
2
,
particle_capacity
);
real_t
pos_z
=
pairs_interface
::
get
_p
osition
(
position_ptr
,
i
,
2
,
particle_capacity
);
if
(
pos_x
>
xmin
&&
pos_x
<=
xmax
&&
if
(
pos_x
>
xmin
&&
pos_x
<=
xmax
&&
pos_y
>
ymin
&&
pos_y
<=
ymax
&&
pos_y
>
ymin
&&
pos_y
<=
ymax
&&
...
@@ -39,9 +39,9 @@ void compute_boundary_weights(
...
@@ -39,9 +39,9 @@ void compute_boundary_weights(
}
}
for
(
int
i
=
nlocal
;
i
<
nlocal
+
nghost
;
i
++
)
{
for
(
int
i
=
nlocal
;
i
<
nlocal
+
nghost
;
i
++
)
{
real_t
pos_x
=
pairs_interface
::
get
P
osition
(
position_ptr
,
i
,
0
,
particle_capacity
);
real_t
pos_x
=
pairs_interface
::
get
_p
osition
(
position_ptr
,
i
,
0
,
particle_capacity
);
real_t
pos_y
=
pairs_interface
::
get
P
osition
(
position_ptr
,
i
,
1
,
particle_capacity
);
real_t
pos_y
=
pairs_interface
::
get
_p
osition
(
position_ptr
,
i
,
1
,
particle_capacity
);
real_t
pos_z
=
pairs_interface
::
get
P
osition
(
position_ptr
,
i
,
2
,
particle_capacity
);
real_t
pos_z
=
pairs_interface
::
get
_p
osition
(
position_ptr
,
i
,
2
,
particle_capacity
);
if
(
pos_x
>
xmin
&&
pos_x
<=
xmax
&&
if
(
pos_x
>
xmin
&&
pos_x
<=
xmax
&&
pos_y
>
ymin
&&
pos_y
<=
ymax
&&
pos_y
>
ymin
&&
pos_y
<=
ymax
&&
...
...
This diff is collapsed.
Click to expand it.
src/pairs/sim/domain_partitioning.py
+
3
−
8
View file @
7ed191a2
from
pairs.ir.block
import
pairs_device_block
,
pairs_host_block
from
pairs.ir.assign
import
Assign
from
pairs.ir.branches
import
Branch
,
Filter
from
pairs.ir.branches
import
Filter
from
pairs.ir.functions
import
Call_Void
from
pairs.ir.functions
import
Call_Int
,
Call_Void
from
pairs.ir.loops
import
For
,
ParticleFor
from
pairs.ir.utils
import
Print
from
pairs.ir.scalars
import
ScalarOp
from
pairs.ir.scalars
import
ScalarOp
from
pairs.ir.select
import
Select
from
pairs.ir.select
import
Select
from
pairs.ir.types
import
Types
from
pairs.ir.types
import
Types
from
pairs.sim.flags
import
Flags
from
pairs.sim.flags
import
Flags
from
pairs.sim.lowerable
import
Lowerable
class
DimensionRanges
:
class
DimensionRanges
:
...
@@ -50,8 +47,6 @@ class DimensionRanges:
...
@@ -50,8 +47,6 @@ class DimensionRanges:
pbc_shifts
=
[
0
if
d
!=
step
else
self
.
pbc
[
j
]
for
d
in
range
(
self
.
sim
.
ndims
())]
pbc_shifts
=
[
0
if
d
!=
step
else
self
.
pbc
[
j
]
for
d
in
range
(
self
.
sim
.
ndims
())]
yield
i
,
j
,
self
.
neighbor_ranks
[
j
],
pbc_shifts
yield
i
,
j
,
self
.
neighbor_ranks
[
j
],
pbc_shifts
def
prev_neighbor
(
self
,
j
,
step
,
position
,
offset
,
flags_to_exclude
):
def
prev_neighbor
(
self
,
j
,
step
,
position
,
offset
,
flags_to_exclude
):
particle_flags
=
self
.
sim
.
particle_flags
particle_flags
=
self
.
sim
.
particle_flags
for
i
in
For
(
self
.
sim
,
0
,
self
.
sim
.
nlocal
+
self
.
sim
.
nghost
):
for
i
in
For
(
self
.
sim
,
0
,
self
.
sim
.
nlocal
+
self
.
sim
.
nghost
):
...
...
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