Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
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
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
9d7da3cd
Commit
9d7da3cd
authored
6 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Continue clean-up: more template factorization
parent
71f4827c
No related branches found
No related tags found
1 merge request
!11
Feature/mpi
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mesh/Connectivity.hpp
+6
-3
6 additions, 3 deletions
src/mesh/Connectivity.hpp
src/mesh/ConnectivityDispatcher.cpp
+92
-91
92 additions, 91 deletions
src/mesh/ConnectivityDispatcher.cpp
src/mesh/ConnectivityDispatcher.hpp
+11
-3
11 additions, 3 deletions
src/mesh/ConnectivityDispatcher.hpp
with
109 additions
and
97 deletions
src/mesh/Connectivity.hpp
+
6
−
3
View file @
9d7da3cd
...
@@ -47,9 +47,12 @@ class ConnectivityDescriptor
...
@@ -47,9 +47,12 @@ class ConnectivityDescriptor
public:
public:
std
::
vector
<
std
::
vector
<
unsigned
int
>>
cell_to_node_vector
;
std
::
vector
<
std
::
vector
<
unsigned
int
>>
cell_to_node_vector
;
#warning should be set in 2d
#warning should be set in 2d
only
std
::
vector
<
std
::
vector
<
unsigned
int
>>
cell_to_face_vector
;
std
::
vector
<
std
::
vector
<
unsigned
int
>>
cell_to_face_vector
;
// std::vector<std::vector<unsigned int>> face_to_cell_vector;
#warning should be set in 3d only
// std::vector<std::vector<unsigned int>> cell_to_edge_vector;
std
::
vector
<
std
::
vector
<
unsigned
int
>>
face_to_node_vector
;
std
::
vector
<
std
::
vector
<
unsigned
int
>>
face_to_node_vector
;
template
<
typename
ItemOfItemT
>
template
<
typename
ItemOfItemT
>
...
@@ -59,7 +62,7 @@ class ConnectivityDescriptor
...
@@ -59,7 +62,7 @@ class ConnectivityDescriptor
return
cell_to_node_vector
;
return
cell_to_node_vector
;
}
else
if
constexpr
(
std
::
is_same_v
<
ItemOfItemT
,
FaceOfCell
>
)
{
}
else
if
constexpr
(
std
::
is_same_v
<
ItemOfItemT
,
FaceOfCell
>
)
{
return
cell_to_face_vector
;
return
cell_to_face_vector
;
}
else
if
constexpr
(
std
::
is_same_v
<
ItemOfItemT
,
NodeOf
Cell
>
)
{
}
else
if
constexpr
(
std
::
is_same_v
<
ItemOfItemT
,
NodeOf
Face
>
)
{
return
face_to_node_vector
;
return
face_to_node_vector
;
}
else
{
}
else
{
static_assert
(
is_false_v
<
ItemOfItemT
>
,
"Unexpected item of item type"
);
static_assert
(
is_false_v
<
ItemOfItemT
>
,
"Unexpected item of item type"
);
...
...
This diff is collapsed.
Click to expand it.
src/mesh/ConnectivityDispatcher.cpp
+
92
−
91
View file @
9d7da3cd
...
@@ -46,6 +46,20 @@ ConnectivityDispatcher<Dimension>::_buildNewOwner()
...
@@ -46,6 +46,20 @@ ConnectivityDispatcher<Dimension>::_buildNewOwner()
}
}
}
}
template
<
int
Dimension
>
template
<
ItemType
item_type
>
void
ConnectivityDispatcher
<
Dimension
>::
_buildItemToExchangeLists
()
{
this
->
_buildItemListToSend
<
item_type
>
();
this
->
_buildNumberOfItemToExchange
<
item_type
>
();
if
constexpr
(
item_type
==
ItemType
::
cell
)
{
this
->
_buildCellNumberIdMap
();
}
this
->
_buildRecvItemIdCorrespondanceByProc
<
item_type
>
();
}
template
<
int
Dimension
>
template
<
int
Dimension
>
template
<
ItemType
item_type
>
template
<
ItemType
item_type
>
void
void
...
@@ -116,17 +130,22 @@ ConnectivityDispatcher<Dimension>::_buildItemListToSend()
...
@@ -116,17 +130,22 @@ ConnectivityDispatcher<Dimension>::_buildItemListToSend()
}
}
template
<
int
Dimension
>
template
<
int
Dimension
>
Array
<
const
unsigned
int
>
template
<
ItemType
item_type
>
ConnectivityDispatcher
<
Dimension
>::
_buildNbCellToSend
()
void
ConnectivityDispatcher
<
Dimension
>::
_buildNumberOfItemToExchange
()
{
{
const
auto
&
item_list_to_send_by_proc
=
this
->
_dispatchedInfo
<
I
tem
T
ype
::
cell
>
().
m_list_to_send_by_proc
;
const
auto
&
item_list_to_send_by_proc
=
this
->
_dispatchedInfo
<
i
tem
_t
ype
>
().
m_list_to_send_by_proc
;
Array
<
unsigned
int
>
nb_
cell
_to_send_by_proc
(
parallel
::
size
());
Array
<
unsigned
int
>
nb_
item
_to_send_by_proc
(
parallel
::
size
());
for
(
size_t
i
=
0
;
i
<
parallel
::
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
parallel
::
size
();
++
i
)
{
nb_
cell
_to_send_by_proc
[
i
]
=
item_list_to_send_by_proc
[
i
].
size
();
nb_
item
_to_send_by_proc
[
i
]
=
item_list_to_send_by_proc
[
i
].
size
();
}
}
return
nb_cell_to_send_by_proc
;
this
->
_dispatchedInfo
<
item_type
>
().
m_list_to_send_size_by_proc
=
nb_item_to_send_by_proc
;
this
->
_dispatchedInfo
<
item_type
>
().
m_list_to_recv_size_by_proc
=
parallel
::
allToAll
(
nb_item_to_send_by_proc
);
}
}
template
<
int
Dimension
>
template
<
int
Dimension
>
template
<
typename
DataType
,
ItemType
item_type
,
typename
ConnectivityPtr
>
template
<
typename
DataType
,
ItemType
item_type
,
typename
ConnectivityPtr
>
void
void
...
@@ -307,6 +326,42 @@ _getRecvItemSubItemNumberingByProc(const std::vector<Array<const int>>& recv_num
...
@@ -307,6 +326,42 @@ _getRecvItemSubItemNumberingByProc(const std::vector<Array<const int>>& recv_num
return
const_recv_item_sub_item_numbering_by_proc
;
return
const_recv_item_sub_item_numbering_by_proc
;
}
}
template
<
int
Dimension
>
template
<
typename
ItemOfItemT
>
void
ConnectivityDispatcher
<
Dimension
>::
_buildItemToItemDescriptor
()
{
constexpr
ItemType
item_type
=
ItemOfItemT
::
item_type
;
constexpr
ItemType
sub_item_type
=
ItemOfItemT
::
sub_item_type
;
const
auto
&
item_list_to_recv_size_by_proc
=
this
->
_dispatchedInfo
<
item_type
>
().
m_list_to_recv_size_by_proc
;
const
auto
&
recv_number_of_item_per_item_by_proc
=
this
->
_dispatchedInfo
<
ItemOfItemT
>
().
m_recv_number_of_item_per_item_by_proc
;
const
auto
&
sub_item_number_id_map
=
this
->
_dispatchedInfo
<
sub_item_type
>
().
m_number_to_id_map
;
const
auto
&
recv_item_of_item_numbers_by_proc
=
this
->
_dispatchedInfo
<
ItemOfItemT
>
().
m_recv_item_of_item_numbers_by_proc
;
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
int
l
=
0
;
for
(
size_t
i
=
0
;
i
<
item_list_to_recv_size_by_proc
[
i_rank
];
++
i
)
{
std
::
vector
<
unsigned
int
>
sub_item_vector
;
for
(
int
k
=
0
;
k
<
recv_number_of_item_per_item_by_proc
[
i_rank
][
i
];
++
k
)
{
const
auto
&
searched_sub_item_id
=
sub_item_number_id_map
.
find
(
recv_item_of_item_numbers_by_proc
[
i_rank
][
l
++
]);
Assert
(
searched_sub_item_id
!=
sub_item_number_id_map
.
end
());
sub_item_vector
.
push_back
(
searched_sub_item_id
->
second
);
}
m_new_descriptor
.
itemOfItemVector
<
ItemOfItemT
>
().
emplace_back
(
sub_item_vector
);
}
}
}
template
<
int
Dimension
>
template
<
int
Dimension
>
template
<
ItemType
item_type
>
template
<
ItemType
item_type
>
void
void
...
@@ -359,74 +414,40 @@ ConnectivityDispatcher<Dimension>::_dispatchFaces()
...
@@ -359,74 +414,40 @@ ConnectivityDispatcher<Dimension>::_dispatchFaces()
this
->
_dispatchedInfo
<
FaceOfCell
>
().
m_recv_number_of_item_per_item_by_proc
=
this
->
_dispatchedInfo
<
FaceOfCell
>
().
m_recv_number_of_item_per_item_by_proc
=
_getRecvNumberOfSubItemPerItemByProc
<
FaceOfCell
>
();
_getRecvNumberOfSubItemPerItemByProc
<
FaceOfCell
>
();
{
const
auto
&
recv_number_of_face_per_cell_by_proc
=
const
auto
&
recv_number_of_face_per_cell_by_proc
=
this
->
_dispatchedInfo
<
FaceOfCell
>
().
m_recv_number_of_item_per_item_by_proc
;
this
->
_dispatchedInfo
<
FaceOfCell
>
().
m_recv_number_of_item_per_item_by_proc
;
std
::
vector
<
Array
<
const
int
>>
recv_cell_face_numbering_by_proc
std
::
vector
<
Array
<
const
int
>>&
recv_cell_face_numbering_by_proc
=
this
->
_getRecvItemSubItemNumberingByProc
<
FaceOfCell
>
(
recv_number_of_face_per_cell_by_proc
);
=
this
->
_dispatchedInfo
<
FaceOfCell
>
().
m_recv_item_of_item_numbers_by_proc
;
this
->
_buildSubItemNumberToIdMap
<
FaceOfCell
>
(
recv_cell_face_numbering_by_proc
);
const
std
::
unordered_map
<
int
,
int
>&
face_number_id_map
=
recv_cell_face_numbering_by_proc
=
this
->
_
dispatchedInfo
<
ItemType
::
face
>
().
m_number_to_id_map
;
this
->
_
getRecvItemSubItemNumberingByProc
<
FaceOfCell
>
(
recv_number_of_face_per_cell_by_proc
)
;
this
->
_buildItemListToSend
<
ItemType
::
face
>
();
this
->
_buildSubItemNumberToIdMap
<
FaceOfCell
>
(
recv_cell_face_numbering_by_proc
);
#warning this patterns repeats for each item type. Should be factorized
Array
<
unsigned
int
>
nb_face_to_send_by_proc
(
parallel
::
size
());
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
nb_face_to_send_by_proc
[
i_rank
]
=
m_dispatched_face_info
.
m_list_to_send_by_proc
[
i_rank
].
size
();
}
}
this
->
_dispatchedInfo
<
ItemType
::
face
>
().
m_list_to_recv_size_by_proc
=
parallel
::
allToAll
(
nb_face_to_send_by_proc
);
this
->
_buildRecvItemIdCorrespondanceByProc
<
ItemType
::
face
>
();
this
->
_buildItemToExchangeLists
<
ItemType
::
face
>
();
this
->
_gatherFrom
(
m_connectivity
.
template
number
<
ItemType
::
face
>(),
m_new_descriptor
.
face_number_vector
);
{
this
->
_gatherFrom
(
m_connectivity
.
template
number
<
ItemType
::
face
>(),
m_new_descriptor
.
face_number_vector
);
const
auto
&
cell_list_to_recv_size_by_proc
=
this
->
_dispatchedInfo
<
ItemType
::
cell
>
().
m_list_to_recv_size_by_proc
;
const
auto
&
recv_number_of_face_per_cell_by_proc
=
this
->
_dispatchedInfo
<
FaceOfCell
>
().
m_recv_number_of_item_per_item_by_proc
;
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
this
->
_buildItemToItemDescriptor
<
FaceOfCell
>
();
int
l
=
0
;
for
(
size_t
i
=
0
;
i
<
cell_list_to_recv_size_by_proc
[
i_rank
];
++
i
)
{
std
::
vector
<
unsigned
int
>
face_vector
;
for
(
int
k
=
0
;
k
<
recv_number_of_face_per_cell_by_proc
[
i_rank
][
i
];
++
k
)
{
const
auto
&
searched_face_id
=
face_number_id_map
.
find
(
recv_cell_face_numbering_by_proc
[
i_rank
][
l
++
]);
Assert
(
searched_face_id
!=
face_number_id_map
.
end
());
face_vector
.
push_back
(
searched_face_id
->
second
);
}
m_new_descriptor
.
itemOfItemVector
<
FaceOfCell
>
().
emplace_back
(
face_vector
);
}
}
}
this
->
_gatherFrom
(
m_connectivity
.
cellFaceIsReversed
(),
m_new_descriptor
.
cell_face_is_reversed_vector
);
this
->
_gatherFrom
(
m_connectivity
.
cellFaceIsReversed
(),
m_new_descriptor
.
cell_face_is_reversed_vector
);
this
->
_gatherFrom
(
this
->
_dispatchedInfo
<
ItemType
::
face
>
().
m_new_owner
,
m_new_descriptor
.
face_owner_vector
);
this
->
_gatherFrom
(
this
->
_dispatchedInfo
<
ItemType
::
face
>
().
m_new_owner
,
m_new_descriptor
.
face_owner_vector
);
{
{
std
::
vector
<
Array
<
const
int
>>
recv_number_of_node_per_face_by_proc
=
auto
&
recv_number_of_node_per_face_by_proc
=
this
->
_dispatchedInfo
<
NodeOfFace
>
().
m_recv_number_of_item_per_item_by_proc
;
recv_number_of_node_per_face_by_proc
=
_getRecvNumberOfSubItemPerItemByProc
<
NodeOfFace
>
();
_getRecvNumberOfSubItemPerItemByProc
<
NodeOfFace
>
();
std
::
vector
<
Array
<
const
int
>>
recv_face_node
_number
ing
_by_proc
this
->
_dispatchedInfo
<
NodeOfFace
>
().
m_recv_item_of_item
_number
s
_by_proc
=
this
->
_getRecvItemSubItemNumberingByProc
<
NodeOfFace
>
(
recv_number_of_node_per_face_by_proc
);
=
this
->
_getRecvItemSubItemNumberingByProc
<
NodeOfFace
>
(
recv_number_of_node_per_face_by_proc
);
const
auto
&
node_number_id_map
=
this
->
_dispatchedInfo
<
ItemType
::
node
>
().
m_number_to_id_map
;
this
->
_buildItemToItemDescriptor
<
NodeOfFace
>
();
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
int
l
=
0
;
for
(
size_t
i
=
0
;
i
<
recv_number_of_node_per_face_by_proc
[
i_rank
].
size
();
++
i
)
{
std
::
vector
<
unsigned
int
>
node_vector
;
for
(
int
k
=
0
;
k
<
recv_number_of_node_per_face_by_proc
[
i_rank
][
i
];
++
k
)
{
const
auto
&
searched_node_id
=
node_number_id_map
.
find
(
recv_face_node_numbering_by_proc
[
i_rank
][
l
++
]);
Assert
(
searched_node_id
!=
node_number_id_map
.
end
());
node_vector
.
push_back
(
searched_node_id
->
second
);
}
m_new_descriptor
.
face_to_node_vector
.
emplace_back
(
node_vector
);
}
}
}
}
// Getting references
// Getting references
...
@@ -536,8 +557,11 @@ ConnectivityDispatcher<Dimension>::_dispatchFaces()
...
@@ -536,8 +557,11 @@ ConnectivityDispatcher<Dimension>::_dispatchFaces()
}
}
}
}
const
auto
&
nb_face_to_send_by_proc
=
this
->
_dispatchedInfo
<
ItemType
::
face
>
().
m_list_to_send_size_by_proc
;
const
auto
&
send_face_id_by_proc
=
m_dispatched_face_info
.
m_list_to_send_by_proc
;
const
auto
&
send_face_id_by_proc
=
m_dispatched_face_info
.
m_list_to_send_by_proc
;
std
::
vector
<
Array
<
const
block_type
>>
send_face_refs_by_proc
(
parallel
::
size
());
std
::
vector
<
Array
<
const
block_type
>>
send_face_refs_by_proc
(
parallel
::
size
());
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
Array
<
block_type
>
send_face_refs
(
nb_face_to_send_by_proc
[
i_rank
]);
Array
<
block_type
>
send_face_refs
(
nb_face_to_send_by_proc
[
i_rank
]);
const
Array
<
const
FaceId
>
send_face_id
=
send_face_id_by_proc
[
i_rank
];
const
Array
<
const
FaceId
>
send_face_id
=
send_face_id_by_proc
[
i_rank
];
...
@@ -598,32 +622,25 @@ ConnectivityDispatcher<Dimension>::ConnectivityDispatcher(const ConnectivityType
...
@@ -598,32 +622,25 @@ ConnectivityDispatcher<Dimension>::ConnectivityDispatcher(const ConnectivityType
// this->_buildNewOwner<ItemType::edge>();
// this->_buildNewOwner<ItemType::edge>();
this
->
_buildNewOwner
<
ItemType
::
node
>
();
this
->
_buildNewOwner
<
ItemType
::
node
>
();
this
->
_buildItemListToSend
<
ItemType
::
cell
>
();
this
->
_buildItemToExchangeLists
<
ItemType
::
cell
>
();
this
->
_dispatchedInfo
<
ItemType
::
cell
>
().
m_list_to_recv_size_by_proc
=
parallel
::
allToAll
(
this
->
_buildNbCellToSend
());
this
->
_buildCellNumberIdMap
();
auto
&
recv_number_of_node_per_cell_by_proc
=
this
->
_dispatchedInfo
<
NodeOfCell
>
().
m_recv_number_of_item_per_item_by_proc
;
const
std
::
vector
<
Array
<
const
int
>>
recv_number_of_node_per_cell_by_proc
recv_number_of_node_per_cell_by_proc
=
this
->
_getRecvNumberOfSubItemPerItemByProc
<
NodeOfCell
>
();
=
this
->
_getRecvNumberOfSubItemPerItemByProc
<
NodeOfCell
>
();
const
std
::
vector
<
Array
<
const
int
>>
recv_cell_node_numbering_by_proc
auto
&
recv_cell_node_numbering_by_proc
=
this
->
_dispatchedInfo
<
NodeOfCell
>
().
m_recv_item_of_item_numbers_by_proc
;
recv_cell_node_numbering_by_proc
=
this
->
_getRecvItemSubItemNumberingByProc
<
NodeOfCell
>
(
recv_number_of_node_per_cell_by_proc
);
=
this
->
_getRecvItemSubItemNumberingByProc
<
NodeOfCell
>
(
recv_number_of_node_per_cell_by_proc
);
this
->
_buildRecvItemIdCorrespondanceByProc
<
ItemType
::
cell
>
();
this
->
_gatherFrom
(
m_connectivity
.
template
number
<
ItemType
::
cell
>(),
m_new_descriptor
.
cell_number_vector
);
this
->
_gatherFrom
(
m_connectivity
.
template
number
<
ItemType
::
cell
>(),
m_new_descriptor
.
cell_number_vector
);
this
->
_buildSubItemNumberToIdMap
<
NodeOfCell
>
(
recv_cell_node_numbering_by_proc
);
this
->
_buildSubItemNumberToIdMap
<
NodeOfCell
>
(
recv_cell_node_numbering_by_proc
);
this
->
_buildItemListToSend
<
ItemType
::
node
>
();
Array
<
unsigned
int
>
nb_node_to_send_by_proc
(
parallel
::
size
());
this
->
_buildItemToExchangeLists
<
ItemType
::
node
>
();
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
nb_node_to_send_by_proc
[
i_rank
]
=
m_dispatched_node_info
.
m_list_to_send_by_proc
[
i_rank
].
size
();
}
this
->
_dispatchedInfo
<
ItemType
::
node
>
().
m_list_to_recv_size_by_proc
=
parallel
::
allToAll
(
nb_node_to_send_by_proc
);
this
->
_buildRecvItemIdCorrespondanceByProc
<
ItemType
::
node
>
();
// Fill new descriptor
// Fill new descriptor
this
->
_gatherFrom
(
m_connectivity
.
cellType
(),
m_new_descriptor
.
cell_type_vector
);
this
->
_gatherFrom
(
m_connectivity
.
cellType
(),
m_new_descriptor
.
cell_type_vector
);
...
@@ -632,24 +649,8 @@ ConnectivityDispatcher<Dimension>::ConnectivityDispatcher(const ConnectivityType
...
@@ -632,24 +649,8 @@ ConnectivityDispatcher<Dimension>::ConnectivityDispatcher(const ConnectivityType
this
->
_gatherFrom
(
m_connectivity
.
template
number
<
ItemType
::
node
>(),
m_new_descriptor
.
node_number_vector
);
this
->
_gatherFrom
(
m_connectivity
.
template
number
<
ItemType
::
node
>(),
m_new_descriptor
.
node_number_vector
);
this
->
_gatherFrom
(
this
->
_dispatchedInfo
<
ItemType
::
node
>
().
m_new_owner
,
m_new_descriptor
.
node_owner_vector
);
this
->
_gatherFrom
(
this
->
_dispatchedInfo
<
ItemType
::
node
>
().
m_new_owner
,
m_new_descriptor
.
node_owner_vector
);
{
// build cells connectivity
this
->
_buildItemToItemDescriptor
<
NodeOfCell
>
();
const
auto
&
cell_list_to_recv_size_by_proc
=
this
->
_dispatchedInfo
<
ItemType
::
cell
>
().
m_list_to_recv_size_by_proc
;
const
auto
&
node_number_id_map
=
this
->
_dispatchedInfo
<
ItemType
::
node
>
().
m_number_to_id_map
;
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
int
l
=
0
;
for
(
size_t
i
=
0
;
i
<
cell_list_to_recv_size_by_proc
[
i_rank
];
++
i
)
{
std
::
vector
<
unsigned
int
>
node_vector
;
for
(
int
k
=
0
;
k
<
recv_number_of_node_per_cell_by_proc
[
i_rank
][
i
];
++
k
)
{
const
auto
&
searched_node_id
=
node_number_id_map
.
find
(
recv_cell_node_numbering_by_proc
[
i_rank
][
l
++
]);
Assert
(
searched_node_id
!=
node_number_id_map
.
end
());
node_vector
.
push_back
(
searched_node_id
->
second
);
}
m_new_descriptor
.
cell_to_node_vector
.
emplace_back
(
node_vector
);
}
}
}
this
->
_dispatchFaces
();
this
->
_dispatchFaces
();
m_dispatched_connectivity
=
ConnectivityType
::
build
(
m_new_descriptor
);
m_dispatched_connectivity
=
ConnectivityType
::
build
(
m_new_descriptor
);
...
...
This diff is collapsed.
Click to expand it.
src/mesh/ConnectivityDispatcher.hpp
+
11
−
3
View file @
9d7da3cd
...
@@ -23,8 +23,8 @@ class ConnectivityDispatcher
...
@@ -23,8 +23,8 @@ class ConnectivityDispatcher
{
{
using
ItemId
=
ItemIdT
<
item_type
>
;
using
ItemId
=
ItemIdT
<
item_type
>
;
ItemValue
<
const
int
,
item_type
>
m_new_owner
;
ItemValue
<
const
int
,
item_type
>
m_new_owner
;
Array
<
const
unsigned
int
>
m_list_to_send_size_by_proc
;
std
::
vector
<
Array
<
const
ItemId
>>
m_list_to_send_by_proc
;
std
::
vector
<
Array
<
const
ItemId
>>
m_list_to_send_by_proc
;
#warning is m_list_to_recv_size_by_proc really necessary?
Array
<
const
unsigned
int
>
m_list_to_recv_size_by_proc
;
Array
<
const
unsigned
int
>
m_list_to_recv_size_by_proc
;
std
::
unordered_map
<
int
,
int
>
m_number_to_id_map
;
std
::
unordered_map
<
int
,
int
>
m_number_to_id_map
;
std
::
vector
<
Array
<
const
ItemId
>>
m_recv_id_correspondance_by_proc
;
std
::
vector
<
Array
<
const
ItemId
>>
m_recv_id_correspondance_by_proc
;
...
@@ -69,6 +69,7 @@ class ConnectivityDispatcher
...
@@ -69,6 +69,7 @@ class ConnectivityDispatcher
struct
DispatchedItemOfItemInfo
struct
DispatchedItemOfItemInfo
{
{
std
::
vector
<
Array
<
const
int
>>
m_recv_number_of_item_per_item_by_proc
;
std
::
vector
<
Array
<
const
int
>>
m_recv_number_of_item_per_item_by_proc
;
std
::
vector
<
Array
<
const
int
>>
m_recv_item_of_item_numbers_by_proc
;
};
};
DispatchedItemOfItemInfo
<
NodeOfCell
>
m_dispatched_node_of_cell_info
;
DispatchedItemOfItemInfo
<
NodeOfCell
>
m_dispatched_node_of_cell_info
;
...
@@ -159,13 +160,20 @@ class ConnectivityDispatcher
...
@@ -159,13 +160,20 @@ class ConnectivityDispatcher
template
<
ItemType
item_type
>
template
<
ItemType
item_type
>
void
_buildItemListToSend
();
void
_buildItemListToSend
();
Array
<
const
unsigned
int
>
_buildNbCellToSend
();
void
_buildCellNumberIdMap
();
void
_buildCellNumberIdMap
();
template
<
typename
ItemOfItemT
>
template
<
typename
ItemOfItemT
>
void
_buildSubItemNumberToIdMap
(
const
std
::
vector
<
Array
<
const
int
>>&
recv_cell_node_number_by_proc
);
void
_buildSubItemNumberToIdMap
(
const
std
::
vector
<
Array
<
const
int
>>&
recv_cell_node_number_by_proc
);
template
<
ItemType
item_type
>
void
_buildItemToExchangeLists
();
template
<
ItemType
item_type
>
void
_buildNumberOfItemToExchange
();
template
<
typename
ItemOfItemT
>
void
_buildItemToItemDescriptor
();
void
_dispatchFaces
();
void
_dispatchFaces
();
template
<
typename
DataType
,
ItemType
item_type
,
typename
ConnectivityPtr
>
template
<
typename
DataType
,
ItemType
item_type
,
typename
ConnectivityPtr
>
...
...
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