[Trilinos-Users] [EXTERNAL] RE: thrya::update
Day, David
dmday at sandia.gov
Tue Dec 11 17:00:33 MST 2012
Yes it works perfectly. --David
On 12/11/12 4:50 PM, "Hoemmen, Mark" <mhoemme at sandia.gov> wrote:
>Hi David,
>
>I imagine Thyra::randomize() was subject to the same interface change as
>Thyra::scale(). Thus (omitting "Teuchos::" for brevity):
>
>int numRhs = 1;
>RCP<Thyra::MultiVectorBase<double> > b = Thyra::createMembers (X_r.domain
>(), numRhs);
>Thyra::seed_randomize<double> (0);
>Thyra::randomize (-1.0, 1.0, b.ptr ());
>
>Note that here, ptr() is a member function of RCP<T> (where T =
>Thyra::MultiVectorBase<double> in this case). It returns a Ptr<T>.
>
>mfh
>
>On Dec 11, 2012, at 4:43 PM, Day, David wrote:
>
>> Mark,
>> I sent to trilinos-users today a good description of what is not
>>working.
>> Roughly speaking, adding to the aXDpdY code 4 lines of code from
>> Stratimikos causes it to no longer compile.
>> Thanks for differentiating Teuchos::Ptr and Teuchos::ptr,
>>
>> David
>>
>>
>> On 12/11/12 2:56 PM, "Day, David" <dmday at sandia.gov> wrote:
>>
>>> I added
>>> # include <Thyra_VectorBase.hpp> // randomize
>>>
>>> And then in
>>>
>>>
>>>
>>> void aXDpbY(
>>> Real alpha,
>>> const Thyra::MultiVectorBase<Real> &X_r, // const data
>>> const Thyra::MultiVectorBase<Real> &X_i,
>>> std::vector<Real> &D_r,
>>> std::vector<Real> &D_i,
>>> Real beta,
>>> Thyra::MultiVectorBase<Real> &Y_r,
>>> Thyra::MultiVectorBase<Real> &Y_i){ // mvY = mvX * diag(vecD) for
>>> complex X,Y and D.
>>>
>>> //code from Statimikos
>>>
>>>
>>> int numRhs = 1;
>>> Teuchos::RCP< Thyra::MultiVectorBase<double> > b =
>>> Thyra::createMembers(X_r.domain(), numRhs);
>>> Thyra::seed_randomize<double>(0);
>>> Thyra::randomize(-1.0, 1.0, &*b);
>>>
>>>
>>>
>>> /scratch/dmday/code/Salinas/solutions/qevp.C: In function Œvoid
>>> aXDpbY(Real, const Thyra::MultiVectorBase<double>&, const
>>> Thyra::MultiVectorBase<double>&, std::vector<double,
>>> std::allocator<double> >&, std::vector<double, std::allocator<double>
>>>>&,
>>> Real, Thyra::MultiVectorBase<double>&,
>>>Thyra::MultiVectorBase<double>&)¹:
>>> /scratch/dmday/code/Salinas/solutions/qevp.C:238: error: no matching
>>> function for call to Œrandomize(double, double,
>>> Thyra::MultiVectorBase<double>*)¹
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 12/11/12 2:41 PM, "Bartlett, Roscoe A." <bartlettra at ornl.gov> wrote:
>>>
>>>> Documentation is shown here:
>>>>
>>>>
>>>>
>>>>http://trilinos.sandia.gov/packages/docs/dev/packages/thyra/doc/html/cl
>>>>as
>>>> s
>>>> Thyra_1_1MultiVectorBase.html
>>>>
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: trilinos-users-bounces at software.sandia.gov
>>>>> [mailto:trilinos-users-
>>>>> bounces at software.sandia.gov] On Behalf Of Day, David
>>>>> Sent: Tuesday, December 11, 2012 4:29 PM
>>>>> To: trilinos-users at software.sandia.gov
>>>>> Subject: [Trilinos-Users] thrya::update
>>>>>
>>>>> Dear trilinos users,
>>>>>
>>>>> I am trying to figure out how to use Thyra::update. It is used in
>>>>>
>>>>> Stratimikos/adapters/belos/example/LOWSFactory/Epetra/belos_epetra_th
>>>>> yra_lo
>>>>> wsf_hp.cpp
>>>>>
>>>>> I am trying to create a simple stand alone example, to drop into my
>>>>> code,
>>>>> to see which libraries I am missing.
>>>>>
>>>>> Is there a better example than this? My code uses neither Epetra nor
>>>>> Tpetra.
>>>>> --David Day
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Trilinos-Users mailing list
>>>>> Trilinos-Users at software.sandia.gov
>>>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>>
>>>>
>>>
>>
>
More information about the Trilinos-Users
mailing list