42 #ifndef EPETRAEXT_MULTIMPICOMM_H
43 #define EPETRAEXT_MULTIMPICOMM_H
45 #if defined(EpetraExt_SHOW_DEPRECATED_WARNINGS)
47 #warning "The EpetraExt package is deprecated"
53 #include "Epetra_MpiComm.h"
54 #include "Teuchos_VerboseObject.hpp"
55 #include "Teuchos_RCP.hpp"
74 public Teuchos::VerboseObject<MultiMpiComm> {
88 MultiMpiComm(MPI_Comm globalComm,
int subDomainProcs,
int numTimeSteps_=-1,
89 const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_DEFAULT);
101 const Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_DEFAULT);
147 virtual int Broadcast(
double * MyVals,
int Count,
int Root)
const
148 {
return myComm->Broadcast( MyVals, Count, Root); };
149 virtual int Broadcast(
int * MyVals,
int Count,
int Root)
const
150 {
return myComm->Broadcast( MyVals, Count, Root); };
151 virtual int Broadcast(
long * MyVals,
int Count,
int Root)
const
152 {
return myComm->Broadcast( MyVals, Count, Root); };
153 virtual int Broadcast(
long long * MyVals,
int Count,
int Root)
const
154 {
return myComm->Broadcast( MyVals, Count, Root); };
155 virtual int Broadcast(
char * MyVals,
int Count,
int Root)
const
156 {
return myComm->Broadcast( MyVals, Count, Root); };
157 virtual int GatherAll(
double * MyVals,
double * AllVals,
int Count)
const
158 {
return myComm->GatherAll( MyVals, AllVals, Count); };
159 virtual int GatherAll(
int * MyVals,
int * AllVals,
int Count)
const
160 {
return myComm->GatherAll( MyVals, AllVals, Count); };
161 virtual int GatherAll(
long * MyVals,
long * AllVals,
int Count)
const
162 {
return myComm->GatherAll( MyVals, AllVals, Count); };
163 virtual int GatherAll(
long long * MyVals,
long long * AllVals,
int Count)
const
164 {
return myComm->GatherAll( MyVals, AllVals, Count); };
165 virtual int SumAll(
double * PartialSums,
double * GlobalSums,
int Count)
const
166 {
return myComm->SumAll( PartialSums, GlobalSums, Count); };
167 virtual int SumAll(
int * PartialSums,
int * GlobalSums,
int Count)
const
168 {
return myComm->SumAll( PartialSums, GlobalSums, Count); };
169 virtual int SumAll(
long * PartialSums,
long * GlobalSums,
int Count)
const
170 {
return myComm->SumAll( PartialSums, GlobalSums, Count); };
171 virtual int SumAll(
long long * PartialSums,
long long * GlobalSums,
int Count)
const
172 {
return myComm->SumAll( PartialSums, GlobalSums, Count); };
173 virtual int MaxAll(
double * PartialMaxs,
double * GlobalMaxs,
int Count)
const
174 {
return myComm->MaxAll( PartialMaxs, GlobalMaxs, Count); };
175 virtual int MaxAll(
int * PartialMaxs,
int * GlobalMaxs,
int Count)
const
176 {
return myComm->MaxAll( PartialMaxs, GlobalMaxs, Count); };
177 virtual int MaxAll(
long * PartialMaxs,
long * GlobalMaxs,
int Count)
const
178 {
return myComm->MaxAll( PartialMaxs, GlobalMaxs, Count); };
179 virtual int MaxAll(
long long * PartialMaxs,
long long * GlobalMaxs,
int Count)
const
180 {
return myComm->MaxAll( PartialMaxs, GlobalMaxs, Count); };
181 virtual int MinAll(
double * PartialMins,
double * GlobalMins,
int Count)
const
182 {
return myComm->MinAll( PartialMins, GlobalMins, Count); };
183 virtual int MinAll(
int * PartialMins,
int * GlobalMins,
int Count)
const
184 {
return myComm->MinAll( PartialMins, GlobalMins, Count); };
185 virtual int MinAll(
long * PartialMins,
long * GlobalMins,
int Count)
const
186 {
return myComm->MinAll( PartialMins, GlobalMins, Count); };
187 virtual int MinAll(
long long * PartialMins,
long long * GlobalMins,
int Count)
const
188 {
return myComm->MinAll( PartialMins, GlobalMins, Count); };
189 virtual int ScanSum(
double * MyVals,
double * ScanSums,
int Count)
const
190 {
return myComm->ScanSum( MyVals, ScanSums, Count); };
191 virtual int ScanSum(
int * MyVals,
int * ScanSums,
int Count)
const
192 {
return myComm->ScanSum(MyVals, ScanSums, Count); };
193 virtual int ScanSum(
long * MyVals,
long * ScanSums,
int Count)
const
194 {
return myComm->ScanSum(MyVals, ScanSums, Count); };
195 virtual int ScanSum(
long long * MyVals,
long long * ScanSums,
int Count)
const
196 {
return myComm->ScanSum(MyVals, ScanSums, Count); };
201 {
return myComm->CreateDirectory(Map); };
206 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