Feimi,
I don't think there is a replacement function. You will have to write this
operation as a loop over the (locally owned) elements of a vector.
The vector classes have a large interface that has many member functions that
are difficult to implement if one wants to add new vector classes (for example
interfaces to other libraries). A few years ago we went through the existing
interfaces and tries to classify what are the important functions and which
ones could be removed. We then tried to separate functions into those that
provide element access (i.e., that are specific to a particular *basis* for
the vector space) and ones that just represent abstract vector space concepts
like addition, multiplication by a scalar, dot product, etc. The two abstract
base classes that represent this are ReadWriteVector and VectorSpaceVector.
The ratio() function does not fit this pattern. Taking the ratio of two
vectors is not a vector-space operation but instead depends on a particular
basis. On the other hand, it is an operation that is applied to all elements
of a vector at the same time. It is also a rather uncommon operation (your
particular use notwithstanding). So we decided that we should probably just
get rid of it. It is, after all, easy enough to implement by hand.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/