[Trilinos-Users] Re: Trilinos-Users Digest, Vol 28, Issue 5
dneckels at ucar.edu
Mon Dec 10 10:12:41 MST 2007
Hi Davood (David?),
I am a only a trilinos user, but have recently been through this exact
situation and might be able to help:
1) Create an Epetra map that partitions your dofs among the processors
(don't include the shared nodes).
2) Create an Epetra_FECrsMatrix using this map. Also, create an
Epetra_FEVector for your RHS with this map.
3) Call InsertGlobalValues to build the sparsity pattern of your matrix.
Feel free to include any non-local (shared) dofs both
as rows and columns here. Make sure your InsertGlobalValues signature
matches one from the FECrsMatrix, not the base class CrsMatrix.
4) During assembly, call SumIntoGlobalValues using both shared and local
dofs. Again, make sure you are calling one of the functions from the
derived FECrsMatrix, not the base class (else things will fail). Also
use SumIntoGlobalValues for the RHS vector.
5) call matrix->GlobalAssemble(), rhs->GlobalAssemble(). These functions
share the data and perform the communications that you were attempting,
trilinos-users-request at software.sandia.gov wrote:
> Send Trilinos-Users mailing list submissions to
> trilinos-users at software.sandia.gov
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
> trilinos-users-request at software.sandia.gov
> You can reach the person managing the list at
> trilinos-users-owner at software.sandia.gov
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Trilinos-Users digest..."
> Today's Topics:
> 1. More Complicated Use of Export (Davood Ansari)
> Message: 1
> Date: Sun, 9 Dec 2007 14:16:57 +0800
> From: "Davood Ansari" <david.ansari at gmail.com>
> Subject: [Trilinos-Users] More Complicated Use of Export
> To: trilinos-users at software.sandia.gov
> <dc22725d0712082216u20f2a5c1v2375357fd639f706 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> I am new to Trilinos.
> I am assembling a FEM CRS matrix in Epetra.
> I have divided the matrix in row section by the number of available
> Now when each process starts the Assembly of the global matrix it come to
> the point where is has to update a row of the global matrix which does not
> the process itself. Thus it cannot be added to that portion of the global
> using matrix attribute methods etc. Rather I think I have to send this row
> the matrix to the appropriate process to be assembled there. This involves
> rather complicated MPI communications. What I am wondering is that there
> be some kind of Export (Import) functionality for Epetra_Crs_Matrix to
> the situation. Please advise !
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20071209/31bdd092/attachment-0001.html
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> End of Trilinos-Users Digest, Vol 28, Issue 5
More information about the Trilinos-Users