00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 char param_elliptic_pseudo_1d_C[] = "$Header: /cvsroot/Lorene/C++/Source/Param_elliptic/param_elliptic_pseudo_1d.C,v 1.1 2004/08/24 09:14:49 p_grandclement Exp $" ;
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #include "headcpp.h"
00040
00041 #include <math.h>
00042 #include <stdlib.h>
00043
00044 #include "param_elliptic.h"
00045 #include "base_val.h"
00046 #include "map.h"
00047 #include "ope_elementary.h"
00048 #include "change_var.h"
00049 #include "scalar.h"
00050
00051
00052 void Param_elliptic::set_poisson_pseudo_1d(Scalar& source) {
00053
00054 if (type_map != MAP_AFF) {
00055 cout << "set_poisson_pseudo_1d only defined for an affine mapping..." << endl ;
00056 abort() ;
00057 }
00058 else {
00059
00060 int nz = get_mp().get_mg()->get_nzone() ;
00061
00062 int nr ;
00063 double alpha, beta ;
00064 int m_quant, l_quant, base_r_1d ;
00065
00066 int conte = 0 ;
00067 for (int l=0 ; l<nz ; l++) {
00068
00069 nr = get_mp().get_mg()->get_nr(l) ;
00070 alpha = get_alpha (l) ;
00071 beta = get_beta (l) ;
00072
00073 for (int k=0 ; k<get_mp().get_mg()->get_np(l)+1 ; k++)
00074 for (int j=0 ; j<get_mp().get_mg()->get_nt(l) ; j++) {
00075 if (operateurs[conte] != 0x0)
00076 delete operateurs[conte] ;
00077 source.get_spectral_va().base.give_quant_numbers(l, k, j, m_quant, l_quant, base_r_1d) ;
00078 if ((k!=1) && (l!=nz-1))
00079 operateurs[conte] = new Ope_poisson_pseudo_1d (nr, base_r_1d, alpha, beta, l_quant) ;
00080 else
00081 operateurs[conte] = 0x0 ;
00082 conte ++ ;
00083 }
00084 }
00085 }
00086 }
00087
00088 void Param_elliptic::set_helmholtz_minus_pseudo_1d(int zone, double masse, Scalar& source) {
00089
00090 int dzpuis = source.get_dzpuis() ;
00091 assert (masse > 0) ;
00092
00093 if (type_map != MAP_AFF) {
00094 cout << "set_helmholtz_minus_pseudo_1d only defined for an affine mapping..." << endl ;
00095 abort() ;
00096 }
00097 else {
00098
00099 int nz = get_mp().get_mg()->get_nzone() ;
00100 if (zone == nz-1)
00101 source.check_dzpuis(2) ;
00102 int nr ;
00103 double alpha, beta ;
00104 int m_quant, l_quant, base_r_1d ;
00105
00106 int conte = 0 ;
00107 for (int l=0 ; l<nz ; l++) {
00108
00109 nr = get_mp().get_mg()->get_nr(l) ;
00110 alpha = get_alpha (l) ;
00111 beta = get_beta (l) ;
00112
00113 for (int k=0 ; k<get_mp().get_mg()->get_np(l)+1 ; k++)
00114 for (int j=0 ; j<get_mp().get_mg()->get_nt(l) ; j++) {
00115 if (l==zone) {
00116 if (operateurs[conte] != 0x0)
00117 delete operateurs[conte] ;
00118 source.get_spectral_va().base.give_quant_numbers
00119 (l, k, j, m_quant, l_quant, base_r_1d) ;
00120 operateurs[conte] = new Ope_helmholtz_minus_pseudo_1d (nr, base_r_1d,
00121 alpha, beta, l_quant, masse, dzpuis) ;
00122 }
00123 conte ++ ;
00124 }
00125 }
00126 }
00127 }
00128