[Trilinos-Users] [EXTERNAL] Stratimikos: Amesos2

Bartlett, Roscoe A rabartl at sandia.gov
Mon May 23 16:17:42 EDT 2016


Mario,

Your best bet is to look at and duplicate the existing Amesos/Thyra/Stratimikos adapter:

    https://github.com/trilinos/Trilinos/blob/master/packages/stratimikos/adapters/amesos/src/Thyra_AmesosLinearOpWithSolve.cpp
    https://github.com/trilinos/Trilinos/blob/master/packages/stratimikos/adapters/amesos/src/Thyra_AmesosLinearOpWithSolveFactory.cpp

You would just need to replace the Epetra stuff with Tpetra extraction code.  See:

    https://github.com/trilinos/Trilinos/blob/master/packages/thyra/adapters/tpetra/src/Thyra_TpetraThyraWrappers_decl.hpp
    https://github.com/trilinos/Trilinos/blob/master/packages/thyra/adapters/tpetra/test/TpetraThyraWrappers_UnitTests.cpp

(The unit tests show how the static utility class Thyra::TpetraOperatorVectorExtraction is used to unwrap Tpetra objects.)

You can also then just inject your new LinearOpWtihSolve[Factory]Base subclasses into Stratimikos at runtime without ever touching the Stratimikos source code using the registration function Stratimikos::DefaultLinearSolverBuilder::setLinearSolveStrategyFactory():

    https://trilinos.org/docs/dev/packages/stratimikos/doc/html/classStratimikos_1_1DefaultLinearSolverBuilder.html#ae612daca49e31d13d0f3ee76658ae908

just like is done for the Amesos/Thyra adapter at:

    https://github.com/trilinos/Trilinos/blob/master/packages/stratimikos/src/Stratimikos_DefaultLinearSolverBuilder.cpp#L490

However, I think the longer-term plan is to create Thyra/Stratimikos adatpers based on the Teuchos::LinearSolverFactory framework declared at:

    https://github.com/trilinos/Trilinos/blob/master/packages/teuchos/remainder/src/Trilinos_Details_LinearSolverFactory.hpp

Not sure about the time-table on that (we don't even have a GitHub issue for that yet).

But if you want this to be integrated back into the official Trilinos sources at some point, then the way to start is to create a Trilinos GitHub Issue under:

     https://github.com/trilinos/Trilinos/issues

and then we can have the conversation there on what should be done (i.e. the requirements and design analysis and review).  Then if the plan looks good, the code can be written and a pull-request can be made.

Cheers,

-Ross

Dr. Roscoe A. Bartlett, PhD
Sandia National Laboratories
Trilinos Software Engineering and Integration Technologies Lead
Consortium for the Advanced Simulation of Light Water Reactors (CASL) Physics Integration Infrastructure Lead


From: Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] On Behalf Of Juha, Mario Jesus
Sent: Monday, May 23, 2016 3:35 PM
To: trilinos-users at trilinos.org
Subject: [EXTERNAL] [Trilinos-Users] Stratimikos: Amesos2

Dear colleagues,

I am trying to use amesos2 direct sparse solver in Stratimikos. Currently there is no such implementation for it. I am trying to create a new adapter for amesos2. Could you pointing out what it should be the steps to do it? My main concern is how to deal with the forward operator for the LHS. In the original implementation it is only templated as an "Scalar", but for the Tpetra version need to be templated in <Scalar, LO, GO, Node>.

Cordially,

Mario J. Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160523/201d3c5b/attachment.html>


More information about the Trilinos-Users mailing list