/* * Functions Star_rot_Dirac_diff::fait_omega_field * Star_rot_Dirac_diff::fait_prim_field * * (see file star_rot_dirac_diff.h for documentation). * */ /* * Copyright (c) 2005 Motoyuki Saijo * * 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 as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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 strot_dirac_diff_faitomeg_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_diff_faitomeg.C,v 1.2 2014/10/13 08:53:39 j_novak Exp $" ; /* * $Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_diff_faitomeg.C,v 1.2 2014/10/13 08:53:39 j_novak Exp $ * */ // Headers Lorene #include "star_rot_dirac_diff.h" #include "utilitaires.h" #include "param.h" namespace Lorene { double strot_dirac_diff_fzero(double omeg, const Param& par) ; //-----------------------------------// // fait_omega_field // //-----------------------------------// void Star_rot_Dirac_diff::fait_omega_field(double omeg_min, double omeg_max, double precis, int nitermax) { const Mg3d& mg = *(mp.get_mg()) ; int nz = mg.get_nzone() ; int nzm1 = nz - 1 ; Scalar brst2 = gamma.cov()(3,3) ; brst2.annule(nzm1, nzm1) ; brst2.mult_rsint() ; brst2.mult_rsint() ; Scalar nnn2 = qqq * qqq / psi4 ; Scalar betp = beta(3) ; betp.div_rsint() ; Param par ; par.add_scalar(nnn2, 0) ; par.add_scalar(brst2, 1) ; par.add_scalar(betp, 2) ; int l, k, j, i ; par.add_int(l, 0) ; par.add_int(k, 1) ; par.add_int(j, 2) ; par.add_int(i, 3) ; par.add_star(*this) ; // Loop on the grid points // ----------------------- int niter ; bool prev_zero = (omega_field.get_etat() == ETATZERO) ; omega_field.allocate_all() ; // cout << "Star_rot_Dirac_diff::fait_omega_field: niter : " << '\n' ; for (l=0; l(&par.get_star()) ; double fom = star->funct_omega(omeg) ; double omnp = omeg + betp.val_grid_point(l, k, j, i) ; return fom - brst2.val_grid_point(l, k, j, i) * omnp / ( nnn2.val_grid_point(l, k, j, i) - brst2.val_grid_point(l, k, j, i) * omnp * omnp ) ; } //-----------------------------------// // fait_prim_field // //-----------------------------------// void Star_rot_Dirac_diff::fait_prim_field() { const Mg3d& mg = *(mp.get_mg()) ; int nz = mg.get_nzone() ; // Loop on the grid points in the vicinity of the star // --------------------------------------------------- prim_field.allocate_all() ; for (int l=0; l