[Trilinos-Users] Epetra_SerialDenseVector vs. Teuchos::SerialDenseVector

Nico Schlömer nico.schloemer at ua.ac.be
Sun Aug 1 18:17:22 MDT 2010


> SerialDenseVector y;
> x *= alpha;
> y += x;
> [...]

Oh, and one could as well loop over the indices of course.
Fair enough, instead of

   SerialDenseVector y = alpha * x1 + [...]

it's 

   SerialDenseVector y(n);
   for ( int k=0; k<n; k++ )
       y[k] = alpha * x1[k] + ...

Not drastically more complicated, but the same is true for
operator{+,-,*}= .

Cheers,
Nico


On Mon, 02 Aug 2010 02:04:29 +0200, Nico Schlömer
<nico.schloemer at ua.ac.be>
wrote:
>> Thus any further development of the SerialDense classes will be done in
> Teuchos,
> 
> Suggestion for the further development: Adding
> 
>   operator+
>   operator-
> 
> and scalar multiplication. This is now all possible with operator+= and
> friends, but I just had to evaluate an expression 'a la
> 
>    y = alpha * x1 + beta * x2 + gamma * x3 + delta * x4
> 
> where the x{1,2,3,4} are SerialDenseVectors, alpha,.. are scalars and
> found the only way to do so
> 
> SerialDenseVector y;
> x *= alpha;
> y += x;
> [...]
> 
> The code for the new operators would rather go in SerialDense~Matrix~,
> though, I guess.
> 
> Cheers,
> Nico
> 
> 
> 
> On Tue, 27 Jul 2010 11:20:35 -0600, "Thornquist, Heidi K"
> <hkthorn at sandia.gov> wrote:
>> Hi Nico,
>> 
>> There has been some work to add functionality in Teuchos to support the
> use
>> of Teuchos::SerialDenseVector with Teuchos::SerialDenseMatrix.  This
>> functionality
>> was in support of Dakota's use of Teuchos::SerialDenseVector.  Thus any
>> further
>> development of the SerialDense classes will be done in Teuchos,
probably
>> not in
>> Epetra.
>> 
>> Heidi
>> 
>> 
>> On 7/27/10 11:10 AM, "Heroux, Michael A" <maherou at sandia.gov> wrote:
>> 
>> Nico,
>> 
>> My advice is that, if there is functionality overlap between Epetra and
>> Teuchos, you should use Teuchos.  Historically, we have migrated a lot
> of
>> Epetra functionality into Teuchos, generalizing it as part of the
>> migration.
>> This is what happened in this case.
>> 
>> Mike
>> 
>> 
>> On 7/27/10 12:00 PM, "Christopher Grover Baker" <bakercg at ornl.gov>
> wrote:
>> 
>>> Nico,
>>>
>>> Aside from the fact that Teuchos::SerialDenseVector is templated on
the
>>> underlying scalar type and Epetra_SerialDenseVector is hard-coded to
>>> double,
>>> there should not be much difference between the two. The Epetra object
>>> will
>>> see little use outside of Epetra, while the Teuchos object will be
used
>>> by
>>> templated packages. Although, to be honest, I can't think of any use
of
>>> Teuchos::SerialDenseVector in any of the templated packages that I
work
>>> on
>>> (including Tpetra).
>>>
>>> Chris
>>>
>>>
>>> On 7/27/10 12:10 PM, "Nico Schlömer" <nico.schloemer at ua.ac.be> wrote:
>>>
>>> Hi all,
>>>
>>> I just saw that for the Epetra_SerialDenseVector class I've always
used
>>> there seems to be an equivalent in Teuchos::SerialDenseVector.
>>>
>>> Is the use of one of the two classes recommended over the other?
>>>
>>> Cheers,
>>> Nico
>>>
>>>
>>> _______________________________________________
>>> Trilinos-Users mailing list
>>> Trilinos-Users at software.sandia.gov
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Trilinos-Users mailing list
>>> Trilinos-Users at software.sandia.gov
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>
>> 
>> 
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/listinfo/trilinos-users
> 
> 
> _______________________________________________
> 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