/* * Method of class Isol_hor to compute boundary conditions * * (see file isol_hor.h for documentation). * */ /* * Copyright (c) 2004 Jose Luis Jaramillo * Francois Limousin * * This file is part of LORENE. * * LORENE is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * LORENE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with LORENE; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ char bound_hor_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/bound_hor.C,v 1.36 2014/10/13 08:53:00 j_novak Exp $" ; /* * $Id: bound_hor.C,v 1.36 2014/10/13 08:53:00 j_novak Exp $ * $Log: bound_hor.C,v $ * Revision 1.36 2014/10/13 08:53:00 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.35 2014/10/06 15:13:10 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.34 2008/08/27 11:22:25 j_novak * Minor modifications * * Revision 1.33 2008/08/19 06:42:00 j_novak * Minor modifications to avoid warnings with gcc 4.3. Most of them concern * cast-type operations, and constant strings that must be defined as const char* * * Revision 1.32 2007/04/13 15:28:35 f_limousin * Lots of improvements, generalisation to an arbitrary state of * rotation, implementation of the spatial metric given by Samaya. * * Revision 1.31 2006/08/01 14:35:48 f_limousin * Many small modifs * * Revision 1.30 2006/02/22 17:02:04 f_limousin * Removal of warnings * * Revision 1.29 2006/02/22 16:29:55 jl_jaramillo * corrections on the relaxation and boundary conditions * * Revision 1.27 2005/10/24 16:44:40 jl_jaramillo * Cook boundary condition ans minot bound of kss * * Revision 1.26 2005/10/21 16:20:55 jl_jaramillo * Version for the paper JaramL05 * * Revision 1.25 2005/09/13 18:33:17 f_limousin * New function vv_bound_cart_bin(double) for computing binaries with * berlin condition for the shift vector. * Suppress all the symy and asymy in the importations. * * Revision 1.24 2005/09/12 12:33:54 f_limousin * Compilation Warning - Change of convention for the angular velocity * Add Berlin boundary condition in the case of binary horizons. * * Revision 1.23 2005/07/08 13:15:23 f_limousin * Improvements of boundary_vv_cart(), boundary_nn_lapl(). * Add a fonction to compute the departure of axisymmetry. * * Revision 1.22 2005/06/09 08:05:32 f_limousin * Implement a new function sol_elliptic_boundary() and * Vector::poisson_boundary(...) which solve the vectorial poisson * equation (method 6) with an inner boundary condition. * * Revision 1.21 2005/05/12 14:48:07 f_limousin * New boundary condition for the lapse : boundary_nn_lapl(). * * Revision 1.20 2005/04/29 14:04:17 f_limousin * Implementation of boundary_vv_x (y,z) for binary black holes. * * Revision 1.19 2005/04/19 16:40:51 jl_jaramillo * change of sign of ang_vel in vv_bound_cart. Convention of Phys. Rep. * * Revision 1.18 2005/04/08 12:16:52 f_limousin * Function set_psi(). And dependance in phi. * * Revision 1.17 2005/04/02 15:49:21 f_limousin * New choice (Lichnerowicz) for aaquad. New member data nz. * * Revision 1.16 2005/03/22 13:25:36 f_limousin * Small changes. The angular velocity and A^{ij} are computed * with a differnet sign. * * Revision 1.15 2005/03/10 10:19:42 f_limousin * Add the regularisation of the shift in the case of a single black hole * and lapse zero on the horizon. * * Revision 1.14 2005/03/03 10:00:55 f_limousin * The funtions beta_boost_x() and beta_boost_z() have been added. * * Revision 1.13 2005/02/24 17:21:04 f_limousin * Suppression of the function beta_bound_cart() and direct computation * of boundary_beta_x, y and z. * * Revision 1.12 2004/12/31 15:34:37 f_limousin * Modifications to avoid warnings * * Revision 1.11 2004/12/22 18:15:16 f_limousin * Many different changes. * * Revision 1.10 2004/11/24 19:30:58 jl_jaramillo * Berlin boundary conditions vv_bound_cart * * Revision 1.9 2004/11/18 09:49:44 jl_jaramillo * Some new conditions for the shift (Neumann + Dirichlet) * * Revision 1.8 2004/11/05 10:52:26 f_limousin * Replace double aa by double cc in argument of boundary_beta_x * boundary_beta_y and boundary_beta_z to avoid warnings. * * Revision 1.7 2004/10/29 15:42:14 jl_jaramillo * Static shift boundary conbdition * * Revision 1.6 2004/10/01 16:46:51 f_limousin * Added a pure Dirichlet boundary condition * * Revision 1.5 2004/09/28 16:06:41 f_limousin * Correction of an error when taking the bases of the boundary * condition for the shift. * * Revision 1.4 2004/09/17 13:36:23 f_limousin * Add some new boundary conditions * * Revision 1.2 2004/09/09 16:53:49 f_limousin * Add the two lines $Id: bound_hor.C,v 1.36 2014/10/13 08:53:00 j_novak Exp $Log: for CVS. * * * $Header: /cvsroot/Lorene/C++/Source/Isol_hor/bound_hor.C,v 1.36 2014/10/13 08:53:00 j_novak Exp $ * */ // C++ headers #include "headcpp.h" // C headers #include #include // Lorene headers #include "time_slice.h" #include "isol_hor.h" #include "metric.h" #include "evolution.h" #include "unites.h" #include "graphique.h" #include "utilitaires.h" #include "param.h" // Dirichlet boundary condition for Psi //------------------------------------- // ONE HAS TO GUARANTEE THAT BETA IS NOT ZERO, BUT IT IS PROPORTIONAL TO THE RADIAL VECTOR namespace Lorene { const Valeur Isol_hor::boundary_psi_Dir_evol() const{ Scalar tmp = - 6 * contract(beta(), 0, psi().derive_cov(ff), 0) ; tmp = tmp / (contract(beta().derive_cov(ff), 0, 1) - nn() * trk() ) - 1 ; // We have substracted 1, since we solve for zero condition at infinity //and then we add 1 to the solution Valeur psi_bound (mp.get_mg()->get_angu() ) ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; psi_bound = 1 ; for (int k=0 ; kget_angu() ) ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; psi_bound = 1 ; for (int k=0 ; kget_angu() ) ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; psi_bound = 1 ; for (int k=0 ; kget_angu() ) ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; psi_bound = 1 ; for (int k=0 ; kget_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; Valeur psi_bound (mp.get_mg()->get_angu()) ; psi_bound = 1 ; // Juste pour affecter dans espace des configs ; // if (psi_comp_evol.is_known(jtime)) { // for (int k=0 ; kget_angu()) ; psi_bound = 1 ; // Juste pour affecter dans espace des configs ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; for (int k=0 ; kget_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; Valeur nn_bound (mp.get_mg()->get_angu()) ; nn_bound = 1 ; // Juste pour affecter dans espace des configs ; for (int k=0 ; kget_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; //Preliminaries //------------- //Metrics on S^2 //-------------- Sym_tensor q_uu = gam_uu() - gam().radial_vect() * gam().radial_vect() ; Sym_tensor q_dd = q_uu.up_down(gam()) ; Scalar det_q = q_dd(2,2) * q_dd(3,3) - q_dd(2,3) * q_dd(3,2) ; Scalar square_q (pow(det_q, 0.5)) ; square_q.std_spectral_base() ; Sym_tensor qhat_uu = square_q * q_uu ; Sym_tensor ffr_uu = ff.con() - ff.radial_vect() * ff.radial_vect() ; Sym_tensor ffr_dd = ff.cov() - ff.radial_vect().down(0, ff) * ff.radial_vect().down(0,ff) ; Sym_tensor h_uu = qhat_uu - ffr_uu ; //------------------ // Source of the "round" laplacian: //--------------------------------- //Source 1: "Divergence" term //--------------------------- Vector kqs = contract(k_dd(), 1, gam().radial_vect(), 0 ) ; kqs = contract( q_uu.down(0, gam()), 1, kqs, 0) ; Scalar div_kqs = contract( q_uu, 0, 1, kqs.derive_cov(gam()), 0, 1) ; Scalar source1 = div_kqs ; source1 *= square_q ; // Source 2: correction term //-------------------------- Vector corr = - contract(h_uu, 1, nn().derive_cov(ff), 0) / nn() ; Scalar source2 = contract( ffr_dd, 0, 1, corr.derive_con(ff), 0, 1 ) ; // Source 3: (physical) divergence of Omega //----------------------------------------- Scalar div_omega(mp) ; //Source from (L_l\theta_k=0) Scalar L_theta (mp) ; L_theta = 0. ; L_theta.std_spectral_base() ; Scalar kk_rr = contract( gam().radial_vect() * gam().radial_vect(), 0, 1 , k_dd(), 0, 1 ) ; // Scalar kappa (mp) ; // kappa = kappa_hor() ; // kappa.std_spectral_base() ; // kappa.set_dzpuis(2) ; Scalar kappa = contract(gam().radial_vect(), 0, nn().derive_cov(gam()), 0) - nn() * kk_rr ; Scalar theta_k = -1/(2*nn()) * (gam().radial_vect().divergence(gam()) - kk_rr + trk() ) ; Sym_tensor qqq = gam_uu() - gam().radial_vect() * gam().radial_vect() ; Vector hom = nn().derive_cov(met_gamt) - contract( k_dd(), 1, gam().radial_vect() , 0) ; hom = contract(qqq.down(1, gam()), 0, hom, 0) ; Scalar rr(mp) ; rr = mp.r ; Scalar Ricci_conf = 2 / rr /rr ; Ricci_conf.std_spectral_base() ; Scalar log_psi (log(psi())) ; log_psi.std_spectral_base() ; Scalar Ricci = pow(psi(), -4) * (Ricci_conf - 4*log_psi.lapang())/rr /rr ; Ricci.std_spectral_base() ; Ricci.inc_dzpuis(4) ; div_omega = L_theta - contract(qqq, 0, 1, hom * hom, 0, 1) + 0.5 * Ricci + theta_k * kappa ; div_omega.dec_dzpuis() ; //End of Source from (L_l\theta_k=0) //---------------------------------- div_omega = 0. ; // div_omega = 0.01*log(1/(2*psi())) ; div_omega.std_spectral_base() ; div_omega.inc_dzpuis(3) ; //Construction of source3 (correction of div_omega by the square root of the determinant) Scalar source3 = div_omega ; source3 *= square_q ; //"Correction" to the div_omega term (no Y_00 component must be present) double corr_const = mp.integrale_surface(source3, radius + 1e-15)/(4. * M_PI) ; cout << "Constant part of div_omega = " << corr_const < max_err) max_err = err_lapl.val_grid_point(1, k, j, 0) ; if (err_lapl.val_grid_point(1, k, j, 0) < min_err) min_err = err_lapl.val_grid_point(1, k, j, 0) ; } err << mer << " " << max_err << " " << min_err << endl ; err.close() ; //Construction of the Valeur //-------------------------- lapse = lapse - 1. ; // int nnp = mp.get_mg()->get_np(1) ; // int nnt = mp.get_mg()->get_nt(1) ; Valeur nn_bound (mp.get_mg()->get_angu()) ; nn_bound = 1 ; // Juste pour affecter dans espace des configs ; for (int k=0 ; kget_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; Valeur bnd_beta_r (mp.get_mg()->get_angu()) ; bnd_beta_r = 1. ; // Juste pour affecter dans espace des configs ; for (int k=0 ; kstd_base_vect_spher()[0])) ; cout << "norme de lim_vr" << endl << norme(bnd_beta_r) << endl ; cout << "bases" << endl << bnd_beta_r.base << endl ; return bnd_beta_r ; } // Component theta of boundary value of beta (using expression in terms // of radial vector) // ------------------------------------------ const Valeur Isol_hor::boundary_beta_theta()const { Scalar tmp(mp) ; tmp = nn() * radial_vect_hor()(2) ; Base_val base_tmp (radial_vect_hor()(2).get_spectral_va().base) ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; Valeur bnd_beta_theta (mp.get_mg()->get_angu()) ; bnd_beta_theta = 1. ; // Juste pour affecter dans espace des configs ; for (int k=0 ; kstd_base_vect_spher()[1])) ; bnd_beta_theta.set_base_r(0, base_tmp.get_base_r(0)) ; for (int l=0 ; l<(*mp.get_mg()).get_nzone()-1 ; l++) bnd_beta_theta.set_base_r(l, base_tmp.get_base_r(l)) ; bnd_beta_theta.set_base_r((*mp.get_mg()).get_nzone()-1, base_tmp.get_base_r((*mp.get_mg()).get_nzone()-1)) ; bnd_beta_theta.set_base_t(base_tmp.get_base_t(1)) ; bnd_beta_theta.set_base_p(base_tmp.get_base_p(1)) ; cout << "bases" << endl << bnd_beta_theta.base << endl ; return bnd_beta_theta ; } // Component phi of boundary value of beta (using expression in terms // of radial vector) // ----------------------------------------------------------- const Valeur Isol_hor::boundary_beta_phi(double om)const { Scalar tmp (mp) ; Scalar ang_vel(mp) ; ang_vel = om ; ang_vel.std_spectral_base() ; ang_vel.mult_rsint() ; tmp = nn() * radial_vect_hor()(3) - ang_vel ; Base_val base_tmp (ang_vel.get_spectral_va().base) ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; Valeur bnd_beta_phi (mp.get_mg()->get_angu()) ; bnd_beta_phi = 1. ; // Juste pour affecter dans espace des configs ; for (int k=0 ; kstd_base_vect_spher()[2])) ; bnd_beta_phi.set_base_r(0, base_tmp.get_base_r(0)) ; for (int l=0 ; l<(*mp.get_mg()).get_nzone()-1 ; l++) bnd_beta_phi.set_base_r(l, base_tmp.get_base_r(l)) ; bnd_beta_phi.set_base_r((*mp.get_mg()).get_nzone()-1, base_tmp.get_base_r((*mp.get_mg()).get_nzone()-1)) ; bnd_beta_phi.set_base_t(base_tmp.get_base_t(1)) ; bnd_beta_phi.set_base_p(base_tmp.get_base_p(1)) ; // cout << "bound beta_phi" << endl << bnd_beta_phi << endl ; return bnd_beta_phi ; } // Component x of boundary value of beta //-------------------------------------- const Valeur Isol_hor:: boundary_beta_x(double om)const { // Les alignemenents pour le signe des CL. double orientation = mp.get_rot_phi() ; assert ((orientation == 0) || (orientation == M_PI)) ; int aligne = (orientation == 0) ? 1 : -1 ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; Vector tmp_vect = nn() * gam().radial_vect() ; tmp_vect.change_triad(mp.get_bvect_cart() ) ; //Isol_hor boundary conditions Valeur lim_x (mp.get_mg()->get_angu()) ; lim_x = 1 ; // Juste pour affecter dans espace des configs ; Mtbl ya_mtbl (mp.get_mg()) ; ya_mtbl.set_etat_qcq() ; ya_mtbl = mp.ya ; Scalar cosp (mp) ; cosp = mp.cosp ; Scalar cost (mp) ; cost = mp.cost ; Scalar sinp (mp) ; sinp = mp.sinp ; Scalar sint (mp) ; sint = mp.sint ; Scalar dep_phi (mp) ; dep_phi = 0.0*sint*cosp ; for (int k=0 ; kstd_base_vect_cart()[0])) ; return lim_x ; } // Component y of boundary value of beta //-------------------------------------- const Valeur Isol_hor:: boundary_beta_y(double om)const { // Les alignemenents pour le signe des CL. double orientation = mp.get_rot_phi() ; assert ((orientation == 0) || (orientation == M_PI)) ; int aligne = (orientation == 0) ? 1 : -1 ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; Vector tmp_vect = nn() * gam().radial_vect() ; tmp_vect.change_triad(mp.get_bvect_cart() ) ; //Isol_hor boundary conditions Valeur lim_y (mp.get_mg()->get_angu()) ; lim_y = 1 ; // Juste pour affecter dans espace des configs ; Mtbl xa_mtbl (mp.get_mg()) ; xa_mtbl.set_etat_qcq() ; xa_mtbl = mp.xa ; Scalar cosp (mp) ; cosp = mp.cosp ; Scalar cost (mp) ; cost = mp.cost ; Scalar sinp (mp) ; sinp = mp.sinp ; Scalar sint (mp) ; sint = mp.sint ; Scalar dep_phi (mp) ; dep_phi = 0.0*sint*cosp ; for (int k=0 ; kstd_base_vect_cart()[1])) ; return lim_y ; } // Component z of boundary value of beta //-------------------------------------- const Valeur Isol_hor:: boundary_beta_z()const { int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; Vector tmp_vect = nn() * gam().radial_vect() ; tmp_vect.change_triad(mp.get_bvect_cart() ) ; //Isol_hor boundary conditions Valeur lim_z (mp.get_mg()->get_angu()) ; lim_z = 1 ; // Juste pour affecter dans espace des configs ; for (int k=0 ; kstd_base_vect_cart()[2])) ; return lim_z ; } const Valeur Isol_hor::beta_boost_x() const { Valeur lim_x (mp.get_mg()->get_angu()) ; lim_x = boost_x ; // Juste pour affecter dans espace des configs ; lim_x.set_base(*(mp.get_mg()->std_base_vect_cart()[0])) ; return lim_x ; } const Valeur Isol_hor::beta_boost_z() const { Valeur lim_z (mp.get_mg()->get_angu()) ; lim_z = boost_z ; // Juste pour affecter dans espace des configs ; lim_z.set_base(*(mp.get_mg()->std_base_vect_cart()[2])) ; return lim_z ; } // Neumann boundary condition for b_tilde //--------------------------------------- const Valeur Isol_hor::boundary_b_tilde_Neu()const { // Introduce 2-trace gamma tilde dot Vector s_tilde = met_gamt.radial_vect() ; Scalar hh_tilde = contract(s_tilde.derive_cov(met_gamt), 0, 1) ; //des_profile(hh_tilde, 1.00001, 10, M_PI/2., 0., "H_tilde") ; Scalar tmp (mp) ; tmp = + b_tilde() * hh_tilde - 2 * ( s_tilde(2) * b_tilde().derive_cov(ff)(2) + s_tilde(3) * b_tilde().derive_cov(ff)(3) ) ; Scalar constant (mp) ; constant = 0. ; constant.std_spectral_base() ; constant.inc_dzpuis(2) ; tmp += constant ; tmp = tmp / (2 * s_tilde(1) ) ; // in this case you don't have to substract any value Valeur b_tilde_bound (mp.get_mg()->get_angu() ) ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; b_tilde_bound = 1 ; for (int k=0 ; kget_angu() ) ; int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; b_tilde_bound = 1 ; for (int k=0 ; kstd_base_vect_cart()[0])) ; angular.set(2).set_spectral_va() .set_base(*(mp.get_mg()->std_base_vect_cart()[1])) ; angular.set(3).set_spectral_va() .set_base(*(mp.get_mg()->std_base_vect_cart()[2])) ; angular.change_triad(mp.get_bvect_spher()) ; /* Scalar ang_vel (mp) ; ang_vel = om * (1 + dep_phi) ; ang_vel.std_spectral_base() ; ang_vel.mult_rsint() ; */ Scalar kss (mp) ; kss = - 0.2 ; // kss.std_spectral_base() ; // kss.inc_dzpuis(2) ; //kss from from L_lN=0 condition //------------------------------ kss = - 0.15 / nn() ; kss.inc_dzpuis(2) ; kss += contract(gam().radial_vect(), 0, nn().derive_cov(ff), 0) / nn() ; cout << "kappa_hor = " << kappa_hor() << endl ; /* // Apparent horizon condition //--------------------------- kss = trk() ; kss -= (4* contract(psi().derive_cov(met_gamt), 0, met_gamt.radial_vect(), 0)/psi() + contract(met_gamt.radial_vect().derive_cov(met_gamt), 0, 1)) / (psi() * psi()) ; */ // beta^r component //----------------- double rho = 5. ; // rho>1 ; rho=1 "pure Dirichlet" version Scalar beta_r_corr = (rho - 1) * b_tilde() * hh_tilde; beta_r_corr.inc_dzpuis(2) ; Scalar nn_KK = nn() * trk() ; nn_KK.inc_dzpuis(2) ; beta_r_corr.set_dzpuis(2) ; nn_KK.set_dzpuis(2) ; accel.set_dzpuis(2) ; div_VV.set_dzpuis(2) ; Scalar b_tilde_new (mp) ; b_tilde_new = 2 * contract(s_tilde, 0, b_tilde().derive_cov(ff), 0) + beta_r_corr - 3 * nn() * kss + nn_KK + accel + div_VV ; b_tilde_new = b_tilde_new / (hh_tilde * rho) ; b_tilde_new.dec_dzpuis(2) ; tmp_vect.set(1) = b_tilde_new * s_tilde(1) + angular(1) ; tmp_vect.set(2) = b_tilde_new * s_tilde(2) + angular(2) ; tmp_vect.set(3) = b_tilde_new * s_tilde(3) + angular(3) ; tmp_vect.change_triad(mp.get_bvect_cart() ) ; return tmp_vect ; } const Vector Isol_hor::vv_bound_cart_bin(double, int ) const{ /* // Les alignemenents pour le signe des CL. double orientation = mp.get_rot_phi() ; assert ((orientation == 0) || (orientation == M_PI)) ; int aligne = (orientation == 0) ? 1 : -1 ; Vector angular (mp, CON, mp.get_bvect_cart()) ; Scalar yya (mp) ; yya = mp.ya ; Scalar xxa (mp) ; xxa = mp.xa ; angular.set(1) = aligne * om * yya ; angular.set(2) = - aligne * om * xxa ; angular.set(3).annule_hard() ; angular.set(1).set_spectral_va() .set_base(*(mp.get_mg()->std_base_vect_cart()[0])) ; angular.set(2).set_spectral_va() .set_base(*(mp.get_mg()->std_base_vect_cart()[1])) ; angular.set(3).set_spectral_va() .set_base(*(mp.get_mg()->std_base_vect_cart()[2])) ; angular.change_triad(mp.get_bvect_spher()) ; // HH_tilde Vector s_tilde = met_gamt.radial_vect() ; Scalar hh_tilde = contract(s_tilde.derive_cov(met_gamt), 0, 1) ; hh_tilde.dec_dzpuis(2) ; Scalar btilde = b_tilde() - contract(angular, 0, s_tilde.up_down(met_gamt), 0) ; // Tangential part of the shift Vector tmp_vect = btilde * s_tilde ; // Value of kss // -------------- Scalar kss (mp) ; kss = - 0.26 ; kss.std_spectral_base() ; kss.inc_dzpuis(2) ; // Apparent horizon boundary condition // ----------------------------------- // kss frome a fich // Construction of the binary // -------------------------- char* name_fich = "/home/francois/resu/bin_hor/Test/b11_9x9x8/bin.dat" ; FILE* fich_s = fopen(name_fich, "r") ; Mg3d grid_s (fich_s) ; Map_af map_un_s (grid_s, fich_s) ; Map_af map_deux_s (grid_s, fich_s) ; Bin_hor bin (map_un_s, map_deux_s, fich_s) ; fclose(fich_s) ; // Inititialisation of fields : // ---------------------------- bin.set(1).n_comp_import (bin(2)) ; bin.set(1).psi_comp_import (bin(2)) ; bin.set(2).n_comp_import (bin(1)) ; bin.set(2).psi_comp_import (bin(1)) ; bin.decouple() ; bin.extrinsic_curvature() ; kss = contract(bin(jj).get_k_dd(), 0, 1, bin(jj).get_gam().radial_vect()* bin(jj).get_gam().radial_vect(), 0, 1) ; cout << "kappa_hor = " << kappa_hor() << endl ; // beta^r component //----------------- double rho = 5. ; // rho=0 "pure Dirichlet" version Scalar beta_r_corr = rho * btilde * hh_tilde; beta_r_corr.inc_dzpuis(2) ; Scalar nn_KK = nn() * trk() ; nn_KK.inc_dzpuis(2) ; beta_r_corr.set_dzpuis(2) ; nn_KK.set_dzpuis(2) ; Scalar b_tilde_new (mp) ; b_tilde_new = 2 * contract(s_tilde, 0, btilde.derive_cov(ff), 0) + beta_r_corr - 3 * nn() * kss + nn_KK ; b_tilde_new = b_tilde_new / (hh_tilde * (rho+1)) ; b_tilde_new.dec_dzpuis(2) ; tmp_vect.set(1) = b_tilde_new * s_tilde(1) + angular(1) ; tmp_vect.set(2) = b_tilde_new * s_tilde(2) + angular(2) ; tmp_vect.set(3) = b_tilde_new * s_tilde(3) + angular(3) ; tmp_vect.change_triad(mp.get_bvect_cart() ) ; return tmp_vect ; */ Vector pipo(mp, CON, mp.get_bvect_cart()) ; return pipo ; } // Component x of boundary value of V^i //------------------------------------- const Valeur Isol_hor:: boundary_vv_x(double om)const { int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; //Isol_hor boundary conditions Valeur lim_x (mp.get_mg()->get_angu()) ; lim_x = 1 ; // Juste pour affecter dans espace des configs ; Scalar vv_x = vv_bound_cart(om)(1) ; for (int k=0 ; kstd_base_vect_cart()[0])) ; return lim_x ; } // Component y of boundary value of V^i //-------------------------------------- const Valeur Isol_hor:: boundary_vv_y(double om)const { int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; // Isol_hor boundary conditions Valeur lim_y (mp.get_mg()->get_angu()) ; lim_y = 1 ; // Juste pour affecter dans espace des configs ; Scalar vv_y = vv_bound_cart(om)(2) ; for (int k=0 ; kstd_base_vect_cart()[1])) ; return lim_y ; } // Component z of boundary value of V^i //------------------------------------- const Valeur Isol_hor:: boundary_vv_z(double om)const { int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; // Isol_hor boundary conditions Valeur lim_z (mp.get_mg()->get_angu()) ; lim_z = 1 ; // Juste pour affecter dans espace des configs ; Scalar vv_z = vv_bound_cart(om)(3) ; for (int k=0 ; kstd_base_vect_cart()[2])) ; return lim_z ; } // Component x of boundary value of V^i //------------------------------------- const Valeur Isol_hor:: boundary_vv_x_bin(double om, int jj)const { int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; //Isol_hor boundary conditions Valeur lim_x (mp.get_mg()->get_angu()) ; lim_x = 1 ; // Juste pour affecter dans espace des configs ; Scalar vv_x = vv_bound_cart_bin(om, jj)(1) ; for (int k=0 ; kstd_base_vect_cart()[0])) ; return lim_x ; } // Component y of boundary value of V^i //-------------------------------------- const Valeur Isol_hor:: boundary_vv_y_bin(double om, int jj)const { int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; // Isol_hor boundary conditions Valeur lim_y (mp.get_mg()->get_angu()) ; lim_y = 1 ; // Juste pour affecter dans espace des configs ; Scalar vv_y = vv_bound_cart_bin(om, jj)(2) ; for (int k=0 ; kstd_base_vect_cart()[1])) ; return lim_y ; } // Component z of boundary value of V^i //------------------------------------- const Valeur Isol_hor:: boundary_vv_z_bin(double om, int jj)const { int nnp = mp.get_mg()->get_np(1) ; int nnt = mp.get_mg()->get_nt(1) ; // Isol_hor boundary conditions Valeur lim_z (mp.get_mg()->get_angu()) ; lim_z = 1 ; // Juste pour affecter dans espace des configs ; Scalar vv_z = vv_bound_cart_bin(om, jj)(3) ; for (int k=0 ; kstd_base_vect_cart()[2])) ; return lim_z ; } }