[Trilinos-Users] Multidimensional Arrays

Christopher Siefert csiefer at sandia.gov
Mon Feb 1 15:08:31 MST 2010


John,

I believe an Epetra_BlockMap is the item you want, with elements of size
3.

Epetra_BlockMap (int NumGlobalElements, int ElementSize, int IndexBase,
const Epetra_Comm &Comm)

-Chris

On Mon, 2010-02-01 at 14:27 -0700, John Mitchell wrote:
> 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
> 
> 
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
-- 
Christopher M. Siefert    
Sandia National Laboratories
MS 0378, P.O. Box 5800    
Albuquerque, NM 87185-0378
Tel: (505) 844-4696
Fax: (505) 845-7442



More information about the Trilinos-Users mailing list