Vec_dh.h

00001 /*@HEADER
00002 // ***********************************************************************
00003 //
00004 //       Ifpack: Object-Oriented Algebraic Preconditioner Package
00005 //                 Copyright (2009) 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 
00030 #ifndef VEC_DH_H
00031 #define VEC_DH_H
00032 
00033 #include "euclid_common.h"
00034 #ifdef __cplusplus
00035 extern "C"
00036 {
00037 #endif
00038 
00039   struct _vec_dh
00040   {
00041     int n;
00042     double *vals;
00043   };
00044 
00045   extern void Vec_dhCreate (Vec_dh * v);
00046   extern void Vec_dhDestroy (Vec_dh v);
00047   extern void Vec_dhInit (Vec_dh v, int size);
00048   /* allocates storage, but does not initialize values */
00049 
00050   extern void Vec_dhDuplicate (Vec_dh v, Vec_dh * out);
00051   /* creates vec and allocates storage, but neither
00052    * initializes nor copies values 
00053    */
00054 
00055   extern void Vec_dhCopy (Vec_dh x, Vec_dh y);
00056   /* copies values from x to y;
00057    * y must have proper storage allocated,
00058    * e.g, through previous call to Vec_dhDuplicate,
00059    * or Vec_dhCreate and Vec_dhInit.
00060    */
00061 
00062   extern void Vec_dhSet (Vec_dh v, double value);
00063   extern void Vec_dhSetRand (Vec_dh v);
00064 
00065   extern void Vec_dhRead (Vec_dh * v, int ignore, char *filename);
00066   extern void Vec_dhReadBIN (Vec_dh * v, char *filename);
00067   extern void Vec_dhPrint (Vec_dh v, SubdomainGraph_dh sg, char *filename);
00068   extern void Vec_dhPrintBIN (Vec_dh v, SubdomainGraph_dh sg, char *filename);
00069 #ifdef __cplusplus
00070 }
00071 #endif
00072 #endif

Generated on Wed May 12 21:30:18 2010 for IFPACK by  doxygen 1.4.7