# [Trilinos-Users] Having Different Row maps and A Transposition : What To Do ?

Heroux, Michael A maherou at sandia.gov
Tue Jun 17 10:17:25 MDT 2008

```Davood,

I am not sure I understand all the details of your situation, but I will make a few comments in case they help.

The distribution of the entries of your C matrix does not have to match the distributions of your vectors in any way.  As long as you call FillComplete using a DomainMap that matches the input vector map and a RangeMap that matches the output vector map, you can construct C in any way you like.  You can also compute the transpose of C  applied to a vector by simply setting the transpose argument to true.  You do not need to store the transpose of C.

As for what is the best distribution of C, it is hard to say up front. If you intend to perform many matvec's, then it is probably best to distribute C using the usual map.  However, if not, then use the natural map, making sure you call FillComplete with the right domain and range maps.  In either case you don't need to transpose it.

I hope this helps.

Mike

On 6/17/08 2:33 AM, "Davood Ansari" <david.ansari at gmail.com> wrote:

Hi all

Besides assembling my A and B  matrices (as in A x = lambda B y for an FE eigen-problem)
a third (constraints) matrix is needed to be assembled (call this one C).

For A and B, I have opted for the usual linearly sliced row map.
For C, the assembling process is much different (kind of recursive) from
ordinary FE matrices. Yet, there is a natural map that can partition C's rows into independent
slices. In the Solver stage, it is needed to multiply the transpose of C many times
(like A and B)  with the vectors that are constructed based on the usual row map.

Now, which one is possibly the right way to go:

Option I.
1.Assemble C, using its natural map, thus requiring no off process communications (requires Epetra_Crs_Matrix).
2.Then, transform C into a new matrix which is the transpose of C and complies to the usual map(don't even know how)

Option II.
1.Assemble C, using the usual map, thus requiring off process communications (definitely Epetra_FECrs_Matrix)
2.Then transpose it.

Kindly comment on this
Davood

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080617/6cebe43e/attachment.html
```