[Trilinos-Users] optimal choice of maps for finite elements assembly and update

Heroux, Michael A maherou at sandia.gov
Mon Oct 27 08:40:40 MDT 2008


Riccardo,

I think much of the functionality you want can be obtained by using the FECrsMatrix class.  It is intended for situations where the assembly map has repeated GIDs, but you want to use linear solvers where the rows of the matrix and entries of the vectors are uniquely owned.

This class might not provide all of the functionality, so the ideas that Kevin Long mentioned are needed in that case.

If you want to see an illustration of Import and Export functionality (which is at the heart of what you need to do, and is what FECrsMatrix uses),  you can look at:

Trilinos/packages/epetra/test/Import/Export/cxx_main.cpp
Trilinos/packages/didasko/examples/epetra/ex9.cpp

Also look at the content in the Trilinos Tutorial, starting around page 20:

http://trilinos.sandia.gov/Trilinos9.0Tutorial.pdf

If I misunderstand your situation and FECrsMatrix is not what you need, please ask again.

Best regards,


Mike


On 10/26/08 10:38 AM, "rrossi at cimne.upc.edu" <rrossi at cimne.upc.edu> wrote:

Dear All

I am trying to link my finite element code to the Trilinos and i would
like to get some hint from the experts ... on a quite standard subject:

Let's take a simple example with 6 nodes and two processors

Nodes 1 2 3 are "owned" by processor 1 ... but node 1 also has a copy of 4
Nodes 4 5 6 are "owned" by processor 2 ... but node 1 also has a copy of 3


In our internal database nodes 3 and 4 exist in both domains. We wish of
course that the nodal database is exactly replicated on the two nodes.


Let's suppose now I would like to define a map prior to assembling our
Finite Element problem:

We have two obvious options:

OPTION1
We define a linear map so that  the first processor owns exclusively 1 2 3
and the second 4 5 6

OPTION 2
We define a map so that
Node 1 &#61664; has nodes 1 2 3 4
Node 2 &#61664; has nodes 3 4 5 6

my problem is the following:

---- if I decide to use OPTION 1 at the moment of updating I need to
gather the value of 4 to do the update of node 1 and of 3 to do the update
of node 2 ... how do I do this? I expect to use the "ExtractCopy" but having
a look to the documentation it looks like it is not possible to get a non
local entry by its GID... how should I do this? Shall I define an extra map
and use the export operator?

---- OPTION 2 on the other hand would make the update trivial for me (I
would have a local copy of all of the entries I need) ... however ... can I
trust that the assembly and linear system solution will be done correctly?



I am sure that those questions were asked once and again but I could
figure out a clear answer through the didasko examples nor through the
user manual...
If someone could give me a short answer...or even a pointer to the correct
documentation it would be of great help

Thanks in advance
Riccardo




_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users


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


More information about the Trilinos-Users mailing list