Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
dorie
dorie
Commits
69ec956f
Commit
69ec956f
authored
Sep 25, 2018
by
Lukas Riedel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run GridMapper algorithms for parallel runs only
parent
0cffdd69
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
24 deletions
+30
-24
dune/dorie/solver/util_grid_mapper.hh
dune/dorie/solver/util_grid_mapper.hh
+30
-24
No files found.
dune/dorie/solver/util_grid_mapper.hh
View file @
69ec956f
...
...
@@ -61,20 +61,23 @@ public:
_element_index_map
(
element_index_map
),
_boundary_index_map
(
boundary_index_map
)
{
// create a mapping using global persistent IDs
auto
id_map
=
build_id_map
();
// broadcast this map
broadcast_id_map
(
id_map
);
// load-balance the grid to all processors
_grid
->
loadBalance
();
_mapper
.
update
();
// rebuild the index map for local grid partition
rebuild_index_maps
(
id_map
);
// broadcast the (global) boundary map
broadcast_vector
(
_boundary_index_map
);
if
(
_gv
.
comm
().
size
()
>
1
)
{
// create a mapping using global persistent IDs
auto
id_map
=
build_id_map
();
// broadcast this map
broadcast_id_map
(
id_map
);
// load-balance the grid to all processors
_grid
->
loadBalance
();
_mapper
.
update
();
// rebuild the index map for local grid partition
rebuild_index_maps
(
id_map
);
// broadcast the (global) boundary map
broadcast_vector
(
_boundary_index_map
);
}
}
/// Create a GridMapper for a rectangular grid using cell coordinates.
...
...
@@ -101,16 +104,19 @@ public:
_element_index_map
(
element_index_map
),
_boundary_index_map
(
boundary_index_map
)
{
// load-balance the grid to all processors
// (might have happened already)
_grid
->
loadBalance
();
_mapper
.
update
();
// broadcast the index vectors
broadcast_vector
(
element_index_map
);
// recompute stuff
rebuild_index_maps
(
cells
);
if
(
_gv
.
comm
().
size
()
>
1
)
{
// load-balance the grid to all processors
// (might have happened already)
_grid
->
loadBalance
();
_mapper
.
update
();
// broadcast the index vectors
broadcast_vector
(
element_index_map
);
// recompute stuff
rebuild_index_maps
(
cells
);
}
}
/// Return a reference to the element index map
...
...
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