Skip to content
Snippets Groups Projects
Commit db0e048d authored by Markus Blatt's avatar Markus Blatt
Browse files

Use a named enum to prevent ambiguities with MPICH.

[[Imported from SVN: r1445]]
parent 1e3c9c14
No related branches found
No related tags found
No related merge requests found
......@@ -275,7 +275,7 @@ namespace Dune {
* @brief Set right Solver Category (default is overlapping).
*/
void setSolverCategory (int set) {
void setSolverCategory (SolverCategory set) {
category = set;
}
......@@ -284,7 +284,7 @@ namespace Dune {
* @return The Solver Category.
*/
const int getSolverCategory () const {
const SolverCategory getSolverCategory () const {
return category;
}
......@@ -522,7 +522,7 @@ namespace Dune {
* later on.
* @param comm_ The MPI Communicator to use, e. g. MPI_COMM_WORLD
*/
OwnerOverlapCopyCommunication (MPI_Comm comm_, int cat = Dune::SolverCategory::overlapping)
OwnerOverlapCopyCommunication (MPI_Comm comm_, SolverCategory::Category cat = SolverCategory::overlapping)
: cc(comm_), pis(), ri(pis,pis,comm_),
OwnerToAllInterfaceBuilt(false), OwnerOverlapToAllInterfaceBuilt(false),
OwnerCopyToAllInterfaceBuilt(false), OwnerCopyToOwnerCopyInterfaceBuilt(false),
......@@ -535,7 +535,7 @@ namespace Dune {
* The local index set and the remote indices have to be set up
* later on.
*/
OwnerOverlapCopyCommunication (int cat = Dune::SolverCategory::overlapping)
OwnerOverlapCopyCommunication (SolverCategory::Category cat = SolverCategory::overlapping)
: cc(MPI_COMM_WORLD), pis(), ri(pis,pis,MPI_COMM_WORLD),
OwnerToAllInterfaceBuilt(false), OwnerOverlapToAllInterfaceBuilt(false),
OwnerCopyToAllInterfaceBuilt(false), OwnerCopyToOwnerCopyInterfaceBuilt(false),
......@@ -547,7 +547,7 @@ namespace Dune {
* @param indexinfo The set of IndexTripels describing the local and remote indices.
* @param comm_ The communicator to use in the communication.
*/
OwnerOverlapCopyCommunication (const IndexInfoFromGrid<GlobalIdType, LocalIdType>& indexinfo, MPI_Comm comm_, int cat = Dune::SolverCategory::overlapping)
OwnerOverlapCopyCommunication (const IndexInfoFromGrid<GlobalIdType, LocalIdType>& indexinfo, MPI_Comm comm_, SolverCategory::Category cat = SolverCategory::overlapping)
: cc(comm_), OwnerToAllInterfaceBuilt(false), OwnerOverlapToAllInterfaceBuilt(false),
OwnerCopyToAllInterfaceBuilt(false), OwnerCopyToOwnerCopyInterfaceBuilt(false),
globalLookup_(0), category(cat)
......@@ -634,7 +634,7 @@ namespace Dune {
mutable std::vector<double> mask;
int oldseqNo;
GlobalLookupIndexSet* globalLookup_;
int category;
SolverCategory::Category category;
};
#endif
......
......@@ -17,7 +17,7 @@ namespace Dune {
*/
struct SolverCategory
{
enum {
enum Category {
//! \brief Category for sequential solvers.
sequential,
//! \brief Category for on overlapping solvers.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment