51 using namespace Matlab;
67 if (A.NumVectors() > 1) {
68 for (
int i=0; i < A.NumVectors(); i++)
76 int numRows = map.NumMyElements();
81 for (
int i=0; i<numRows; i++) allGids[i] = map.GID(i);
84 int numChunks = numProc;
90 int numImportGids = 0;
92 importGidList.
Size(stripSize+1);
93 for (
int i=0; i<numChunks; i++) {
94 if (comm.
MyPID()==0) {
95 curStripSize = stripSize;
96 if (i<remainder) curStripSize++;
97 for (
int j=0; j<curStripSize; j++) importGidList[j] = j + curStart;
98 curStart += curStripSize;
104 if (importGids.Import(allGids, gidImporter,
Insert))
return(-1);
113 if (importA.Import(A1, importer,
Insert))
return(-1);
125 int length = A.GlobalLength();
126 int numVectors = A.NumVectors();
128 if (comm.
MyPID()!=0) {
129 if (A.MyLength()!=0) ierr = -1;
132 if (length!=A.MyLength()) ierr = -1;
133 double* matlabAvalues = *matlabApr;
134 double* Aptr = A.Values();
135 memcpy((
void *)matlabAvalues, (
void *)Aptr,
sizeof(*Aptr) * length * numVectors);
136 *matlabApr += length;
139 comm.
MinAll(&ierr, &ierrGlobal, 1);
int CopyMultiVector(double **matlabApr, const Epetra_MultiVector &A)
int DoCopyMultiVector(double **matlabApr, const Epetra_MultiVector &A)
virtual int MinAll(double *PartialMins, double *GlobalMins, int Count) const =0
virtual int MyPID() const =0
virtual const Epetra_BlockMap & Map() const =0
const Epetra_Comm & Comm() const
virtual int NumProc() const =0