65 MyLength_(map.NumMyPoints()),
66 GlobalLength_(map.NumGlobalPoints64()),
67 NumVectors_(numVectors),
68 UserAllocated_(false),
69 ConstantStride_(true),
70 Stride_(map.NumMyPoints()),
90 MyLength_(Source.MyLength_),
91 GlobalLength_(Source.GlobalLength_),
92 NumVectors_(Source.NumVectors_),
93 UserAllocated_(false),
94 ConstantStride_(true),
101 int ** Source_Pointers = Source.
Pointers();
112 int *
A,
int MyLDA,
int numVectors)
117 MyLength_(map.NumMyPoints()),
118 GlobalLength_(map.NumGlobalPoints64()),
119 NumVectors_(numVectors),
120 UserAllocated_(false),
121 ConstantStride_(true),
122 Stride_(map.NumMyPoints()),
142 int **ArrayOfPointers,
int numVectors)
147 MyLength_(map.NumMyPoints()),
148 GlobalLength_(map.NumGlobalPoints64()),
149 NumVectors_(numVectors),
150 UserAllocated_(false),
151 ConstantStride_(true),
152 Stride_(map.NumMyPoints()),
173 int *Indices,
int numVectors)
178 MyLength_(Source.MyLength_),
179 GlobalLength_(Source.GlobalLength_),
180 NumVectors_(numVectors),
181 UserAllocated_(false),
182 ConstantStride_(true),
191 int ** Source_Pointers = Source.
Pointers();
204 int StartIndex,
int numVectors)
209 MyLength_(Source.MyLength_),
210 GlobalLength_(Source.GlobalLength_),
211 NumVectors_(numVectors),
212 UserAllocated_(false),
213 ConstantStride_(true),
222 int ** Source_Pointers = Source.
Pointers();
263 int randval = rand();
267 int locrandval = randval;
295 #ifdef EPETRA_HAVE_OMP
296 #pragma omp parallel for default(none) shared(to,from)
297 for (
int j=0; j<myLength; j++) to[j] = from[j];
299 memcpy(to, from, myLength*
sizeof(
int));
317 int randval = rand();
321 int locrandval = randval;
362 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
366 EPETRA_CHK_ERR(ChangeGlobalValue<int>(GlobalRow, 0, VectorIndex, OrdinalValue,
false));
371 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
375 EPETRA_CHK_ERR(ChangeGlobalValue<long long>(GlobalRow, 0, VectorIndex, OrdinalValue,
false));
380 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
382 int VectorIndex,
int OrdinalValue) {
384 EPETRA_CHK_ERR(ChangeGlobalValue<int>(GlobalBlockRow, BlockRowOffset, VectorIndex, OrdinalValue,
false));
389 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
391 int VectorIndex,
int OrdinalValue) {
393 EPETRA_CHK_ERR(ChangeGlobalValue<long long>(GlobalBlockRow, BlockRowOffset, VectorIndex, OrdinalValue,
false));
398 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
402 EPETRA_CHK_ERR(ChangeGlobalValue<int>(GlobalRow, 0, VectorIndex, OrdinalValue,
true));
407 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
411 EPETRA_CHK_ERR(ChangeGlobalValue<long long>(GlobalRow, 0, VectorIndex, OrdinalValue,
true));
416 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
418 int VectorIndex,
int OrdinalValue) {
420 EPETRA_CHK_ERR(ChangeGlobalValue<int>(GlobalBlockRow, BlockRowOffset, VectorIndex, OrdinalValue,
true));
425 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
427 int VectorIndex,
int OrdinalValue) {
429 EPETRA_CHK_ERR(ChangeGlobalValue<long long>(GlobalBlockRow, BlockRowOffset, VectorIndex, OrdinalValue,
true));
442 int VectorIndex,
int OrdinalValue) {
455 int VectorIndex,
int OrdinalValue) {
461 template<
typename int_type>
463 int VectorIndex,
int OrdinalValue,
bool SumInto) {
465 if(!
Map().
template GlobalIndicesIsType<int_type>())
466 throw ReportError(
"Epetra_IntMultiVector::ChangeGlobalValues mismatch between argument types (int/long long) and map type.", -1);
474 int VectorIndex,
int OrdinalValue,
bool SumInto) {
478 if (BlockRowOffset<0 || BlockRowOffset>=
Map().ElementSize(MyBlockRow))
EPETRA_CHK_ERR(-2);
483 Pointers_[VectorIndex][entry+BlockRowOffset] += OrdinalValue;
485 Pointers_[VectorIndex][entry+BlockRowOffset] = OrdinalValue;
501 int * to = A + i*MyLDA;
502 for (
int j=0; j<myLength; j++) *to++ = *from++;
534 int * to = ArrayOfPointers[i];
535 memcpy(to, from, myLength*
sizeof(
int));
575 #ifdef EPETRA_HAVE_OMP
576 #pragma omp parallel for default(none) shared(ScalarConstant)
578 for (
int j=0; j<myLength; j++) to[j] = ScalarConstant;
596 int *PermuteFromLIDs,
608 int * ToFirstPointInElementList = 0;
609 int * FromFirstPointInElementList = 0;
610 int * FromElementSizeList = 0;
614 if (!ConstantElementSize) {
627 if (MaxElementSize==1) {
629 NumSameEntries = NumSameIDs;
631 else if (ConstantElementSize) {
633 NumSameEntries = NumSameIDs * MaxElementSize;
637 NumSameEntries = FromFirstPointInElementList[NumSameIDs];
641 if (To==From) NumSameEntries = 0;
646 for (
int i=0; i < numVectors; i++) {
647 if (CombineMode==
Epetra_AddLocalAlso)
for (
int j=0; j<NumSameEntries; j++) To[i][j] += From[i][j];
648 else for (
int j=0; j<NumSameEntries; j++) To[i][j] = From[i][j];
652 if (NumPermuteIDs>0) {
658 if (CombineMode==
Epetra_AddLocalAlso)
for (
int j=0; j<NumPermuteIDs; j++) To[0][PermuteToLIDs[j]] += From[0][PermuteFromLIDs[j]];
659 else for (
int j=0; j<NumPermuteIDs; j++) To[0][PermuteToLIDs[j]] = From[0][PermuteFromLIDs[j]];
662 for (
int j=0; j<NumPermuteIDs; j++) {
663 jj = PermuteToLIDs[j];
664 jjj = PermuteFromLIDs[j];
665 if (CombineMode==
Epetra_AddLocalAlso)
for (
int i=0; i<numVectors; i++) To[i][jj] += From[i][jjj];
666 else for (
int i=0; i<numVectors; i++) To[i][jj] = From[i][jjj];
673 for (
int j=0; j<NumPermuteIDs; j++) {
674 jj = MaxElementSize*PermuteToLIDs[j];
675 jjj = MaxElementSize*PermuteFromLIDs[j];
676 if (CombineMode==
Epetra_AddLocalAlso)
for (
int i=0; i<numVectors; i++)
for (k=0; k<MaxElementSize; k++) To[i][jj+k] += From[i][jjj+k];
677 else for(
int i=0; i<numVectors; i++)
for (k=0; k<MaxElementSize; k++) To[i][jj+k] = From[i][jjj+k];
684 for (
int j=0; j<NumPermuteIDs; j++) {
685 jj = ToFirstPointInElementList[PermuteToLIDs[j]];
686 jjj = FromFirstPointInElementList[PermuteFromLIDs[j]];
687 int ElementSize = FromElementSizeList[PermuteFromLIDs[j]];
688 if (CombineMode==
Epetra_AddLocalAlso)
for (
int i=0; i<numVectors; i++)
for (k=0; k<ElementSize; k++) To[i][jj+k] += From[i][jjj+k];
689 else for (
int i=0; i<numVectors; i++)
for (k=0; k<ElementSize; k++) To[i][jj+k] = From[i][jjj+k];
719 int * FromFirstPointInElementList = 0;
720 int * FromElementSizeList = 0;
722 if (!ConstantElementSize) {
727 int * OrdinalExports = 0;
729 SizeOfPacket = numVectors*MaxElementSize*(int)
sizeof(
int);
731 if(SizeOfPacket*NumExportIDs>LenExports) {
732 if (LenExports>0)
delete [] Exports;
733 LenExports = SizeOfPacket*NumExportIDs;
734 OrdinalExports =
new int[numVectors*MaxElementSize*NumExportIDs];
735 Exports = (
char *) OrdinalExports;
740 if (NumExportIDs>0) {
741 ptr = (
int *) Exports;
744 if (MaxElementSize==1) {
747 for (
int j=0; j<NumExportIDs; j++)
748 *ptr++ = From[0][ExportLIDs[j]];
751 for (
int j=0; j<NumExportIDs; j++) {
753 for (
int i=0; i<numVectors; i++)
754 *ptr++ = From[i][jj];
760 else if (ConstantElementSize) {
762 for (
int j=0; j<NumExportIDs; j++) {
763 jj = MaxElementSize*ExportLIDs[j];
764 for (
int i=0; i<numVectors; i++)
765 for (k=0; k<MaxElementSize; k++)
766 *ptr++ = From[i][jj+k];
773 int thisSizeOfPacket = numVectors*MaxElementSize;
774 for (
int j=0; j<NumExportIDs; j++) {
775 ptr = (
int *) Exports + j*thisSizeOfPacket;
776 jj = FromFirstPointInElementList[ExportLIDs[j]];
777 int ElementSize = FromElementSizeList[ExportLIDs[j]];
778 for (
int i=0; i<numVectors; i++)
779 for (k=0; k<ElementSize; k++)
780 *ptr++ = From[i][jj+k];
806 if( CombineMode !=
Add
807 && CombineMode !=
Zero
814 && CombineMode !=
AbsMax )
817 if (NumImportIDs<=0)
return(0);
824 int * ToFirstPointInElementList = 0;
825 int * ToElementSizeList = 0;
827 if (!ConstantElementSize) {
835 ptr = (
int *) Imports;
838 if (MaxElementSize==1) {
841 if (CombineMode==
InsertAdd)
for (
int j=0; j<NumImportIDs; j++) To[0][ImportLIDs[j]] = 0.0;
842 if (CombineMode==
Add || CombineMode==
InsertAdd)
for (
int j=0; j<NumImportIDs; j++) To[0][ImportLIDs[j]] += *ptr++;
843 else if(CombineMode==
Insert)
for (
int j=0; j<NumImportIDs; j++) To[0][ImportLIDs[j]] = *ptr++;
844 else if(CombineMode==
AbsMax)
for (
int j=0; j<NumImportIDs; j++) {To[0][ImportLIDs[j]] =
EPETRA_MAX( To[0][ImportLIDs[j]],std::abs(*ptr)); ptr++;}
845 else if(CombineMode==
AbsMin)
for (
int j=0; j<NumImportIDs; j++) {To[0][ImportLIDs[j]] =
EPETRA_MIN( To[0][ImportLIDs[j]],std::abs(*ptr)); ptr++;}
846 else if(CombineMode==
Epetra_Max)
for (
int j=0; j<NumImportIDs; j++) {To[0][ImportLIDs[j]] =
EPETRA_MAX( To[0][ImportLIDs[j]],*ptr); ptr++;}
847 else if(CombineMode==
Epetra_Min)
for (
int j=0; j<NumImportIDs; j++) {To[0][ImportLIDs[j]] =
EPETRA_MIN( To[0][ImportLIDs[j]],*ptr); ptr++;}
848 else if(CombineMode==
Average)
for (
int j=0; j<NumImportIDs; j++) {To[0][ImportLIDs[j]] += *ptr++; To[0][ImportLIDs[j]] *= 0.5;}
874 for (
int j=0; j<NumImportIDs; j++) {
876 for (
int i=0; i<numVectors; i++) {
877 if (CombineMode==
InsertAdd) To[i][jj] = 0.0;
878 if (CombineMode==
Add || CombineMode==
InsertAdd) To[i][jj] += *ptr++;
879 else if (CombineMode==
Insert) To[i][jj] = *ptr++;
880 else if (CombineMode==
AbsMax) {To[i][jj] =
EPETRA_MAX( To[i][jj], std::abs(*ptr)); ptr++; }
881 else if (CombineMode==
AbsMin) {To[i][jj] =
EPETRA_MIN( To[i][jj], std::abs(*ptr)); ptr++; }
884 else if (CombineMode==
Average){To[i][jj] += *ptr++; To[i][jj] *= 0.5;}}
938 else if (ConstantElementSize) {
940 for (
int j=0; j<NumImportIDs; j++) {
941 jj = MaxElementSize*ImportLIDs[j];
942 for (
int i=0; i<numVectors; i++) {
943 if (CombineMode==
InsertAdd)
for (k=0; k<MaxElementSize; k++) To[i][jj+k] = 0.0;
944 if (CombineMode==
Add || CombineMode==
InsertAdd)
for (k=0; k<MaxElementSize; k++) To[i][jj+k] += *ptr++;
945 else if (CombineMode==
Insert)
for (k=0; k<MaxElementSize; k++) To[i][jj+k] = *ptr++;
946 else if (CombineMode==
AbsMax) {
for (k=0; k<MaxElementSize; k++) { To[i][jj+k] =
EPETRA_MAX( To[i][jj+k], std::abs(*ptr)); ptr++; }}
947 else if (CombineMode==
AbsMin) {
for (k=0; k<MaxElementSize; k++) { To[i][jj+k] =
EPETRA_MIN( To[i][jj+k], std::abs(*ptr)); ptr++; }}
948 else if (CombineMode==
Epetra_Max) {
for (k=0; k<MaxElementSize; k++) { To[i][jj+k] =
EPETRA_MAX( To[i][jj+k], *ptr); ptr++; }}
949 else if (CombineMode==
Epetra_Min) {
for (k=0; k<MaxElementSize; k++) { To[i][jj+k] =
EPETRA_MIN( To[i][jj+k], *ptr); ptr++; }}
950 else if (CombineMode==
Average) {
for (k=0; k<MaxElementSize; k++) { To[i][jj+k] += *ptr++; To[i][jj+k] *= 0.5;}}
1010 int thisSizeOfPacket = numVectors*MaxElementSize;
1012 for (
int j=0; j<NumImportIDs; j++) {
1013 ptr = (
int *) Imports + j*thisSizeOfPacket;
1014 jj = ToFirstPointInElementList[ImportLIDs[j]];
1015 int ElementSize = ToElementSizeList[ImportLIDs[j]];
1016 for (
int i=0; i<numVectors; i++) {
1017 if (CombineMode==
InsertAdd)
for (k=0; k<ElementSize; k++) To[i][jj+k] = 0.0;
1018 if (CombineMode==
Add || CombineMode==
InsertAdd)
for (k=0; k<ElementSize; k++) To[i][jj+k] += *ptr++;
1019 else if (CombineMode==
Insert)
for (k=0; k<ElementSize; k++) To[i][jj+k] = *ptr++;
1020 else if (CombineMode==
AbsMax) {
for (k=0; k<ElementSize; k++) { To[i][jj+k] =
EPETRA_MAX( To[i][jj+k], std::abs(*ptr)); ptr++; }}
1021 else if (CombineMode==
Epetra_Max) {
for (k=0; k<ElementSize; k++) { To[i][jj+k] =
EPETRA_MAX( To[i][jj+k], *ptr); ptr++; }}
1022 else if (CombineMode==
Epetra_Min) {
for (k=0; k<ElementSize; k++) { To[i][jj+k] =
EPETRA_MIN( To[i][jj+k], *ptr); ptr++; }}
1023 else if (CombineMode==
Average) {
for (k=0; k<ElementSize; k++) { To[i][jj+k] += *ptr++; To[i][jj+k] *= 0.5;}}
1108 int MinVal = 2000000000;
1109 if (myLength>0) MinVal = from[0];
1110 #ifdef EPETRA_HAVE_OMP
1111 #pragma omp parallel default(none) shared(MinVal)
1113 int localMinVal = MinVal;
1115 for (
int j=0; j< myLength; j++) localMinVal =
EPETRA_MIN(localMinVal,from[j]);
1116 #pragma omp critical
1123 for (
int j=0; j< myLength; j++) MinVal =
EPETRA_MIN(MinVal,from[j]);
1156 if (!epetrampicomm) {
1160 MPI_Comm mpicomm = epetrampicomm->
GetMpiComm();
1161 int numProcs = epetrampicomm->
NumProc();
1162 int* owork =
new int[numProcs*(NumVectors_+1)];
1165 owork, NumVectors_+1, MPI_INT, mpicomm);
1171 bool overwrite = myLength == 0 ?
true :
false;
1173 int myPID = epetrampicomm->
MyPID();
1174 int* owork_ptr = owork;
1176 for(
int j=0; j<numProcs; ++j) {
1180 if (j == myPID || owork_ptr[NumVectors_] == 0) {
1181 owork_ptr += NumVectors_+1;
1186 int val = owork_ptr[i];
1190 if (overwrite || (Result[i] > val)) Result[i] = val;
1195 if (overwrite) overwrite =
false;
1197 owork_ptr += NumVectors_+1;
1221 int MaxVal = -2000000000;
1222 if (myLength>0) MaxVal = from[0];
1223 #ifdef EPETRA_HAVE_OMP
1224 #pragma omp parallel default(none) shared(MaxVal)
1226 int localMaxVal = MaxVal;
1228 for (
int j=0; j< myLength; j++) localMaxVal =
EPETRA_MAX(localMaxVal,from[j]);
1229 #pragma omp critical
1236 for (
int j=0; j< myLength; j++) MaxVal =
EPETRA_MAX(MaxVal,from[j]);
1269 if (!epetrampicomm) {
1273 MPI_Comm mpicomm = epetrampicomm->
GetMpiComm();
1274 int numProcs = epetrampicomm->
NumProc();
1275 int* owork =
new int[numProcs*(NumVectors_+1)];
1278 owork, NumVectors_+1, MPI_INT, mpicomm);
1284 bool overwrite = myLength == 0 ?
true :
false;
1286 int myPID = epetrampicomm->
MyPID();
1287 int* owork_ptr = owork;
1289 for(
int j=0; j<numProcs; ++j) {
1293 if (j == myPID || owork_ptr[NumVectors_] == 0) {
1294 owork_ptr += NumVectors_+1;
1299 int val = owork_ptr[i];
1303 if (overwrite || (Result[i] < val)) Result[i] = val;
1308 if (overwrite) overwrite =
false;
1310 owork_ptr += NumVectors_+1;
1359 if (
this != &Source)
Assign(Source);
1372 throw ReportError(
"Length of MultiVectors incompatible in Assign. The this MultiVector has MyLength = " +
toString(myLength)
1378 const int *
const from = A_Pointers[i];
1379 #ifdef EPETRA_HAVE_OMP
1380 #pragma omp parallel for default(none)
1382 for (
int j=0; j<myLength; j++) to[j] = from[j];
1393 if (myLength>0) source =
new int[myLength*
NumVectors_];
1401 int * tmp1 = source;
1404 for (
int j=0; j< myLength; j++) *tmp1++ = *tmp2++;
1406 if (myLength>0) target =
new int[myLength*
NumVectors_];
1410 if (myLength>0)
delete [] source;
1412 int * tmp2 = target;
1415 for (
int j=0; j< myLength; j++) *tmp1++ = *tmp2++;
1417 if (myLength>0)
delete [] target;
1441 for (
int iproc=0; iproc < NumProc; iproc++) {
1444 int NumMyElements1 =
Map(). NumMyElements();
1446 int * FirstPointInElementList1 = NULL;
1452 os <<
" MyPID"; os <<
" ";
1454 if (MaxElementSize1==1)
1458 for (
int j = 0; j < NumVectors1 ; j++)
1465 for (
int i=0; i < NumMyElements1; i++) {
1469 os << MyPID; os <<
" ";
1471 if (MaxElementSize1==1) {
1472 if(
Map().GlobalIndicesInt())
1474 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1476 os << MyGlobalElements1[i] <<
" ";
1478 throw ReportError(
"Epetra_IntMultiVector::Print: ERROR, GlobalIndicesInt but no API for it.",-1);
1481 else if(
Map().GlobalIndicesLongLong())
1483 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1485 os << MyGlobalElements1[i] <<
" ";
1487 throw ReportError(
"Epetra_IntMultiVector::Print: ERROR, GlobalIndicesLongLong but no API for it.",-1);
1491 throw ReportError(
"Epetra_IntMultiVector::Print ERROR, Don't know map global index type.",-1);
1496 if(
Map().GlobalIndicesInt())
1498 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
1500 os << MyGlobalElements1[i]<<
"/" << ii <<
" ";
1502 throw ReportError(
"Epetra_IntMultiVector::Print: ERROR, GlobalIndicesInt but no API for it.",-1);
1505 else if(
Map().GlobalIndicesLongLong())
1507 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
1509 os << MyGlobalElements1[i]<<
"/" << ii <<
" ";
1511 throw ReportError(
"Epetra_IntMultiVector::Print: ERROR, GlobalIndicesLongLong but no API for it.",-1);
1515 throw ReportError(
"Epetra_IntMultiVector::Print ERROR, Don't know map global index type.",-1);
1517 iii = FirstPointInElementList1[i]+ii;
1519 for (
int j = 0; j < NumVectors1 ; j++)
1522 os << A_Pointers[j][iii];
void UpdateIntVectors() const
int ** Pointers() const
Get pointer to individual vector pointers.
Epetra_IntVector *& operator()(int i)
Vector access function.
int * FirstPointInElementList() const
Pointer to internal array containing a mapping between the local elements and the first local point n...
bool DistributedGlobal() const
Returns true if this multi-vector is distributed global, i.e., not local replicated.
int PutScalar(int OrdinalConstant)
Initialize all values in a multi-vector with constant value.
int CopyAndPermute(const Epetra_SrcDistObject &Source, int NumSameIDs, int NumPermuteIDs, int *PermuteToLIDs, int *PermuteFromLIDs, const Epetra_OffsetIndex *Indexor, Epetra_CombineMode CombineMode=Zero)
Perform ID copies and permutations that are on processor.
int ElementSize() const
Returns the size of elements in the map; only valid if map has constant element size.
MPI_Comm GetMpiComm() const
Get the MPI Communicator (identical to Comm() method; used when we know we are MPI.
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
Epetra_OffsetIndex: This class builds index for efficient mapping of data from one Epetra_CrsGraph ba...
Epetra_IntVector: A class for constructing and using dense integer vectors on a parallel computer...
int MyGlobalElements(int *MyGlobalElementList) const
Puts list of global elements on this processor into the user-provided array.
int MyLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
int MinValue(int *Result) const
Compute minimum value of each vector in multi-vector.
int NumProc() const
Returns total number of processes.
bool ConstantElementSize() const
Returns true if map has constant element size.
#define EPETRA_CHK_ERR(a)
int ExtractCopy(int *A, int MyLDA) const
Put multi-vector values into user-provided two-dimensional array.
Epetra_IntMultiVector(const Epetra_BlockMap &Map, int NumVectors, bool zeroOut=true)
Basic Epetra_IntMultiVector constuctor.
int * ElementSizeList() const
List of the element sizes corresponding to the array MyGlobalElements().
Epetra_IntMultiVector & operator=(const Epetra_IntMultiVector &Source)
= Operator.
int ExtractView(int **A, int *MyLDA) const
Set user-provided addresses of A and MyLDA.
int NumVectors() const
Returns the number of vectors in the multi-vector.
Epetra_IntMultiVector: A class for constructing and using dense multi-vectors, vectors and matrices i...
Epetra_MpiComm: The Epetra MPI Communication Class.
virtual void Barrier() const =0
Epetra_Comm Barrier function.
int AllocateForCopy(void)
int ReplaceGlobalValue(int GlobalRow, int VectorIndex, int OrdinalValue)
Replace current value at the specified (GlobalRow, VectorIndex) location with OrdinalValue.
virtual int MyPID() const =0
Return my process ID.
virtual ~Epetra_IntMultiVector()
Epetra_MultiVector destructor.
virtual int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const =0
Epetra_Comm Global Max function.
void Assign(const Epetra_IntMultiVector &rhs)
Epetra_IntVector ** IntVectors_
int ResetView(int **ArrayOfPointers)
Reset the view of an existing multivector to point to new user data.
virtual int SumAll(double *PartialSums, double *GlobalSums, int Count) const =0
Epetra_Comm Global Sum function.
int NumMyElements() const
Number of elements on the calling processor.
int SetSeed(unsigned int Seed_in)
Set seed for Random function.
std::string toString(const int &x) const
int FirstPointInElement(int LID) const
Returns the requested entry in the FirstPointInElementList; see FirstPointInElementList() for details...
int MaxValue(int *Result) const
Compute maximum value of each vector in multi-vector.
const Epetra_Comm * Comm_
Epetra_CompObject: Functionality and data that is common to all computational classes.
int ChangeGlobalValue(int_type GlobalBlockRow, int BlockRowOffset, int VectorIndex, int OrdinalValue, bool SumInto)
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
const Epetra_Comm & Comm() const
Access function for Epetra_Comm communicator.
virtual void Print(std::ostream &os) const
Print method.
int PackAndPrepare(const Epetra_SrcDistObject &Source, int NumExportIDs, int *ExportLIDs, int &LenExports, char *&Exports, int &SizeOfPacket, int *Sizes, bool &VarSizes, Epetra_Distributor &Distor)
Perform any packing or preparation required for call to DoTransfer().
virtual int NumProc() const =0
Returns total number of processes.
int ChangeMyValue(int MyBlockRow, int BlockRowOffset, int VectorIndex, int OrdinalValue, bool SumInto)
void UpdateOrdinalTemp() const
int SumIntoGlobalValue(int GlobalRow, int VectorIndex, int OrdinalValue)
Adds OrdinalValue to existing value at the specified (GlobalRow, VectorIndex) location.
int MaxElementSize() const
Maximum element size across all processors.
int CheckSizes(const Epetra_SrcDistObject &A)
Allows the source and target (this) objects to be compared for compatibility, return nonzero if not...
int SumIntoMyValue(int MyRow, int VectorIndex, int OrdinalValue)
Adds OrdinalValue to existing value at the specified (MyRow, VectorIndex) location.
int ReplaceMyValue(int MyRow, int VectorIndex, int OrdinalValue)
Replace current value at the specified (MyRow, VectorIndex) location with OrdinalValue.
virtual int ReportError(const std::string Message, int ErrorCode) const
Error reporting method.
int ReplaceMap(const Epetra_BlockMap &map)
Replace map, only if new map has same point-structure as current map.
int NumMyPoints() const
Number of local points for this map; equals the sum of all element sizes on the calling processor...
Epetra_SrcDistObject: A class for supporting flexible source distributed objects for import/export op...
long long * MyGlobalElements64() const
int AllocateForView(void)
int UnpackAndCombine(const Epetra_SrcDistObject &Source, int NumImportIDs, int *ImportLIDs, int LenImports, char *Imports, int &SizeOfPacket, Epetra_Distributor &Distor, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor)
Perform any unpacking and combining after call to DoTransfer().
int MyPID() const
Return my process ID.
Epetra_DistObject: A class for constructing and using dense multi-vectors, vectors and matrices in pa...
const Epetra_BlockMap & Map() const
Returns the address of the Epetra_BlockMap for this multi-vector.