Thyra_VectorHandleOpsDecl.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //    Thyra: Interfaces and Support for Abstract Numerical Algorithms
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef THYRA_VECTOR_HANDLE_OPS_DECL_HPP
00030 #define THYRA_VECTOR_HANDLE_OPS_DECL_HPP
00031 
00032 #include "Thyra_ConfigDefs.hpp"
00033 #include "Thyra_VectorDecl.hpp"
00034 #include "Thyra_VecOpMacros.hpp"
00035 
00036 namespace Thyra 
00037 {
00039   template <class Scalar> inline  
00040   void setToConstant(const Vector<Scalar>& x, const Scalar& a);
00041 
00043   template <class Scalar> inline  
00044   void zeroOut(const Vector<Scalar>& x);
00045 
00046   /* abs */
00047   THYRA_UNARY_VECTOR_OP_DECL(abs, absInto, abs, "absolute value");
00048 
00049   /* reciprocal */
00050   THYRA_UNARY_VECTOR_OP_DECL(reciprocal, reciprocalInto, reciprocal, "reciprocal");
00051 
00052   /* */
00053   THYRA_UNARY_VECTOR_ROP_MAG_DECL(norm, norm, "natural norm");
00054 
00055   /* */
00056   THYRA_UNARY_VECTOR_ROP_MAG_DECL(norm1, norm_1, "1-norm");
00057 
00058   /* */
00059   THYRA_UNARY_VECTOR_ROP_MAG_DECL(norm2, norm_2, "2-norm");
00060 
00061   /* */
00062   THYRA_UNARY_VECTOR_ROP_MAG_DECL(normInf, norm_inf, "inf-norm");
00063   //template <class Scalar> 
00064   //  Scalar normInf(const Thyra::ConvertibleToVector<Scalar>& x);
00065 
00066   /* */ 
00067   THYRA_UNARY_VECTOR_ROP_DECL(sum, sum, "sum of the elements");
00068 
00069   /* */ 
00070   THYRA_BINARY_VECTOR_ROP_DECL(inner, scalarProd, "Inner or scalar product");
00071 
00072   /* */ 
00073   THYRA_UNARY_VECTOR_ROP_MAG_DECL(max, max, "max element");
00074 
00075   /* */ 
00076   THYRA_UNARY_VECTOR_ROP_MAG_DECL(min, min, "min element");
00077 
00082   template <class Scalar>   
00083   Vector<Scalar> dotStar(const Converter<Scalar, ConstVector<Scalar> >& x, 
00084                          const Converter<Scalar, ConstVector<Scalar> >& y);
00085 
00086 
00091   template <class Scalar>   
00092   Vector<Scalar> dotSlash(const Converter<Scalar, ConstVector<Scalar> >& x, 
00093                           const Converter<Scalar, ConstVector<Scalar> >& y);
00094 
00100   template <class Scalar>  
00101   Scalar maxloc(const Converter<Scalar, ConstVector<Scalar> >& x, Index& index) ;
00102 
00107   template <class Scalar>  
00108   Scalar minloc(const Converter<Scalar, ConstVector<Scalar> >& x, Index& index) ;
00109 
00114   template <class Scalar>   
00115   Scalar minloc(const Converter<Scalar, ConstVector<Scalar> >& x, 
00116              const Scalar& bound, Index& index) ;
00117 
00118 
00123   template <class Scalar>   
00124   Scalar maxloc(const Converter<Scalar, ConstVector<Scalar> >& x, 
00125                 const Scalar& bound, Index& index);
00126 
00131   template <class Scalar>   
00132   void scaleInto(const Converter<Scalar, ConstVector<Scalar> >& x,
00133                  const Scalar& alpha, Vector<Scalar>& result);
00134 
00139   template <class Scalar>   
00140   void scale(Vector<Scalar>& x, const Scalar& alpha);
00141 
00146   template <class Scalar>   
00147   void axpy(const Scalar& alpha, const Converter<Scalar, ConstVector<Scalar> >& x, 
00148             Vector<Scalar>& y);
00149   
00150 }
00151 
00152 #endif // THYRA_VECTOR_HANDLE_OPS_DECL_HPP

Generated on Thu Sep 18 12:33:03 2008 for Thyra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1