00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 char prepa_helmholtz_minus_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/PDE/prepa_helmholtz_minus.C,v 1.6 2008/07/09 06:51:58 p_grandclement Exp $" ;
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 #include <stdio.h>
00058 #include <stdlib.h>
00059 #include <math.h>
00060
00061 #include "matrice.h"
00062 #include "type_parite.h"
00063 #include "proto.h"
00064
00065
00066
00067
00068
00069
00070
00071
00072 Matrice _prepa_helmholtz_minus_nondege_pas_prevu(const Matrice &so) {
00073
00074 cout << "Unknown case for prepa_helmholtz_minus_nondege" << endl ;
00075 abort() ;
00076 exit(-1) ;
00077 return so;
00078 }
00079
00080
00081
00082
00083
00084 Matrice _prepa_helmholtz_minus_nondege_r_cheb (const Matrice &lap) {
00085
00086 int n = lap.get_dim(0) ;
00087 int non_dege = 2 ;
00088
00089 Matrice res(n-non_dege, n-non_dege) ;
00090 res.set_etat_qcq() ;
00091 for (int i=0 ; i<n-non_dege ; i++)
00092 for (int j=0 ; j<n-non_dege ; j++)
00093 res.set(i, j) = lap(i, j+non_dege) ;
00094
00095 res.set_band (4,4) ;
00096 res.set_lu() ;
00097 return res ;
00098 }
00099
00100
00101
00102
00103 Matrice _prepa_helmholtz_minus_nondege_r_chebu (const Matrice &lap) {
00104
00105 int n = lap.get_dim(0) ;
00106 int non_dege = 1 ;
00107
00108 Matrice res(n-non_dege, n-non_dege) ;
00109 res.set_etat_qcq() ;
00110 for (int i=0 ; i<n-non_dege ; i++)
00111 for (int j=0 ; j<n-non_dege ; j++)
00112 res.set(i, j) = lap(i, j+non_dege) ;
00113
00114 res.set_band (5,3) ;
00115 res.set_lu() ;
00116 return res ;
00117 }
00118
00119
00120
00121 Matrice _prepa_helmholtz_minus_nondege_r_chebp (const Matrice &lap) {
00122
00123 int n = lap.get_dim(0) ;
00124 int non_dege = 1 ;
00125
00126 Matrice res(n-non_dege, n-non_dege) ;
00127 res.set_etat_qcq() ;
00128 for (int i=0 ; i<n-non_dege ; i++)
00129 for (int j=0 ; j<n-non_dege ; j++)
00130 res.set(i, j) = lap(i, j+non_dege) ;
00131
00132 res.set_band (4,2) ;
00133 res.set_lu() ;
00134 return res ;
00135 }
00136
00137
00138
00139 Matrice _prepa_helmholtz_minus_nondege_r_chebi (const Matrice &lap) {
00140
00141 int n = lap.get_dim(0) ;
00142 int non_dege = 1 ;
00143
00144 Matrice res(n-non_dege, n-non_dege) ;
00145 res.set_etat_qcq() ;
00146 for (int i=0 ; i<n-non_dege ; i++)
00147 for (int j=0 ; j<n-non_dege ; j++)
00148 res.set(i, j) = lap(i, j+non_dege) ;
00149
00150 res.set_band (4,2) ;
00151 res.set_lu() ;
00152 return res ;
00153 }
00154
00155
00156
00157
00158
00159 Matrice prepa_helmholtz_minus_nondege(const Matrice &ope, int base_r) {
00160
00161
00162 static Matrice (*prepa_helmholtz_minus_nondege[MAX_BASE])
00163 (const Matrice&) ;
00164 static int nap = 0 ;
00165
00166
00167 if (nap==0) {
00168 nap = 1 ;
00169 for (int i=0 ; i<MAX_BASE ; i++) {
00170 prepa_helmholtz_minus_nondege[i] =
00171 _prepa_helmholtz_minus_nondege_pas_prevu ;
00172 }
00173
00174 prepa_helmholtz_minus_nondege[R_CHEB >> TRA_R] =
00175 _prepa_helmholtz_minus_nondege_r_cheb ;
00176 prepa_helmholtz_minus_nondege[R_CHEBU >> TRA_R] =
00177 _prepa_helmholtz_minus_nondege_r_chebu ;
00178 prepa_helmholtz_minus_nondege[R_CHEBP >> TRA_R] =
00179 _prepa_helmholtz_minus_nondege_r_chebp ;
00180 prepa_helmholtz_minus_nondege[R_CHEBI >> TRA_R] =
00181 _prepa_helmholtz_minus_nondege_r_chebi ;
00182 }
00183
00184 Matrice res(prepa_helmholtz_minus_nondege[base_r](ope)) ;
00185 return res ;
00186 }
00187