[Trilinos-Users] tpetra::crsmatrix -> xpetra::matrix
Nico Schlömer
nico.schloemer at gmail.com
Wed Oct 28 22:19:59 EDT 2015
I see now there is `MueLu::TpetraCrs_To_XpetraMatrix`, but it doesn't
work for `const Tpetra::CrsMatrix`. :(
--Nico
On Thu, Oct 29, 2015 at 1:53 AM, Nico Schlömer <nico.schloemer at gmail.com> wrote:
> Can anyone please assist me with converting a `const Tpetra::CrsMatrix` into
> something that I can stuff into this
> ```
> H->GetLevel(0)->Set("A", something);
> ```
> I played around for two hours now and ended up with
> ```
> Teuchos::RCP<const Tpetra::CrsMatrix<double,int,int>> ATpetra =
> Teuchos::rcpFromRef(A);
> auto tmp = Xpetra::TpetraCrsMatrix<double,int,int>(ATpetra);
> auto AXpetra = Teuchos::rcpFromRef(tmp);
> auto AXpetraWrap = Teuchos::rcp(new Xpetra::CrsMatrixWrap(AXpetra));
> ```
> which isn't working at all. Yikes, this is really complex.
>
> As a side node, I would really appreciate const-reference interfaces. I find
> myself doing the `Teuchos::rcpFromRef()` dance all the time, only to
> dereference the objects later again.
>
> Cheers,
> Nico
>
> PS: I would have written to the MueLu users' list, but I couldn't find it
> anywhere.
More information about the Trilinos-Users
mailing list