[Trilinos-Users] [EXTERNAL] flatten a multivector?

Bartlett, Roscoe A. bartlettra at ornl.gov
Thu Jun 4 16:17:23 EDT 2015


Jeremy,

Following on what Andy mentioned about Thyra::ProductVectorBase ...

So there is a Thyra COMPOSITE-like ANA subclass that takes any arbitrary Thyra::MultiVectorBase object and represents it as a single tall Thyra::ProductVectorBase object (which is an interface that derives from Thyra::VectorBase).    It is called Thyra::DefaultMultiVectorProductVector.  See:

    http://trilinos.org/docs/dev/packages/thyra/doc/html/classThyra_1_1DefaultMultiVectorProductVector.html
    http://trilinos.org/docs/dev/packages/thyra/doc/html/classThyra_1_1DefaultMultiVectorProductVectorSpace.html

We use this, for example, to solve the forward sensitivity equations in Rythmos where the unknown sensitivities are naturally multi-vectors but the Rythmos solvers only deal with single-vector DAEs.  For an example, see the class Rythmos::ForwardSensitivityImplicitModelEvaluator:

    http://trilinos.org/docs/dev/packages/rythmos/doc/html/classRythmos_1_1ForwardSensitivityImplicitModelEvaluator.html

See the code in:

   http://trilinos.org/docs/dev/packages/rythmos/doc/html/Rythmos__ForwardSensitivityImplicitModelEvaluator_8hpp_source.html

for example, see:

1059   s_bar_space_ = Thyra::multiVectorProductVectorSpace(
1060     stateModel_->get_x_space(), np_
1061     );
1062
 1063   f_sens_space_ = Thyra::multiVectorProductVectorSpace(
1064     stateModel_->get_f_space(), np_
1065     );

Cheers,

-Ross

From: Trilinos-Users [mailto:trilinos-users-bounces at trilinos.org] On Behalf Of Salinger, Andrew
Sent: Thursday, June 04, 2015 3:58 PM
To: Templeton, Jeremy Alan; trilinos-users at trilinos.org
Subject: Re: [Trilinos-Users] [EXTERNAL] flatten a multivector?

Jeremy,

I think that what you are looking for is the Thyra ProductVector. This is an
abstract vector made up of sub-vectors, each with their own concrete
implementation.

Irina Tezaur has recently implemented something like this with Alejandro
Mota in Albany for MultiScale coupling. If you get a copy of Albany (github)
you can look for guidance in Albany/src/LCM/SchwarzMultiscale.cpp

Irina based this on working Trilinos code, such as in Teko (and perhaps Panzer
and Thyra examples). These may be better resources -  I just happen to know
where to point you for the Multiscale use case, with the benefit that the
developers are local to you in SNL-CA.

Andy

From: <Templeton>, Jeremy Alan <jatempl at sandia.gov<mailto:jatempl at sandia.gov>>
Date: Thursday, June 4, 2015 at 10:55 AM
To: "trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>" <trilinos-users at trilinos.org<mailto:trilinos-users at trilinos.org>>
Subject: [EXTERNAL] [Trilinos-Users] flatten a multivector?

Hi there, I would like to flatten a multi vector such that if it has two columns it will construct a vector with one column which first contains column 1 followed by column 2 of the multi vector.  This would be handy to easily switch between segregated and monolithic solves.  Is there the capability to do this somewhere in Trilinos already?
Thanks,
Jeremy

--------------------------------------------------------
Jeremy A. Templeton, Ph.D.
Thermal/Fluid Sciences & Engineering
jatempl at sandia.gov<mailto:jatempl at sandia.gov>
http://tiny.sandia.gov/jatempl
925-294-1429




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20150604/30334945/attachment-0001.html>


More information about the Trilinos-Users mailing list