vecmatop.hpp

Go to the documentation of this file.
00001 
00002 /* Kernel Independent Fast Multipole Method
00003    Copyright (C) 2004 Lexing Ying, New York University
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2, or (at your option)
00008 any later version.
00009 
00010 This program is distributed in the hope that it will be useful, but WITHOUT
00011 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00013 for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; see the file COPYING.  If not, write to the Free
00017 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00018 02111-1307, USA.  */
00019 
00020 #ifndef _VECMATOP_HPP_
00021 #define _VECMATOP_HPP_
00022 
00023 #include "nummat.hpp"
00024 
00025 //--------------------------------------------------
00026 //x = a x
00027 int dscal(double alpha, DblNumVec& X);
00028 int dscal(int n, double alpha, double* X);
00029 //y = a x + y
00030 int daxpy(double a, const DblNumVec& X, DblNumVec& Y);
00031 int daxpy(double a, const DblNumMat& X, DblNumMat& Y);
00032 int daxpy(int n, double a, double* X, double* Y);
00033 // c = alpha*a*b + beta*c
00034 int dgemm(double alpha, const DblNumMat& A, const DblNumMat& B, double beta, DblNumMat& C);
00035 int dgemm(int m, int n, int k, double alpha, double* A, double* B, double beta, double* C);
00036 // a = alpha* x*y' + a
00037 int dger(double alpha, const DblNumVec& X, const DblNumVec& Y, DblNumMat& A);
00038 int dger(int m, int n, double alpha, double* X, double* Y, double* A);
00039 // y <= alpha A x + beta y
00040 int dgemv(double alpha, const DblNumMat& A, const DblNumVec& X, double beta, DblNumVec& Y);
00041 int dgemv(int m, int n, double alpha, double* A, double* X, double beta, double* Y);
00042 // R <= tran(M)
00043 int tran(const DblNumMat& M, DblNumMat& R);
00044 // R <= pinv(M, epsilon)
00045 int pinv(const DblNumMat& M, double epsilon, DblNumMat& R);
00046 // R <= inv(M);
00047 int inv(const DblNumMat& M, DblNumMat& R);
00048 //--------------------------------------------------
00049 // interpolation, etc.
00050 //evaluation flags
00051 enum {  EVFLAG_VL = 1,  EVFLAG_FD = 2,  EVFLAG_SD = 4 };
00052 //domain flag
00053 enum {  DMFLAG_PERIOD = 0,  DMFLAG_CLOSED = 1 };
00054 
00055 // cubic spline interpolation
00056 //int spev1d( int evflag, int dmflag, const DblNumMat& M, int n,   int i,   double u,   DblNumMat& res);
00057 //int spev2d( int evflag, int dmflag, const DblNumMat& M, int* mn, int* ij, double* uv, DblNumMat& res);
00058 int spev1d( int evflag, int dmflag, int dof, double* M, int n,   double e,   int i,   double u,   double* res);
00059 int spev2d( int evflag, int dmflag, int dof, double* M, int* mn, double* ef, int* ij, double* uv, double* res);
00060 int spcoef( int evflag, double u, double* us);
00061 // cubic lagrangian interpolation
00062 //int lagev1d(int evflag, int pdflag, const DblNumMat& M, int n,   int i,   double u,   DblNumMat& res);
00063 //int lagev2d(int evflag, int pdflag, const DblNumMat& M, int* mn, int* ij, double* uv, DblNumMat& res);
00064 int lagev1d(int evflag, int pdflag, int dof, double* M, int n,   double e,   int i,   double u,   double* res);
00065 int lagev2d(int evflag, int pdflag, int dof, double* M, int* mn, double* ef, int* ij, double* uv, double* res);
00066 int lagev3d(int evflag, int pdflag, int dof, double* M, int* mno, double* efg, int* ijk, double* uvw, double* res);
00067 int lagcoef(int evflag, double u, double* us);
00068 
00069 // fft-based periodic refinement
00070 //int fftrf1d(const DblNumMat& M, int  m,  int  ref, DblNumMat& R);
00071 //int fftrf2d(const DblNumMat& M, int* mn, int* ref, DblNumMat& R);
00072 //int fftrf1d(int dof, double* M, int  m,  int  ref, double* res);
00073 //int fftrf2d(int dof, double* M, int* mn, int* ref, double* res);
00074 
00075 #endif

Generated on Sun Dec 4 18:13:13 2005 for common by  doxygen 1.4.5