00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 char ope_helmholtz_plus_C[] = "$Header: /cvsroot/Lorene/C++/Source/Ope_elementary/ope_helmholtz_plus.C,v 1.5 2007/05/06 10:48:13 p_grandclement Exp $" ;
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #include <math.h>
00046 #include <stdlib.h>
00047
00048 #include "proto.h"
00049 #include "ope_elementary.h"
00050
00051
00052 Ope_helmholtz_plus::Ope_helmholtz_plus (int nbr, int base, int lquant, double alf,
00053 double bet, double mas):
00054 Ope_elementary(nbr, base, alf, bet), lq(lquant), masse (mas) {
00055 }
00056
00057
00058 Ope_helmholtz_plus::Ope_helmholtz_plus (const Ope_helmholtz_plus& so) :
00059 Ope_elementary(so), lq (so.lq), masse (so.masse) {
00060 }
00061
00062
00063 Ope_helmholtz_plus::~Ope_helmholtz_plus() {}
00064
00065
00066 void Ope_helmholtz_plus::do_ope_mat() const {
00067 if (ope_mat != 0x0)
00068 delete ope_mat ;
00069
00070 ope_mat = new Matrice
00071 (helmholtz_plus_mat(nr, lq, alpha, beta, masse, base_r)) ;
00072 }
00073
00074 void Ope_helmholtz_plus::do_ope_cl() const {
00075 if (ope_mat == 0x0)
00076 do_ope_mat() ;
00077
00078 if (ope_cl != 0x0)
00079 delete ope_cl ;
00080
00081 ope_cl = new Matrice
00082 (cl_helmholtz_plus(*ope_mat, base_r)) ;
00083 }
00084
00085 void Ope_helmholtz_plus::do_non_dege() const {
00086 if (ope_cl == 0x0)
00087 do_ope_cl() ;
00088
00089 if (non_dege != 0x0)
00090 delete non_dege ;
00091
00092 non_dege = new Matrice
00093 (prepa_helmholtz_plus_nondege(*ope_cl, base_r)) ;
00094 }
00095
00096 Tbl Ope_helmholtz_plus::get_solp (const Tbl& so) const {
00097
00098 if (non_dege == 0x0)
00099 do_non_dege() ;
00100
00101 Tbl res(solp_helmholtz_plus (*ope_mat, *non_dege, so, alpha, beta, base_r));
00102
00103 Tbl valeurs (val_solp (res, alpha, base_r)) ;
00104 sp_plus = valeurs(0) ;
00105 sp_minus = valeurs(1) ;
00106 dsp_plus = valeurs(2) ;
00107 dsp_minus = valeurs(3) ;
00108
00109 return res ;
00110 }
00111
00112 Tbl Ope_helmholtz_plus::get_solh() const {
00113
00114 Tbl res (solh_helmholtz_plus (nr, lq, alpha, beta, masse, base_r)) ;
00115
00116
00117 if (res.get_ndim() == 1) {
00118 Tbl val_lim (val_solp (res, alpha, base_r)) ;
00119
00120 s_one_plus = val_lim(0) ;
00121 s_one_minus = val_lim(1) ;
00122 ds_one_plus = val_lim(2) ;
00123 ds_one_minus = val_lim(3) ;
00124
00125 }
00126 else {
00127 Tbl auxi (nr) ;
00128 auxi.set_etat_qcq() ;
00129 for (int i=0 ; i<nr ; i++)
00130 auxi.set(i) = res(0,i) ;
00131
00132 Tbl val_one (val_solp (auxi, alpha, base_r)) ;
00133
00134 s_one_plus = val_one(0) ;
00135 s_one_minus = val_one(1) ;
00136 ds_one_plus = val_one(2) ;
00137 ds_one_minus = val_one(3) ;
00138
00139 for (int i=0 ; i<nr ; i++)
00140 auxi.set(i) = res(1,i) ;
00141
00142 Tbl val_two (val_solp (auxi, alpha, base_r)) ;
00143
00144 s_two_plus = val_two(0) ;
00145 s_two_minus = val_two(1) ;
00146 ds_two_plus = val_two(2) ;
00147 ds_two_minus = val_two(3) ;
00148 }
00149 return res ;
00150 }
00151
00152
00153 void Ope_helmholtz_plus::inc_l_quant() {
00154
00155 cout << "inc_l_quant not implemented for Helmholtz operator." << endl ;
00156 abort() ;
00157 }