00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 char single_bound_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/single_bound.C,v 1.1 2007/04/13 15:28:35 f_limousin Exp $" ;
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #include "headcpp.h"
00045
00046
00047 #include <stdlib.h>
00048 #include <assert.h>
00049
00050
00051 #include "time_slice.h"
00052 #include "isol_hor.h"
00053 #include "metric.h"
00054 #include "evolution.h"
00055 #include "unites.h"
00056 #include "graphique.h"
00057 #include "utilitaires.h"
00058 #include "param.h"
00059
00060
00061
00062 const Valeur Single_hor::boundary_psi_app_hor()const {
00063
00064 Metric flat (mp.flat_met_spher()) ;
00065 Vector temp (mp, CON, mp.get_bvect_spher()) ;
00066 temp.set(1) = 1.;
00067 temp.set(2) = 0.;
00068 temp.set(3) = 0.;
00069 temp.std_spectral_base() ;
00070
00071 Scalar tmp = psi * psi * psi * trK
00072 - contract(get_k_dd(),0, 1, tgam.radial_vect() * tgam.radial_vect(), 0, 1)
00073 / psi
00074 - psi * tgam.radial_vect().divergence(ff)
00075 - 4 * ( tgam.radial_vect()(2) * psi.derive_cov(ff)(2)
00076 + tgam.radial_vect()(3) * psi.derive_cov(ff)(3) ) ;
00077
00078 tmp = tmp / (4 * tgam.radial_vect()(1)) ;
00079
00080
00081
00082 Valeur psi_bound (mp.get_mg()->get_angu() ) ;
00083
00084 int nnp = mp.get_mg()->get_np(1) ;
00085 int nnt = mp.get_mg()->get_nt(1) ;
00086
00087 psi_bound = 1 ;
00088
00089 for (int k=0 ; k<nnp ; k++)
00090 for (int j=0 ; j<nnt ; j++)
00091 psi_bound.set(0, k, j, 0) = tmp.val_grid_point(1, k, j, 0) ;
00092
00093 psi_bound.std_base_scal() ;
00094
00095 return psi_bound ;
00096
00097 }
00098
00099 const Valeur Single_hor::boundary_nn_Neu(double cc)const {
00100
00101 double rho = 1. ;
00102
00103 Scalar tmp = - cc * nn ;
00104
00105
00106
00107 tmp += (rho - 1) * tgam.radial_vect()(1) * dn(1) ;
00108 tmp = tmp / (rho * tgam.radial_vect()(1)) ;
00109
00110 int nnp = mp.get_mg()->get_np(1) ;
00111 int nnt = mp.get_mg()->get_nt(1) ;
00112
00113 Valeur nn_bound (mp.get_mg()->get_angu()) ;
00114
00115 nn_bound = 1 ;
00116
00117 for (int k=0 ; k<nnp ; k++)
00118 for (int j=0 ; j<nnt ; j++)
00119 nn_bound.set(0, k, j, 0) = tmp.val_grid_point(1, k, j, 0) ;
00120
00121 nn_bound.std_base_scal() ;
00122
00123 return nn_bound ;
00124
00125 }
00126
00127
00128 const Valeur Single_hor::boundary_nn_Dir(double cc)const {
00129
00130 Scalar rho(mp);
00131 rho = 0. ;
00132
00133 Scalar tmp(mp) ;
00134 tmp = cc ;
00135
00136
00137
00138
00139
00140
00141
00142
00143 tmp = (tmp + rho * nn)/(1 + rho) ;
00144
00145 tmp = tmp - 1 ;
00146
00147 int nnp = mp.get_mg()->get_np(1) ;
00148 int nnt = mp.get_mg()->get_nt(1) ;
00149
00150 Valeur nn_bound (mp.get_mg()->get_angu()) ;
00151
00152 nn_bound = 1 ;
00153
00154 for (int k=0 ; k<nnp ; k++)
00155 for (int j=0 ; j<nnt ; j++)
00156 nn_bound.set(0, k, j, 0) = tmp.val_grid_point(1, k, j, 0) ;
00157
00158 nn_bound.std_base_scal() ;
00159
00160 return nn_bound ;
00161
00162 }
00163
00164
00165
00166
00167 const Valeur Single_hor:: boundary_beta_x(double om_orb,
00168 double om_loc)const {
00169
00170
00171 double orientation = mp.get_rot_phi() ;
00172 assert ((orientation == 0) || (orientation == M_PI)) ;
00173 int aligne = (orientation == 0) ? 1 : -1 ;
00174
00175 int nnp = mp.get_mg()->get_np(1) ;
00176 int nnt = mp.get_mg()->get_nt(1) ;
00177
00178 Vector tmp_vect = nn * get_gam().radial_vect() ;
00179 tmp_vect.change_triad(mp.get_bvect_cart() ) ;
00180
00181
00182
00183 Valeur lim_x (mp.get_mg()->get_angu()) ;
00184
00185 lim_x = 1 ;
00186
00187 Mtbl ya_mtbl (mp.get_mg()) ;
00188 ya_mtbl.set_etat_qcq() ;
00189 ya_mtbl = mp.ya ;
00190
00191 Mtbl yy_mtbl (mp.get_mg()) ;
00192 yy_mtbl.set_etat_qcq() ;
00193 yy_mtbl = mp.y ;
00194
00195 for (int k=0 ; k<nnp ; k++)
00196 for (int j=0 ; j<nnt ; j++)
00197 lim_x.set(0, k, j, 0) = aligne * om_orb * ya_mtbl(1, k, j, 0)
00198 + (om_loc-om_orb)* yy_mtbl(1, k, j, 0)
00199 + tmp_vect(1).val_grid_point(1, k, j, 0) ;
00200
00201 lim_x.set_base(*(mp.get_mg()->std_base_vect_cart()[0])) ;
00202
00203 return lim_x ;
00204 }
00205
00206
00207
00208
00209
00210 const Valeur Single_hor:: boundary_beta_y(double om_orb,
00211 double om_loc)const {
00212
00213
00214 double orientation = mp.get_rot_phi() ;
00215 assert ((orientation == 0) || (orientation == M_PI)) ;
00216 int aligne = (orientation == 0) ? 1 : -1 ;
00217
00218
00219 int nnp = mp.get_mg()->get_np(1) ;
00220 int nnt = mp.get_mg()->get_nt(1) ;
00221
00222 Vector tmp_vect = nn * get_gam().radial_vect() ;
00223 tmp_vect.change_triad(mp.get_bvect_cart() ) ;
00224
00225
00226
00227 Valeur lim_y (mp.get_mg()->get_angu()) ;
00228
00229 lim_y = 1 ;
00230
00231 Mtbl xa_mtbl (mp.get_mg()) ;
00232 xa_mtbl.set_etat_qcq() ;
00233 xa_mtbl = mp.xa ;
00234
00235 Mtbl xx_mtbl (mp.get_mg()) ;
00236 xx_mtbl.set_etat_qcq() ;
00237 xx_mtbl = mp.x ;
00238
00239 for (int k=0 ; k<nnp ; k++)
00240 for (int j=0 ; j<nnt ; j++)
00241 lim_y.set(0, k, j, 0) = - aligne *om_orb * xa_mtbl(1, k, j, 0) -
00242 (om_loc-om_orb)*xx_mtbl(1, k, j, 0)
00243 + tmp_vect(2).val_grid_point(1, k, j, 0) ;
00244
00245 lim_y.set_base(*(mp.get_mg()->std_base_vect_cart()[1])) ;
00246
00247 return lim_y ;
00248 }
00249
00250
00251
00252
00253 const Valeur Single_hor:: boundary_beta_z()const {
00254
00255 int nnp = mp.get_mg()->get_np(1) ;
00256 int nnt = mp.get_mg()->get_nt(1) ;
00257
00258 Vector tmp_vect = nn * get_gam().radial_vect() ;
00259 tmp_vect.change_triad(mp.get_bvect_cart() ) ;
00260
00261
00262
00263 Valeur lim_z (mp.get_mg()->get_angu()) ;
00264
00265 lim_z = 1 ;
00266
00267 for (int k=0 ; k<nnp ; k++)
00268 for (int j=0 ; j<nnt ; j++)
00269 lim_z.set(0, k, j, 0) = tmp_vect(3).val_grid_point(1, k, j, 0) ;
00270
00271 lim_z.set_base(*(mp.get_mg()->std_base_vect_cart()[2])) ;
00272
00273 return lim_z ;
00274 }
00275