Skip to content
Snippets Groups Projects
Commit 2f717df4 authored by Rebecca Neumann's avatar Rebecca Neumann
Browse files

adapt construction method for the sequential case, add getSolverCategory Method

[[Imported from SVN: r1430]]
parent 2c75608a
No related branches found
No related tags found
No related merge requests found
...@@ -102,6 +102,7 @@ namespace Dune ...@@ -102,6 +102,7 @@ namespace Dune
C* comm_; C* comm_;
}; };
#if HAVE_MPI
struct OwnerOverlapCopyCommunicationArgs struct OwnerOverlapCopyCommunicationArgs
{ {
OwnerOverlapCopyCommunicationArgs(MPI_Comm comm, int cat) OwnerOverlapCopyCommunicationArgs(MPI_Comm comm, int cat)
...@@ -111,6 +112,16 @@ namespace Dune ...@@ -111,6 +112,16 @@ namespace Dune
MPI_Comm comm_; MPI_Comm comm_;
int cat_; int cat_;
}; };
#endif
struct SequentialCommunicationArgs
{
SequentialCommunicationArgs(CollectiveCommunication<void*> comm, int cat)
: comm_(comm)
{}
CollectiveCommunication<void*> comm_;
};
} // end Amg namspace } // end Amg namspace
...@@ -188,11 +199,11 @@ namespace Dune ...@@ -188,11 +199,11 @@ namespace Dune
class ConstructionTraits<SequentialInformation> class ConstructionTraits<SequentialInformation>
{ {
public: public:
typedef const CollectiveCommunication<void*> Arguments; //typedef const CollectiveCommunication<void*> Arguments;
typedef const SequentialCommunicationArgs Arguments;
static inline SequentialInformation* construct(Arguments& args) static inline SequentialInformation* construct(Arguments& args)
{ {
return new SequentialInformation(args); return new SequentialInformation(args.comm_);
} }
static inline void deconstruct(SequentialInformation* si) static inline void deconstruct(SequentialInformation* si)
......
...@@ -34,6 +34,10 @@ namespace Dune ...@@ -34,6 +34,10 @@ namespace Dune
category = SolverCategory::sequential category = SolverCategory::sequential
}; };
const int getSolverCategory () const {
return SolverCategory::sequential;
}
MPICommunicator communicator() const MPICommunicator communicator() const
{ {
return comm_; return comm_;
......
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