[Trilinos-Users] Epetra_CrsMatrix-aztecOO: repeated indeces

Simone Deparis deparis at MIT.EDU
Mon Oct 3 12:00:36 MDT 2005


Mike,

Thank you again. I just tested Aztec with the matrix with repeated indeces.
Now that I do not specifies the column map, I can use aztec directly,
even with Jacobi or DD preconditioners.

I have two further questions:
1) is there a method C =A+ t*B, where A,B,C are Epetra_CrsMatrix (with
the same map) and t a  double? I could not find it in the doxigen
documentation.

2) I could not find the list of possible options for aztecOO in doxigen.
Do youu know where

thank you
Simone

Michael A Heroux wrote:
> Simone,
> 
> I don't think (but am not certain) AztecOO will mind if you pass A as the
> user matrix.  However, if you wish to use AztecOO's native preconditioners,
> this might be an issue.  However, I have not tried this, so it might work.
> It is worth trying.  If this does not work, let me know.  There may be a way
> to make it work.
> 
> Mike
> 
> 
>>-----Original Message-----
>>From: Simone Deparis [mailto:deparis at MIT.EDU] 
>>Sent: Monday, October 03, 2005 12:04 PM
>>To: maherou at sandia.gov
>>Subject: Re: [Trilinos-Users] Epetra_CrsMatrix-aztecOO: 
>>repeated indeces
>>
>>Mike,
>>
>>thank you for the hint. You are right, by not suggesting a 
>>column map, it does the job.
>>So for now I will be converting A to B.
>>
>>Anyway, does somebody knows if it is possible to use aztecOO 
>>with a matrix with repeated indeces?
>>I would prefer not to use FEm matrices, since I'd like to 
>>keep the distinct values of A at the repeated nodes for reuse 
>>(in my set of problems, there will be a coefficient in front 
>>of the "local" matrix components, different for each local 
>>matrix and each simulation).
>>
>>Thank you
>>Simone
>>
>>
>>
>>Michael A Heroux wrote:
>>
>>>Simone,
>>>
>>>When you specify the column map argument to the Epetra_CrsMatrix 
>>>constructor, it acts as a filter, ignoring matrix entries that are 
>>>inserted but not listed in the map on the calling 
>>
>>processor.  This is 
>>
>>>why you are missing off-block values in B.  Generally 
>>
>>speaking it is 
>>
>>>good to let the matrix object figure out the column map on it own.  
>>>You can do this by constructing the matrix as:
>>>
>>>Epetra_CrsMatrix A(Copy,MapA,3);
>>>
>>>You will still want to export A to B, but once again, don't specify 
>>>the column map of B.
>>>
>>>As an alternative, you could look at using the FECrsMatrix class, 
>>>since it is more efficient at supporting this type of 
>>
>>matrix construction.
>>
>>>Mike
>>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: trilinos-users-bounces at software.sandia.gov
>>>>[mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of 
>>>>Simone Deparis
>>>>Sent: Monday, October 03, 2005 10:29 AM
>>>>To: trilinos-users at software.sandia.gov
>>>>Subject: [Trilinos-Users] Epetra_CrsMatrix-aztecOO: repeated indeces
>>>>
>>>>Hi,
>>>>I have
>>>>
>>>> Epetra_CrsMatrix  A(Copy,MapA,MapA,3)  FillComplete(MapV,MapV);
>>>>
>>>> Epetra_FEVector x(MapV);
>>>> Epetra_FEVector y(MapV);
>>>>
>>>>mapA has repeated indeces {0 1 2}, {2 3 4} mapV has no reapeated 
>>>>indeces {0 1 2}, {3 4}
>>>>
>>>>I would like to use aztecOO to solve Ax=y,
>>>>
>>>> Epetra_LinearProblem Problem(&A,&x,&b);  AztecOO Solver(Problem);
>>>>
>>>>but I get the following error
>>>>(probably because of the repeating indeces in MapA):
>>>>
>>>>AZ_extract_comm_info: Received elements must be stored after
>>>>                  all 3 local elements
>>>>
>>>>I then tried to copy A to B, a matrix without repeated 
>>
>>indeces, using 
>>
>>>>the exporter,
>>>>
>>>> Epetra_CrsMatrix  B(Copy,MapV,MapBcol,3)  Comm.Barrier();  
>>>>B.Export(A,*(A.Exporter()),Add);  Comm.Barrier();
>>>>
>>>>mapBcol: each processor has all the column {0 1 2 3 4 5}, {0
>>>>1 2 3 4 5} The problem here is that "off-block" values are lost:
>>>>
>>>>
>>>>
>>>>>>full(A)
>>>>
>>>>ans =
>>>>
>>>>    2    -2     0     0     0
>>>>   -1     2    -2     0     0
>>>>    0    -1     6    -4     0
>>>>    0     0    -2     4    -4
>>>>    0     0     0    -2     4
>>>>
>>>>
>>>>
>>>>>>full(B)
>>>>
>>>>ans =
>>>>
>>>>    2    -2     0     0     0
>>>>   -1     2    -2     0     0
>>>>    0    -1     6     0     0
>>>>    0     0     0     4    -4
>>>>    0     0     0    -2     4
>>>>
>>>>
>>>>Somebody as a suggestion, please?
>>>>Thank you
>>>>Simone
>>>>
>>>>
>>>>
>>>>_______________________________________________
>>>>Trilinos-Users mailing list
>>>>Trilinos-Users at software.sandia.gov
>>>>http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>>
>>>
>>>
>>--
>>_____________________________________________________________________
>>                                    Simone Deparis
>>  .~.                               Mech Eng Dept - MIT
>>  /V\   L   I   N   U   X           77 Mass Ave Room 3-264
>> // \\  =================           Cambridge MA 02139
>>/(   )\                             USA
>> ^^-^^
>>phone :  +1 617 452 3285  mailto:deparis at mit.edu
>>fax   :  +1 617 258 8559  http://www.mit.edu/~deparis
>>_____________________________________________________________________
>>
>>
>>
>>
> 
> 

-- 
_____________________________________________________________________
                                    Simone Deparis
  .~.                               Mech Eng Dept - MIT
  /V\   L   I   N   U   X           77 Mass Ave Room 3-264
 // \\  =================           Cambridge MA 02139
/(   )\                             USA
 ^^-^^
phone :  +1 617 452 3285  mailto:deparis at mit.edu
fax   :  +1 617 258 8559  http://www.mit.edu/~deparis
_____________________________________________________________________





More information about the Trilinos-Users mailing list