[Trilinos-Users] Problem with Epetra_VbrMatrix

Massimiliano Martinelli massimiliano.martinelli at gmail.com
Fri May 22 09:24:54 MDT 2009


Hi,

besides the problem reported yesterday about the use ov Epetra_Import on 
Epetra_VbrMatrix, I have another issue with Epetra_VbrMatrix.

Running the following piece of code on processor 2 I obtain the output below, 
where there is a wrong ordering of the array ColID (In the inserting phase I 
put Col ID the values 3 , 4 and 1, while in the extraction phase I obtain 1 , 
3 and 4, but the values of the matrices are the same... Is it my fault?

Regards,
MM

----------------------------------------------------------

cout << "Input:"<<endl;
cout<<*MatrixBalanced ;



cout << "Output:"<<endl;
err = MatrixBalanced->ExtractMyBlockRowView( RowLID , RowDim, ColDim , ColID , 
Values ) ;
TEST_FOR_EXCEPTION( err != 0 , std::ios_base::failure , "Unknown error" ) ;

for ( j=0 ; j<ColDim ; j++ )
{
	cout << "My PID: "<< Comm->MyPID() << "   Row ID: "<< RowGID <<"   Column ID: 
"<< ColID[j] << endl;
	cout<<*Values[j] ;
}

----------------------------------------------------------




----------------------------------------------------
Input:
----------------------------------------------------
       2             2             3    
Epetra::SerialDenseMatrix               

Data access mode: View
A_Copied: no          
Rows(M): 1            
Columns(N): 2         
LDA: 1                
1 1                   
                      
       2             2             4    
Epetra::SerialDenseMatrix               

Data access mode: View
A_Copied: no          
Rows(M): 1            
Columns(N): 2         
LDA: 1                
2 1                   
                      
       2             2             1    
Epetra::SerialDenseMatrix               

Data access mode: View
A_Copied: no          
Rows(M): 1            
Columns(N): 2         
LDA: 1                
0 1


----------------------------------------------------
Output:
----------------------------------------------------
My PID: 2   Row ID: 2   Column ID: 1
Epetra::SerialDenseMatrix

Data access mode: Copy
A_Copied: yes
Rows(M): 1
Columns(N): 2
LDA: 1
1 1

My PID: 2   Row ID: 2   Column ID: 3
Epetra::SerialDenseMatrix

Data access mode: Copy
A_Copied: yes
Rows(M): 1
Columns(N): 2
LDA: 1
2 1

My PID: 2   Row ID: 2   Column ID: 4
Epetra::SerialDenseMatrix

Data access mode: Copy
A_Copied: yes
Rows(M): 1
Columns(N): 2
LDA: 1
0 1

-- 
---------------------------------------------------
Massimiliano Martinelli, PhD.
massimiliano.martinelli at gmail.com



More information about the Trilinos-Users mailing list