42 #ifndef EPETRAEXT_MULTIMPICOMM_H
43 #define EPETRAEXT_MULTIMPICOMM_H
47 #include "Epetra_MpiComm.h"
48 #include "Teuchos_VerboseObject.hpp"
49 #include "Teuchos_RCP.hpp"
68 public Teuchos::VerboseObject<MultiMpiComm> {
82 MultiMpiComm(MPI_Comm globalComm,
int subDomainProcs,
int numTimeSteps_=-1,
83 const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_DEFAULT);
95 const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_DEFAULT);
141 virtual int Broadcast(
double * MyVals,
int Count,
int Root)
const
142 {
return myComm->Broadcast( MyVals, Count, Root); };
143 virtual int Broadcast(
int * MyVals,
int Count,
int Root)
const
144 {
return myComm->Broadcast( MyVals, Count, Root); };
145 virtual int Broadcast(
long * MyVals,
int Count,
int Root)
const
146 {
return myComm->Broadcast( MyVals, Count, Root); };
147 virtual int Broadcast(
long long * MyVals,
int Count,
int Root)
const
148 {
return myComm->Broadcast( MyVals, Count, Root); };
149 virtual int Broadcast(
char * MyVals,
int Count,
int Root)
const
150 {
return myComm->Broadcast( MyVals, Count, Root); };
151 virtual int GatherAll(
double * MyVals,
double * AllVals,
int Count)
const
152 {
return myComm->GatherAll( MyVals, AllVals, Count); };
153 virtual int GatherAll(
int * MyVals,
int * AllVals,
int Count)
const
154 {
return myComm->GatherAll( MyVals, AllVals, Count); };
155 virtual int GatherAll(
long * MyVals,
long * AllVals,
int Count)
const
156 {
return myComm->GatherAll( MyVals, AllVals, Count); };
157 virtual int GatherAll(
long long * MyVals,
long long * AllVals,
int Count)
const
158 {
return myComm->GatherAll( MyVals, AllVals, Count); };
159 virtual int SumAll(
double * PartialSums,
double * GlobalSums,
int Count)
const
160 {
return myComm->SumAll( PartialSums, GlobalSums, Count); };
161 virtual int SumAll(
int * PartialSums,
int * GlobalSums,
int Count)
const
162 {
return myComm->SumAll( PartialSums, GlobalSums, Count); };
163 virtual int SumAll(
long * PartialSums,
long * GlobalSums,
int Count)
const
164 {
return myComm->SumAll( PartialSums, GlobalSums, Count); };
165 virtual int SumAll(
long long * PartialSums,
long long * GlobalSums,
int Count)
const
166 {
return myComm->SumAll( PartialSums, GlobalSums, Count); };
167 virtual int MaxAll(
double * PartialMaxs,
double * GlobalMaxs,
int Count)
const
168 {
return myComm->MaxAll( PartialMaxs, GlobalMaxs, Count); };
169 virtual int MaxAll(
int * PartialMaxs,
int * GlobalMaxs,
int Count)
const
170 {
return myComm->MaxAll( PartialMaxs, GlobalMaxs, Count); };
171 virtual int MaxAll(
long * PartialMaxs,
long * GlobalMaxs,
int Count)
const
172 {
return myComm->MaxAll( PartialMaxs, GlobalMaxs, Count); };
173 virtual int MaxAll(
long long * PartialMaxs,
long long * GlobalMaxs,
int Count)
const
174 {
return myComm->MaxAll( PartialMaxs, GlobalMaxs, Count); };
175 virtual int MinAll(
double * PartialMins,
double * GlobalMins,
int Count)
const
176 {
return myComm->MinAll( PartialMins, GlobalMins, Count); };
177 virtual int MinAll(
int * PartialMins,
int * GlobalMins,
int Count)
const
178 {
return myComm->MinAll( PartialMins, GlobalMins, Count); };
179 virtual int MinAll(
long * PartialMins,
long * GlobalMins,
int Count)
const
180 {
return myComm->MinAll( PartialMins, GlobalMins, Count); };
181 virtual int MinAll(
long long * PartialMins,
long long * GlobalMins,
int Count)
const
182 {
return myComm->MinAll( PartialMins, GlobalMins, Count); };
183 virtual int ScanSum(
double * MyVals,
double * ScanSums,
int Count)
const
184 {
return myComm->ScanSum( MyVals, ScanSums, Count); };
185 virtual int ScanSum(
int * MyVals,
int * ScanSums,
int Count)
const
186 {
return myComm->ScanSum(MyVals, ScanSums, Count); };
187 virtual int ScanSum(
long * MyVals,
long * ScanSums,
int Count)
const
188 {
return myComm->ScanSum(MyVals, ScanSums, Count); };
189 virtual int ScanSum(
long long * MyVals,
long long * ScanSums,
int Count)
const
190 {
return myComm->ScanSum(MyVals, ScanSums, Count); };
195 {
return myComm->CreateDirectory(Map); };
200 Teuchos::RCP<Epetra_Comm>
myComm;
virtual int SumAll(long long *PartialSums, long long *GlobalSums, int Count) const
virtual int SumAll(double *PartialSums, double *GlobalSums, int Count) const
virtual int NumTimeDomains() const
Return number of time domains that the global problem is split into.
int firstTimeStepOnDomain
virtual int SubDomainRank() const
Return integer [0:numSubDomains-1} corresponding to this sub-domain's rank.
virtual int NumSubDomains() const
Return number of sub-domains that the global problem is split into.
virtual int SumAll(long *PartialSums, long *GlobalSums, int Count) const
virtual int GatherAll(int *MyVals, int *AllVals, int Count) const
virtual int FirstTimeStepOnDomain() const
virtual int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const
virtual int NumProc() const
virtual int Broadcast(double *MyVals, int Count, int Root) const
virtual void Barrier() const
virtual int Broadcast(long long *MyVals, int Count, int Root) const
virtual int MyPID() const
virtual Epetra_Comm & SubDomainComm() const
Get reference to split Communicator for sub-domain.
virtual Epetra_Directory * CreateDirectory(const Epetra_BlockMap &Map) const
virtual int MaxAll(long *PartialMaxs, long *GlobalMaxs, int Count) const
virtual int Broadcast(int *MyVals, int Count, int Root) const
virtual int MinAll(double *PartialMins, double *GlobalMins, int Count) const
virtual int NumTimeStepsOnDomain() const
Return number of time steps, first step number, on time domain.
virtual int SumAll(int *PartialSums, int *GlobalSums, int Count) const
void ResetNumTimeSteps(int numTimeSteps)
Reset total number of time steps, allowing time steps per domain to.
virtual Epetra_Comm & TimeDomainComm() const
Get reference to split Communicator for time domain.
virtual int Broadcast(long *MyVals, int Count, int Root) const
Epetra_MpiComm & TimeDomainMpiComm() const
Get reference to split MPI Communicator for time domain.
virtual int ScanSum(int *MyVals, int *ScanSums, int Count) const
virtual int GatherAll(long *MyVals, long *AllVals, int Count) const
Epetra_MpiComm * timeComm
Teuchos::RCP< Epetra_Comm > myComm
MultiMpiComm(MPI_Comm globalComm, int subDomainProcs, int numTimeSteps_=-1, const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_DEFAULT)
MultiMpiComm constuctor.
virtual int NumTimeSteps() const
Return total number of time steps.
virtual void PrintInfo(std::ostream &os) const
virtual int MinAll(long long *PartialMins, long long *GlobalMins, int Count) const
virtual Epetra_Comm * Clone() const
Epetra_MpiComm & SubDomainMpiComm() const
Get reference to split MPI Communicator for sub-domain.
virtual int GatherAll(long long *MyVals, long long *AllVals, int Count) const
virtual int MaxAll(int *PartialMaxs, int *GlobalMaxs, int Count) const
virtual int TimeDomainRank() const
Return integer [0:numTimeDomains-1} corresponding to this time-domain's rank.
virtual int MinAll(long *PartialMins, long *GlobalMins, int Count) const
virtual ~MultiMpiComm()
Destructor.
virtual int MinAll(int *PartialMins, int *GlobalMins, int Count) const
virtual int ScanSum(double *MyVals, double *ScanSums, int Count) const
virtual int Broadcast(char *MyVals, int Count, int Root) const
virtual int MaxAll(long long *PartialMaxs, long long *GlobalMaxs, int Count) const
virtual int ScanSum(long *MyVals, long *ScanSums, int Count) const
virtual int GatherAll(double *MyVals, double *AllVals, int Count) const
virtual Epetra_Distributor * CreateDistributor() const
virtual int ScanSum(long long *MyVals, long long *ScanSums, int Count) const