00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 char ope_helmholtz_minus_pseudo_1d_non_dege_C[] = "$Header: /cvsroot/Lorene/C++/Source/Ope_elementary/Ope_helmholtz_minus_pseudo_1d/ope_helmholtz_minus_pseudo_1d_non_dege.C,v 1.1 2004/08/24 09:14:46 p_grandclement Exp $" ;
00022
00023
00024
00025
00026
00027
00028 #include <math.h>
00029 #include <stdlib.h>
00030
00031 #include "proto.h"
00032 #include "ope_elementary.h"
00033
00034
00035
00036
00037
00038
00039 Matrice _helmholtz_minus_pseudo_1d_non_dege_pas_prevu(const Matrice &lap, int) {
00040 cout << "Construction non degeneree pas prevue..." << endl ;
00041 abort() ;
00042 exit(-1) ;
00043 return lap ;
00044 }
00045
00046
00047
00048
00049
00050 Matrice _helmholtz_minus_pseudo_1d_non_dege_r_chebu_deux (const Matrice&) ;
00051
00052 Matrice _helmholtz_minus_pseudo_1d_non_dege_r_chebu (const Matrice &lap, int puis) {
00053
00054 switch (puis) {
00055 case 2 :
00056 return _helmholtz_minus_pseudo_1d_non_dege_r_chebu_deux (lap) ;
00057 default :
00058 abort() ;
00059 exit(-1) ;
00060 return Matrice(0, 0) ;
00061 }
00062 }
00063
00064
00065
00066 Matrice _helmholtz_minus_pseudo_1d_non_dege_r_chebu_deux (const Matrice &lap) {
00067
00068 int n = lap.get_dim(0) ;
00069
00070 Matrice res(n-1, n-1) ;
00071 res.set_etat_qcq() ;
00072 for (int i=0 ;i<n-1 ; i++)
00073 for (int j=0 ; j<n-1 ; j++)
00074 res.set(i, j) = lap(i, j+1) ;
00075 res.set_band(5, 3) ;
00076 res.set_lu() ;
00077
00078 return res ;
00079 }
00080
00081
00082 void Ope_helmholtz_minus_pseudo_1d::do_non_dege() const {
00083 if (ope_cl == 0x0)
00084 do_ope_cl() ;
00085
00086 if (non_dege != 0x0)
00087 delete non_dege ;
00088
00089
00090 static Matrice (*helmholtz_minus_pseudo_1d_non_dege[MAX_BASE])(const Matrice&, int);
00091 static int nap = 0 ;
00092
00093
00094 if (nap==0) {
00095 nap = 1 ;
00096 for (int i=0 ; i<MAX_BASE ; i++) {
00097 helmholtz_minus_pseudo_1d_non_dege[i] = _helmholtz_minus_pseudo_1d_non_dege_pas_prevu ;
00098 }
00099
00100 helmholtz_minus_pseudo_1d_non_dege[R_CHEBU >> TRA_R] =
00101 _helmholtz_minus_pseudo_1d_non_dege_r_chebu ;
00102 }
00103 non_dege = new Matrice(helmholtz_minus_pseudo_1d_non_dege[base_r](*ope_cl, dzpuis)) ;
00104 }