[Dune] [#800] implement operator*( K, FieldVector< K, SIZE > )

Dune flyspray at dune-project.org
Thu Jun 10 16:22:23 CEST 2010


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Martin Nolte (nolte) 

Attached to Project - Dune
Summary - implement operator*( K, FieldVector< K, SIZE > )
Task Type - Feature Request
Category - Common
Status - New
Assigned To - 
Operating System - Unspecified / All
Severity - Low
Priority - Normal
Reported Version - SVN (pre2.1)
Due in Version - Undecided
Due Date - Undecided
Details - There is an operator+( FieldVector< K, SIZE >, FieldVector< K, SIZE > ). Is there any reason that
operator*( K, FieldVector< K, SIZE > ) and its variants are not implemented?

If there is none, I suggest to add the following code to fvector.hh, if expression templates are not available:

  template< class K, int SIZE >
  FieldVector< K, SIZE > operator* ( const K &k, const FieldVector< K, SIZE > &v )
  {
    FieldVector< K, SIZE > w( v );
    return w *= k;
  }

  template< class K, int SIZE >
  FieldVector< K, SIZE > operator* ( const FieldVector< K, SIZE > &v, const K &k )
  {
    FieldVector< K, SIZE > w( v );
    return w *= k;
  }

  template< class K, int SIZE >
  FieldVector< K, SIZE > operator/ ( const FieldVector< K, SIZE > &v, const K &k )
  {
    FieldVector< K, SIZE > w( v );
    return w /= k;
  }

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=800

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list