00001 /* 00002 * Copyright (c) 1999-2001 Philippe Grandclement 00003 * 00004 * This file is part of LORENE. 00005 * 00006 * LORENE is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * LORENE is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with LORENE; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 00023 char mult2_xp1_1d_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/mult2_xp1_1d.C,v 1.1 2007/12/11 15:42:22 jl_cornou Exp $" ; 00024 00025 /* 00026 * $Id: mult2_xp1_1d.C,v 1.1 2007/12/11 15:42:22 jl_cornou Exp $ 00027 * $Log: mult2_xp1_1d.C,v $ 00028 * Revision 1.1 2007/12/11 15:42:22 jl_cornou 00029 * Premiere version des fonctions liees aux polynomes de Jacobi(0,2) 00030 * 00031 * Revision 1.2 2002/10/16 14:36:58 j_novak 00032 * Reorganization of #include instructions of standard C++, in order to 00033 * use experimental version 3 of gcc. 00034 * 00035 * Revision 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon 00036 * LORENE 00037 * 00038 * Revision 2.0 1999/10/11 09:53:08 phil 00039 * *** empty log message *** 00040 * 00041 * 00042 * $Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/mult2_xp1_1d.C,v 1.1 2007/12/11 15:42:22 jl_cornou Exp $ 00043 * 00044 */ 00045 00046 // Includes 00047 #include <stdlib.h> 00048 #include <assert.h> 00049 00050 #include "headcpp.h" 00051 #include "type_parite.h" 00052 #include "proto.h" 00053 00054 void multxpun_1d(int, double **, int) ; 00055 00056 //----------------------------------- 00057 // Routine pour les cas non prevus -- 00058 //----------------------------------- 00059 00060 void _mult2_xp1_1d_pas_prevu(int nr, double* tb, double *res) { 00061 cout << "mult2_xp1 pas prevu..." << tb << " " << res << endl ; 00062 cout << "nr : " << nr << endl ; 00063 abort() ; 00064 exit(-1) ; 00065 } 00066 00067 //--------------- 00068 // cas R_JACO02 - 00069 //--------------- 00070 00071 void _mult2_xp1_1d_r_jaco02(int nr, double* tb, double *xo) { 00072 00073 assert (nr>2) ; 00074 multxpun_1d(nr, &tb, R_JACO02 >> TRA_R) ; 00075 multxpun_1d(nr, &tb, R_JACO02 >> TRA_R) ; 00076 for (int i = 0 ; i<nr ; i++) { 00077 xo[i] = tb[i] ; 00078 } 00079 } 00080 00081 00082 //---------------------- 00083 // La routine a appeler 00084 //---------------------- 00085 00086 void mult2_xp1_1d(int nr, double **tb, int base_r) // Version appliquee a this 00087 { 00088 00089 // Routines de derivation 00090 static void (*mult2_xp1_1d[MAX_BASE])(int, double *, double*) ; 00091 static int nap = 0 ; 00092 00093 // Premier appel 00094 if (nap==0) { 00095 nap = 1 ; 00096 for (int i=0 ; i<MAX_BASE ; i++) { 00097 mult2_xp1_1d[i] = _mult2_xp1_1d_pas_prevu ; 00098 } 00099 // Les routines existantes 00100 mult2_xp1_1d[R_JACO02 >> TRA_R] = _mult2_xp1_1d_r_jaco02 ; 00101 } 00102 00103 double *result = new double[nr] ; 00104 mult2_xp1_1d[base_r](nr, *tb, result) ; 00105 00106 delete [] (*tb) ; 00107 (*tb) = result ; 00108 }
1.4.6