Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Podhorszki, Norbert
ADIOS2
Commits
6ad2127e
Commit
6ad2127e
authored
Jun 30, 2017
by
Podhorszki, Norbert
Browse files
fix the left-right/up-down direction in code to make communication correct
parent
ef1a1408
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/heatTransfer/write/Settings.cpp
View file @
6ad2127e
...
...
@@ -64,22 +64,22 @@ Settings::Settings(int argc, char *argv[], int rank, int nproc) : rank{rank}
// determine neighbors
if
(
posx
==
0
)
rank_
left
=
-
1
;
rank_
up
=
-
1
;
else
rank_
left
=
rank
-
1
;
rank_
up
=
rank
-
1
;
if
(
posx
==
npx
-
1
)
rank_
right
=
-
1
;
rank_
down
=
-
1
;
else
rank_
right
=
rank
+
1
;
rank_
down
=
rank
+
1
;
if
(
posy
==
0
)
rank_
up
=
-
1
;
rank_
left
=
-
1
;
else
rank_
up
=
rank
-
npx
;
rank_
left
=
rank
-
npx
;
if
(
posy
==
npy
-
1
)
rank_
down
=
-
1
;
rank_
right
=
-
1
;
else
rank_
down
=
rank
+
npx
;
rank_
right
=
rank
+
npx
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment