Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
78b57faf
Commit
78b57faf
authored
Sep 10, 2019
by
Timo Koch
Browse files
Merge branch 'fix/gmshreader-alu' into 'master'
Fix makeGridFromFile for ALUGrid Closes
#729
See merge request
!1709
parents
55e2ac09
a35bc7c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/io/grid/gridmanager_alu.hh
View file @
78b57faf
...
...
@@ -24,6 +24,8 @@
#ifndef DUMUX_IO_GRID_MANAGER_ALU_HH
#define DUMUX_IO_GRID_MANAGER_ALU_HH
#include <dune/common/version.hh>
// ALUGrid specific includes
#if HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
...
...
@@ -158,8 +160,12 @@ public:
{
std
::
vector
<
int
>
boundaryMarkersInsertionIndex
,
boundaryMarkers
,
faceMarkers
,
elementMarkers
;
auto
gridFactory
=
std
::
make_unique
<
Dune
::
GridFactory
<
Grid
>>
();
// Older versions of Dune(-Alugrid) require that the Gmsh file is read only on process 0
#if DUNE_VERSION_LT(DUNE_GRID, 2, 7)
if
(
Dune
::
MPIHelper
::
getCollectiveCommunication
().
rank
()
==
0
)
Dune
::
GmshReader
<
Grid
>::
read
(
*
gridFactory
,
fileName
,
boundaryMarkersInsertionIndex
,
elementMarkers
,
verbose
,
boundarySegments
);
#endif
Dune
::
GmshReader
<
Grid
>::
read
(
*
gridFactory
,
fileName
,
boundaryMarkersInsertionIndex
,
elementMarkers
,
verbose
,
boundarySegments
);
ParentType
::
gridPtr
()
=
std
::
shared_ptr
<
Grid
>
(
gridFactory
->
createGrid
());
...
...
@@ -186,8 +192,12 @@ public:
else
{
auto
gridFactory
=
std
::
make_unique
<
Dune
::
GridFactory
<
Grid
>>
();
// Older versions of Dune(-Alugrid) require that the Gmsh file is read only on process 0
#if DUNE_VERSION_LT(DUNE_GRID, 2, 7)
if
(
Dune
::
MPIHelper
::
getCollectiveCommunication
().
rank
()
==
0
)
Dune
::
GmshReader
<
Grid
>::
read
(
*
gridFactory
,
fileName
,
verbose
,
boundarySegments
);
#endif
Dune
::
GmshReader
<
Grid
>::
read
(
*
gridFactory
,
fileName
,
verbose
,
boundarySegments
);
ParentType
::
gridPtr
()
=
std
::
shared_ptr
<
Grid
>
(
gridFactory
->
createGrid
());
}
...
...
Write
Preview
Supports
Markdown
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