Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-alugrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-alugrid
Commits
7606237c
Commit
7606237c
authored
4 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
[bugfix][DGF] change constructor argument to Comm to get correct default
value for MPI_Comm.
parent
8b1ad2cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/alugrid/common/declaration.hh
+1
-0
1 addition, 0 deletions
dune/alugrid/common/declaration.hh
dune/alugrid/dgf.hh
+18
-8
18 additions, 8 deletions
dune/alugrid/dgf.hh
with
19 additions
and
8 deletions
dune/alugrid/common/declaration.hh
+
1
−
0
View file @
7606237c
...
...
@@ -33,6 +33,7 @@ namespace Dune
ALUGridNoComm
()
:
noComm_
()
{}
ALUGridNoComm
(
const
No_Comm
&
comm
)
:
noComm_
(
comm
)
{}
#if ALU3DGRID_PARALLEL
ALUGridNoComm
(
MPI_Comm
comm
)
:
noComm_
()
{}
operator
MPI_Comm
()
const
{
return
MPI_COMM_SELF
;
}
#endif
operator
No_Comm
()
const
{
return
noComm_
;
}
...
...
This diff is collapsed.
Click to expand it.
dune/alugrid/dgf.hh
+
18
−
8
View file @
7606237c
...
...
@@ -322,19 +322,19 @@ namespace Dune
testfile
.
close
();
return
true
;
}
static
int
rank
(
MPICommunicatorType
MPICOMM
)
static
int
rank
(
MPICommunicatorType
mpiComm
)
{
int
rank
=
0
;
#if HAVE_MPI
MPI_Comm_rank
(
MPICOMM
,
&
rank
);
MPI_Comm_rank
(
mpiComm
,
&
rank
);
#endif
return
rank
;
}
static
int
size
(
MPICommunicatorType
MPICOMM
)
static
int
size
(
MPICommunicatorType
mpiComm
)
{
int
size
=
1
;
#if HAVE_MPI
MPI_Comm_size
(
MPICOMM
,
&
size
);
MPI_Comm_size
(
mpiComm
,
&
size
);
#endif
return
size
;
}
...
...
@@ -355,8 +355,18 @@ namespace Dune
using
BaseType
::
callDirectly
;
public:
explicit
DGFGridFactory
(
std
::
istream
&
input
,
MPICommunicatorType
comm
=
MPIHelper
::
getCommunicator
()
)
:
BaseType
(
comm
)
MPICommunicatorType
mpiComm
)
:
DGFGridFactory
(
input
,
Comm
(
mpiComm
)
)
{}
explicit
DGFGridFactory
(
const
std
::
string
&
filename
,
MPICommunicatorType
mpiComm
)
:
DGFGridFactory
(
filename
,
Comm
(
mpiComm
)
)
{}
DGFGridFactory
(
std
::
istream
&
input
,
Comm
comm
=
Comm
()
)
// casts from and to MPI_Comm
:
BaseType
(
MPICommunicatorType
(
comm
)
)
{
input
.
clear
();
input
.
seekg
(
0
);
...
...
@@ -366,8 +376,8 @@ namespace Dune
}
explicit
DGFGridFactory
(
const
std
::
string
&
filename
,
MPI
Comm
unicatorType
comm
=
MPIHelper
::
getCommunicator
())
:
BaseType
(
comm
)
Comm
comm
=
Comm
()
)
// casts from and to MPI_Comm
:
BaseType
(
MPICommunicatorType
(
comm
)
)
{
std
::
ifstream
input
(
filename
.
c_str
()
);
bool
fileFound
=
input
.
is_open
()
;
...
...
This diff is collapsed.
Click to expand it.
Tobias Leibner
@l_tobi01
mentioned in commit
d46327c0
·
3 years ago
mentioned in commit
d46327c0
mentioned in commit d46327c0575ab6350d60dc7c0de56011cb50fcaf
Toggle commit list
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