[Trilinos-Users] Need Advice On A Special Kind of FE Matrix Assebmly

Williams, Alan B william at sandia.gov
Wed May 28 10:07:21 MDT 2008


Mike is right. However, there is a caveat with FECrsMatrix you need to be aware of.
If you access matrix data before GlobalAssemble has been called, you won't see the "overlapping" data. i.e., the data that was contributed on one processor but really belongs on another processor.

You can call GlobalAssemble multiple times, but as you suspect that won't be very efficient. But perhaps in the bigger context of your whole application, the overhead won't be very large.

Alan


________________________________
From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of Heroux, Michael A
Sent: Wednesday, May 28, 2008 9:40 AM
To: Davood Ansari; trilinos-users at software.sandia.gov
Subject: Re: [Trilinos-Users] Need Advice On A Special Kind of FE Matrix Assebmly

Davood,

It is possible to access matrix data even before calling FillComplete.   You must use global indices, since local indices are not yet determined.  You can use view mode to save copying costs.

Mike


On 5/28/08 2:41 AM, "Davood Ansari" <david.ansari at gmail.com> wrote:

Well

I am assembling a FEM matrix. And of course I am using Epetra's  FE_CrsMatrix class.

Unlike ordinary FE matrix assembly which is an iteration over the entire
elements, I have my elements sorted in a binary tree. First I have to assemble
the deepest level elements (branch ends) into the global matrix. Then, I have to
assemble the elements that are located one level higher (higher means towards the tree root).
At each level, of the assembly I need to have access to the data that has been previously
(only form the previous level) assembled into the global matrix.

If I were going to read the required data directly from the global matrix, then I'd have to call
FillComplete and GlobalAssemble methods repeatedly. I am not sure if such an approach would even
work (probably it will not without sophisticated synchronizations between different processes in parallel)
and predict that it will turn out to be very inefficient.
I understand that this can be done using a recursive process but I am avoiding it simply because it is
not a good parallel solution.

I wonder if you guys have a better suggestion in mind.
Please Comment


Yours
Davood




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080528/e9b17bd8/attachment.html 


More information about the Trilinos-Users mailing list