[Trilinos-Users] Multidimensional Arrays

John Mitchell jamitch at sandia.gov
Mon Feb 1 14:27:37 MST 2010


I have a question on multidimensional arrays with Epetra_Maps and 
Epetra_Vectors.

For example, suppose I have a set of n points.  Associated with each 
point I have coordinates (x,y,z) and a global Id that I use to create an 
Epetra_Map.  For a given point local index j, I can look up the 
coordinates vec[3*j+k], k=0,1,2. 

I would like to create an Epetra_Map that understands this and stores 
the data so that I don't have to create 3 Epetra_Vectors (for X, Y, Z). 

Is this possible?  If not, what is the recommended best practice?

I see that there is Epetra_MultiVector with the following constructor, 
but that doesn't appear to do what I want (unless I do a copy of all 
incoming data into an array double *A that is not interlaced and then 
use the constructor below to copy one more time)

Epetra_MultiVector(Epetra_DataAccess CV, const Epetra_BlockMap& Map, 
double *A, int MyLDA, int NumVectors);

Thanks,
John





More information about the Trilinos-Users mailing list