Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
bdde8af7
There was an error fetching the commit references. Please try again later.
Commit
bdde8af7
authored
6 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
DistributedGridSynchronizer code reformating.
parent
0b02b725
No related branches found
No related tags found
1 merge request
!26
Lbm
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h
+16
-17
16 additions, 17 deletions
...NL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h
with
16 additions
and
17 deletions
src/TNL/Meshes/DistributedMeshes/DistributedGridSynchronizer.h
+
16
−
17
View file @
bdde8af7
...
...
@@ -149,13 +149,13 @@ class DistributedMeshSynchronizer< Functions::MeshFunction< Grid< MeshDimension,
neighbors
,
periodicBoundaries
,
PeriodicBoundariesMaskPointer
(
nullptr
)
);
// the mask is used only when receiving data );
//async send and receive
typename
CommunicatorType
::
Request
requests
[
2
*
this
->
getNeighborCount
()];
typename
CommunicatorType
::
CommunicationGroup
group
;
group
=*
((
typename
CommunicatorType
::
CommunicationGroup
*
)(
distributedGrid
->
getCommunicationGroup
()));
int
requestsCount
(
0
);
//send everything, recieve everything
for
(
int
i
=
0
;
i
<
this
->
getNeighborCount
();
i
++
)
if
(
neighbors
[
i
]
!=
-
1
)
...
...
@@ -173,19 +173,19 @@ class DistributedMeshSynchronizer< Functions::MeshFunction< Grid< MeshDimension,
CommunicatorType
::
WaitAll
(
requests
,
requestsCount
);
//copy data from receive buffers
copyBuffers
(
meshFunction
,
recieveBuffers
,
recieveBegin
,
sendDimensions
,
copyBuffers
(
meshFunction
,
recieveBuffers
,
recieveBegin
,
sendDimensions
,
false
,
neighbors
,
periodicBoundaries
,
mask
);
}
private
:
template
<
typename
Real_
,
private
:
template
<
typename
Real_
,
typename
MeshFunctionType
,
typename
PeriodicBoundariesMaskPointer
>
void
copyBuffers
(
void
copyBuffers
(
MeshFunctionType
&
meshFunction
,
Containers
::
Array
<
Real_
,
Device
,
Index
>*
buffers
,
CoordinatesType
*
begins
,
...
...
@@ -199,29 +199,28 @@ class DistributedMeshSynchronizer< Functions::MeshFunction< Grid< MeshDimension,
for
(
int
i
=
0
;
i
<
this
->
getNeighborCount
();
i
++
)
{
bool
isBoundary
=
(
neighbor
[
i
]
==
-
1
);
bool
isBoundary
=
(
neighbor
[
i
]
==
-
1
);
if
(
!
isBoundary
||
periodicBoundaries
)
{
Helper
::
BufferEntities
(
meshFunction
,
mask
,
buffers
[
i
].
getData
(),
isBoundary
,
begins
[
i
],
sizes
[
i
],
toBuffer
);
}
}
Helper
::
BufferEntities
(
meshFunction
,
mask
,
buffers
[
i
].
getData
(),
isBoundary
,
begins
[
i
],
sizes
[
i
],
toBuffer
);
}
}
}
private
:
Containers
::
Array
<
RealType
,
Device
,
Index
>
sendBuffers
[
getNeighborCount
()];
Containers
::
Array
<
RealType
,
Device
,
Index
>
recieveBuffers
[
getNeighborCount
()];
Containers
::
StaticArray
<
getNeighborCount
(),
int
>
sendSizes
;
CoordinatesType
sendDimensions
[
getNeighborCount
()];
CoordinatesType
recieveDimensions
[
getNeighborCount
()];
CoordinatesType
sendBegin
[
getNeighborCount
()];
CoordinatesType
recieveBegin
[
getNeighborCount
()];
DistributedGridType
*
distributedGrid
;
bool
isSet
;
};
...
...
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