[Trilinos-Users] fixing a CRS matrix sparsity pattern
Hoemmen, Mark
mhoemme at sandia.gov
Mon Mar 23 12:04:19 MDT 2015
On 3/23/15, 12:00 PM, "trilinos-users-request at software.sandia.gov"
<trilinos-users-request at software.sandia.gov> wrote:
> 1. fixing a CRS matrix sparsity pattern (Templeton, Jeremy Alan)
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Mon, 23 Mar 2015 16:05:21 +0000
>From: "Templeton, Jeremy Alan" <jatempl at sandia.gov>
>To: "trilinos-users at software.sandia.gov"
> <trilinos-users at software.sandia.gov>
>Subject: [Trilinos-Users] fixing a CRS matrix sparsity pattern
>Message-ID: <EF64C6AA-E01E-4054-8FC4-847E2EDB9406 at sandia.gov>
>Content-Type: text/plain; charset="us-ascii"
>
>Hi there,
>
>I have a CRS matrix whose values will change over the course of a
>computation, but whose sparsity pattern will not. Is there an equivalent
>command to resumeFill I can use which will only allow value changes but
>not changes to the sparsity pattern?
>
>Thanks,
>Jeremy
Hi Jeremy -- the standard idiom is to create the CrsMatrix using a
fill-completed CrsGraph. Construct the CrsGraph first, fill it, then call
fillComplete (with the correct domain and range Maps, if applicable).
Then, use one of the CrsMatrix constructors that takes an RCP<const
CrsGraph>. This will forbid changes to the graph, and the matrix will
optimize for this case.
mfh
More information about the Trilinos-Users
mailing list