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

Williams, Alan B william at sandia.gov
Mon Oct 27 08:38:37 MDT 2008


Hi Riccardo,

Here's what I would recommend:

Build the map for OPTION1, then use that map to create instances of Epetra_FEVector and Epetra_FECrsMatrix. Those vector and matrix objects allow you to add in entries that are not locally-owned. When you call the 'GlobalAssemble' method, they send the non-local entries to the correct processor.

Documentation for Epetra_FECrsMatrix is located here:
http://trilinos.sandia.gov/packages/docs/r9.0/packages/epetra/doc/html/classEpetra__FECrsMatrix.html
Scroll down to the "Detailed Description" section for more information.

Alan


> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov
> [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf
> Of rrossi at cimne.upc.edu
> Sent: Sunday, October 26, 2008 9:39 AM
> To: trilinos-users at software.sandia.gov
> Subject: [Trilinos-Users] optimal choice of maps for finite
> elements assembly and update
>
> 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  has nodes 1 2 3 4
> Node 2  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
>



More information about the Trilinos-Users mailing list